From 995d5d51b1c9a53d2ecaece48bf9a3edbfd300b3 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 | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 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 00000000..d23feec4 --- /dev/null +++ b/.github/workflows/cross.yml @@ -0,0 +1,43 @@ +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: armv7 + distro: ubuntu_latest + - 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 + apt install cargo openssl-dev + cargo check \ No newline at end of file