forked from eclipse-wakaama/wakaama
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eclipse-wakaamaGH-494] ci: Build and test on multiple architectures
Most of this is a workaround for the fact that... - Ubuntu 20.04 does not support many architectures - CMake versions before 3.19 are affected by https://gitlab.kitware.com/cmake/cmake/-/issues/20568 Signed-off-by: Reto Schneider <[email protected]>
- Loading branch information
1 parent
66e9c16
commit e5eff9f
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Foreign architectures | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
multiarch: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
cmake_version: 3.20.0 | ||
strategy: | ||
matrix: | ||
arch: ["armv6", "armv7", "aarch64"] | ||
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/[email protected] | ||
id: runcmd | ||
with: | ||
arch: ${{ matrix.arch }} | ||
distro: buster | ||
install: | | ||
apt update | ||
apt -qy --no-install-recommends 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 >> /etc/apt/sources.list | ||
apt update | ||
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 }} | ||
./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 |