From 68b942a8bf74100be2ec7415bbe4fb18ec470e97 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..f88eac34 --- /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 libssl-dev + cargo check \ No newline at end of file