Align the Travis enabling timing with GitHub Actions.
For the syntax, see <https://docs.travis-ci.com/user/conditions-v1>.
We use `repo` syntax rather than `fork = true/false` syntax to show a general usage in any repositories on GitHub.
The non-forked repo is not always a primary repo in any GitHub repositories.
[Bug #17936]
* Use only the free pipelines arm64/ppc64le/s390x without credits on Travis.
See <https://docs.travis-ci.com/user/billing-overview/#partner-queue-solution>.
* Add ppc64le case.
* Update the gcc to gcc-11.
* Remove unused logic.
* Add the `tool/travis_wait.sh` to avoid a command timeout.
* Run the tests skipping some failing tests.
* Set `TEST_ALL_SKIPPED_TESTS` env to skip the tests.
* Run the tests separately returning ok status.
The tests are executed if `TEST_ALL_SKIPPED_TESTS` env is set or
`TEST_ALL_SEPARATED_TESTS` env is set.
* Add `tool/ci_functions.sh` to manage the functions used in CI.
* Add arm64 to allow_failures due to the following issue.
An arm64 job sometimes does not start right now.
https://travis-ci.community/t/11629
Reason:
* Recent build is failed.
https://travis-ci.org/github/ruby/ruby/jobs/762561190
* Current configuration uses Ubuntu 16.04 (xenial), whose EOL is Apr 2021.
If someone want to recover Travis CI builds, please fix above two issues.
It has caused errors by ENOSPC like
https://travis-ci.org/github/ruby/ruby/jobs/682520961 too often.
I cleared all cache of Travis yesterday, but it didn't help it. Until
somebody figures out how to fix it, let me exclude it from CI status
reports to avoid false alerts.
It seems fragile now, seemingly due to environmental issues. Lets allow
it to fail for a while. Reported by Jun Agura <jaruga@redhat.com>
[ruby-core:97540]
* With keyword argument changes, it's more likely to break only 2.7 and
not other versions.
* A few specs were broken on 2.7.0 recently, this should catch them earlier.
This fixes following error that sometimes happens once in a few times
on Travis s390x environment.
```
$ tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test
Error: retrieving gpg key timed out.
```
This issue happened when `libc.so` and `libm.so` path were not found
and `ldd ruby` command also failed to print the shared dependencies
in `test/fiddle/helper.rb`.
See https://travis-ci.org/ruby/ruby/jobs/611483288#L3018
/home/travis/build/ruby/ruby/build/.ext/common/fiddle/import.rb:299:in `import_function': cannot find the function: strcpy() (Fiddle::DLError)
* Set libc6:armhf as a installing dependency explicitly.
* Remove arm32 from allow_failures.