ci: use matrix-keyword for x86/aarch64 builds

Cherry-picked from Shubham Tatvamasi (https://github.com/ShubhamTatvamasi)
initial commit
master
Shubham Tatvamasi 3 years ago committed by Andre Puschmann
parent 2e4b1aceaf
commit 9d6385c84f

@ -1,35 +1,44 @@
name: C/C++ CI name: C/C++ CI
on: push on: push
jobs: jobs:
x86_ubuntu18_build: x86_ubuntu_build:
name: Build and test on x86 Ubuntu 18.04 name: Build on x86
runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: fail-fast: false
compiler: [gcc, clang] matrix:
runs-on: ubuntu-18.04 os: [ubuntu-20.04, ubuntu-18.04]
compiler: [gcc, clang]
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
- name: Build srsRAN on x86 Ubuntu 18.04 - name: Build srsRAN on x86 ${{ matrix.os }}
run: | run: |
sudo apt update sudo apt update
sudo apt install -y build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev colordiff ninja-build valgrind sudo apt install -y build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev colordiff ninja-build valgrind
mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja && ctest mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja && ctest
aarch64_ubuntu18_build: aarch64_ubuntu_build:
runs-on: ubuntu-18.04
name: Build on aarch64 name: Build on aarch64
runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false
matrix: matrix:
os: [ubuntu-20.04, ubuntu-18.04]
compiler: [gcc, clang] compiler: [gcc, clang]
include:
- os: ubuntu-20.04
distro: ubuntu20.04
- os: ubuntu-18.04
distro: ubuntu18.04
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
- name: Build srsRAN on aarch64 - name: Build srsRAN on aarch64 ${{ matrix.os }}
uses: uraimo/run-on-arch-action@master uses: uraimo/run-on-arch-action@master
with: with:
architecture: aarch64 arch: aarch64
distribution: ubuntu18.04 distro: ${{ matrix.distro }}
run: | run: |
export CTEST_PARALLEL_LEVEL=$(nproc --all) export CTEST_PARALLEL_LEVEL=$(nproc --all)
apt update apt update
apt install -y build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev ninja-build apt install -y build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev ninja-build
ls -l && pwd && mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja ls -l && pwd && mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja

Loading…
Cancel
Save