Use Alpine Linux as base image for s390x testing#1564
Use Alpine Linux as base image for s390x testing#1564bakpakin merged 4 commits intojanet-lang:masterfrom
Conversation
|
I should have demonstrated the code to enable the caching. I believe it's this: test-s390x-linux:
name: Build and test s390x in qemu
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Do Qemu build and test
uses: uraimo/run-on-arch-action@v3
with:
arch: s390x
distro: ubuntu_latest
+ githubToken: ${{ github.token }}
dockerRunArgs: |
--volume ".:/janet"
install: |
apt-get -y update
apt-get -y install git build-essential
run: |
cd /janet
make -j3
make test |
|
After looking more into this, I think the better solution is:
Apologies for all the back and forth. |
|
I think the main issue is that GCC is crashing with s390x. It's not clear if this is a GCC bug or a qemu bug. Either way, not sure if binfmt would actually fix it - doesn't it just use qemu under the hood? |
|
This is a bit above my head so take all of this with a grain of salt but the problem is discussed in more detail in this bug report in the QEMU project repository. This post in that issue seems to suggest the bug will be fixed (or at least reliably worked around) in an upcoming release of QEMU. Unfortunately, the Docker container being used currently (multiarch/qemu-user-static) hasn’t been updated in two years so it seems unlikely the fix will get picked up soon. This is not true with the proposed container (tonistiigi/binfmt) which seems to be under active development and is used as the basis for Docker’s own docker-setup-qemu GitHub Action. |
NOTE: The approach proposed in this PR has changed as described here.
The GitHub workflow that Janet runs to check Janet builds on the s390x architecture has started failing intermittently. More information is here.
This PR uses the run-on-arch-action GitHub action by Umberto Raimondi. This is done for 3 reasons:
In terms of (3), I have not enabled this because it I think it means you get a bit of an ugly listing in the GitHub project's packages (e.g. see simdjson for what that would look like) but perhaps that's an acceptable trade-off for the speed gain.