diff --git a/.github/workflows/c.yaml b/.github/workflows/c.yaml index ce95541b7d..d70ef9b283 100644 --- a/.github/workflows/c.yaml +++ b/.github/workflows/c.yaml @@ -12,34 +12,9 @@ on: - "c/**" - .github/workflows/c.yaml jobs: - coverage: - name: Code Coverage - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - fetch-depth: 0 - - - name: Setup - run: | - sudo apt-get -qq update - sudo apt-get -qq install lcov libeigen3-dev libserialport-dev - - - name: Run tests - run: make test-c - env: - CMAKEFLAGS: -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_EXAMPLES=true - - - name: Build examples - run: make -C c/build examples - - - name: Upload coverage to codecov.io - run: | - bash <(curl -s https://codecov.io/bash) -s c/build || echo "Codecov did not collect coverage reports"; - ubuntu-lts: + strategy: matrix: build_type: [ "Debug", "Release" ] @@ -51,19 +26,30 @@ jobs: exclude: [ { build_type: "Debug", compiler: { c: "gcc-6", cxx: "g++-6" }, build_shared_libraries: false } ] + name: "Ubuntu 18.04 (Build: ${{ matrix.build_type }}, Compilers: ${{ matrix.compiler.c }}/${{ matrix.compiler.cxx }}, Shared Library: ${{ matrix.build_shared_libraries }})" - runs-on: ubuntu-18.04 + + runs-on: ubuntu-latest + container: ubuntu:18.04 + steps: + + - name: Setup + run: | + apt-get -qq update + apt-get -qq install software-properties-common gpg wget + add-apt-repository -y ppa:git-core/ppa + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic-rc main' \ + | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null + apt-get -qq update + apt-get -qq install libeigen3-dev libserialport-dev git cmake build-essential ${{ matrix.compiler.package }} + - uses: actions/checkout@v2 with: submodules: recursive fetch-depth: 0 - - name: Setup - run: | - sudo apt-get -qq update - sudo apt-get -qq install libeigen3-dev libserialport-dev ${{ matrix.compiler.package }} - - name: Configure run: | cmake -S c -B build \ @@ -71,15 +57,15 @@ jobs: -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} \ -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} \ -DBUILD_SHARED_LIBS=${{ matrix.build_shared_libraries }} \ - -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \ + -DCMAKE_INSTALL_PREFIX="$PWD/install" \ -DINSTALL_GTEST=false \ -DBUILD_EXAMPLES=true - name: Build - run: cmake --build build + run: cmake --build build --parallel - name: Example - run: cmake --build build --target examples + run: cmake --build build --parallel --target examples - name: Test run: cmake --build build --target do-all-tests @@ -89,12 +75,11 @@ jobs: - name: Test Package run: | - cmake -S c/test_package -B c/test_package/build -DCMAKE_PREFIX_PATH="${{ github.workspace }}/install" + cmake -S c/test_package -B c/test_package/build -DCMAKE_PREFIX_PATH="$PWD/install" cmake --build c/test_package/build - macos: - name: macOS Big Sur + name: macOS runs-on: macos-11 steps: - uses: actions/checkout@v2 @@ -128,7 +113,7 @@ jobs: big-endian: name: Test Big Endian - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/generator.yaml b/.github/workflows/generator.yaml index be73011480..d19f6c6d7d 100644 --- a/.github/workflows/generator.yaml +++ b/.github/workflows/generator.yaml @@ -18,7 +18,7 @@ on: jobs: generation: name: Generated artifacts - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/haskell.yaml b/.github/workflows/haskell.yaml index 002ed5d3a1..16bc500e13 100644 --- a/.github/workflows/haskell.yaml +++ b/.github/workflows/haskell.yaml @@ -14,7 +14,7 @@ on: jobs: build: name: Build - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/java.yaml b/.github/workflows/java.yaml index a66beaf713..59aa3344bc 100644 --- a/.github/workflows/java.yaml +++ b/.github/workflows/java.yaml @@ -14,7 +14,7 @@ on: jobs: tests-java-1_8: name: Test - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/javascript.yaml b/.github/workflows/javascript.yaml index b2d5de4392..b4b4eaf64b 100644 --- a/.github/workflows/javascript.yaml +++ b/.github/workflows/javascript.yaml @@ -17,7 +17,7 @@ on: jobs: coverage: name: Test - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 4356b8eaae..d1e0f2a190 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -68,7 +68,7 @@ jobs: strategy: matrix: os: - - ubuntu-18.04 + - ubuntu-20.04 - macos-12 - windows-2022 runs-on: ${{ matrix.os }}