github: add basic CI tests #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and test libucontext | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86 | |
| platform: linux/386 | |
| image: alpine:latest | |
| - arch: x86_64 | |
| platform: linux/amd64 | |
| image: alpine:latest | |
| - arch: ppc64le | |
| platform: linux/ppc64le | |
| image: alpine:latest | |
| - arch: arm | |
| platform: linux/arm/v7 | |
| image: alpine:latest | |
| - arch: aarch64 | |
| platform: linux/arm64 | |
| image: alpine:latest | |
| - arch: riscv64 | |
| platform: linux/riscv64 | |
| image: alpine:latest | |
| - arch: s390x | |
| platform: linux/s390x | |
| image: alpine:latest | |
| # Blocked by https://github.com/tonistiigi/binfmt/issues/133 | |
| # - arch: loongarch64 | |
| # platform: linux/loong64 | |
| # image: registry.alpinelinux.org/alpine:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU user emulation | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: all | |
| - name: Build and run tests using Docker | |
| run: | | |
| docker run --rm \ | |
| --platform=${{matrix.platform}} \ | |
| -v "$PWD:/work" \ | |
| -w /work \ | |
| ${{matrix.image}} \ | |
| sh -lc ' | |
| apk add build-base | |
| make check ARCH=${{matrix.arch}} | |
| ' |