From 01311f1ce32cb3f79ab04f40d42ef76d2242b040 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 11 Jul 2022 18:19:39 -0400 Subject: [PATCH] More updates --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++-------------- ci/test-coverage.sh | 4 ++++ 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17198b5..4aea911 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,17 +41,13 @@ jobs: sudo apt-get update sudo apt-get install -y gcovr libmagic-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libboost-filesystem-dev:i386 libboost-regex-dev:i386 cimg-dev gcc-multilib g++-multilib libfuse2:i386 - - name: Test coverage + - name: Test coverage (native) run: bash -ex ci/test-coverage.sh - if: matrix.BUILD_TYPE == 'coverage' - - - name: Build, test and build AppImage (native) - if: matrix.ARCH != 'aarch64' && matrix.BUILD_TYPE != 'coverage' - run: bash -ex ci/build.sh + if: matrix.ARCH != 'aarch64' && matrix.BUILD_TYPE == 'coverage' - - name: Build, test and build AppImage (VM) - if: matrix.ARCH != 'x86_64' && matrix.ARCH != 'i386' && matrix.BUILD_TYPE != 'coverage' - uses: uraimo/run-on-arch-action@v2.0.5 + - name: Test coverage (VM) + if: matrix.ARCH != 'x86_64' && matrix.ARCH != 'i386' && matrix.BUILD_TYPE == 'coverage' + uses: uraimo/run-on-arch-action@v2.2.0 with: arch: ${{ matrix.ARCH }} distro: ubuntu20.04 @@ -59,16 +55,31 @@ jobs: dockerRunArgs: | --volume "${PWD}:/build" install: | - apt update - apt install -y build-essential wget git pkg-config autoconf libmagic-dev libjpeg-dev libpng-dev cimg-dev + apt-get update + apt-get install -y build-essential wget git pkg-config autoconf libmagic-dev libjpeg-dev libpng-dev cimg-dev libboost-filesystem-dev libboost-regex-dev gcovr + run: | + cd /build + ARCH=$(uname -m) ci/test-coverage.sh + + - name: Build, test and build AppImage (native) + if: matrix.ARCH != 'aarch64' && matrix.BUILD_TYPE != 'coverage' + run: bash -ex ci/build.sh + + - name: Build, test and build AppImage (VM) + if: matrix.ARCH != 'x86_64' && matrix.ARCH != 'i386' && matrix.BUILD_TYPE != 'coverage' + uses: uraimo/run-on-arch-action@v2.2.0 + with: + arch: ${{ matrix.ARCH }} + distro: ubuntu20.04 + githubToken: ${{ github.token }} + dockerRunArgs: | + --volume "${PWD}:/build" + install: | + apt-get update + apt-get install -y build-essential wget git pkg-config autoconf libmagic-dev libjpeg-dev libpng-dev cimg-dev libboost-filesystem-dev libboost-regex-dev gcovr run: | cd /build ARCH=$(uname -m) ci/build.sh - - name: Archive artifacts - uses: actions/upload-artifact@v2 - with: - name: AppImage aarch64 - path: linuxdeploy-plugin-appimage*.AppImage* - name: Archive artifacts uses: actions/upload-artifact@v2 diff --git a/ci/test-coverage.sh b/ci/test-coverage.sh index af0ac4f..07030e5 100755 --- a/ci/test-coverage.sh +++ b/ci/test-coverage.sh @@ -30,6 +30,10 @@ if [ "$ARCH" == "x86_64" ]; then EXTRA_CMAKE_ARGS=() elif [ "$ARCH" == "i386" ]; then EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake" "-DUSE_SYSTEM_CIMG=OFF") +elif [ "$ARCH" == "armhf" ]; then + EXTRA_CMAKE_ARGS=() +elif [ "$ARCH" == "aarch64" ]; then + EXTRA_CMAKE_ARGS=() else echo "Architecture not supported: $ARCH" 1>&2 exit 1