From bc2642566f082fa12f4f29d9588682939734d71a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 28 Jun 2024 10:51:10 -0400 Subject: [PATCH] ci: Add cross-arch builds Because we have a lot of arch conditionals that would be easy to break. Signed-off-by: Colin Walters --- .github/workflows/cross.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/cross.yml diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml new file mode 100644 index 0000000..6cdad17 --- /dev/null +++ b/.github/workflows/cross.yml @@ -0,0 +1,41 @@ +name: Cross build + +on: [push, pull_request] + +permissions: + actions: read + +jobs: + crossarch-check: + runs-on: ubuntu-latest + name: Build on ${{ matrix.arch }} + + strategy: + matrix: + include: + - arch: aarch64 + distro: ubuntu_latest + - arch: s390x + distro: ubuntu_latest + - arch: ppc64le + distro: ubuntu_latest + steps: + - uses: actions/checkout@v3.0.2 + with: + submodules: true + set-safe-directory: true + + - uses: uraimo/run-on-arch-action@v2.2.0 + name: Build + id: build + with: + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + + githubToken: ${{ github.token }} + + run: | + set -xeu + apt update -y + apt install -y gcc make cargo libssl-dev pkg-config + cargo check