diff --git a/.github/workflows/multiarch.yaml b/.github/workflows/multiarch.yaml new file mode 100644 index 000000000..28a56ca41 --- /dev/null +++ b/.github/workflows/multiarch.yaml @@ -0,0 +1,47 @@ +name: Foreign architectures + +on: [push, pull_request] + +jobs: + multiarch: + runs-on: ubuntu-20.04 + env: + cmake_version: 3.20.0 + strategy: + matrix: + # Add armv7, aarch64 and other architectures once this is resolved: + # https://github.com/balena-io-library/resin-rpi-raspbian/issues/104 + arch: ["armv6"] + steps: + - name: Checkout code including full history and submodules + uses: actions/checkout@v2 + with: + submodules: true + fetch-depth: 0 + - name: Build and test + uses: uraimo/run-on-arch-action@v2.0.9 + id: runcmd + with: + arch: ${{ matrix.arch }} + distro: buster + githubToken: ${{ github.token }} + install: | + sudo apt update + sudo apt install libcunit1-dev ninja-build unzip wget build-essential + # Workaround because of https://gitlab.kitware.com/cmake/cmake/-/issues/20568 + # Please remove once CMake 3.19 or newer is available in the repository + cat /etc/apt/sources.list + echo deb-src http://archive.raspbian.org/raspbian buster main contrib non-free | sudo tee -a /etc/apt/sources.list + sudo apt update + sudo apt build-dep cmake + wget https://github.com/Kitware/CMake/releases/download/v${{ env.cmake_version }}/cmake-${{ env.cmake_version }}.tar.gz + tar xf cmake-${{ env.cmake_version }}.tar.gz + cd cmake-${{ env.cmake_version }} + # Using boostrap is much slower + ./bootstrap -- -DCMAKE_USE_OPENSSL=OFF -DBUILD_TESTING=OFF + make -j $(nproc) + make install + cd .. + rm -r cmake-${{ env.cmake_version }} cmake-${{ env.cmake_version }}.tar.gz + run: | + tools/ci/run_ci.sh --run-tests