name: Unit tests Linux on: push: branches: - develop - master pull_request: schedule: - cron: '0 0 1 * *' jobs: Linux: name: Ubuntu 18.04 runs-on: ubuntu-18.04 strategy: fail-fast: false matrix: compiler: [clang++, g++, libc++, arm-linux-gnueabihf-g++] configuration: [error_code, status_code] env: NAME: Linux-${{ matrix.configuration }}-${{ matrix.compiler }} CXX: ${{ matrix.compiler }} steps: - uses: actions/checkout@v2 - name: CMake tests Linux shell: bash run: | sudo apt-get remove -y libstdc++-10-dev g++-10 gcc-10 sudo apt-get autoremove if [ "${{ matrix.compiler }}" = "libc++" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -; sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main"; sudo apt update; sudo apt install clang-11 libc++-11-dev libc++abi-11-dev libomp-11-dev; export CMAKE_CONFIGURE_OPTIONS="-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-libc++.cmake"; fi if [ "${{ matrix.configuration }}" = "status_code" ]; then export CMAKE_CONFIGURE_OPTIONS="$CMAKE_CONFIGURE_OPTIONS;-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON"; fi if [ "${{ matrix.compiler }}" = "arm-linux-gnueabihf-g++" ]; then sudo apt install g++-arm-linux-gnueabihf; ctest -S .ci.cmake -VV --timeout 900 -DCTEST_DISABLE_TESTING=1 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS;-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-arm.cmake"; else ctest -S .ci.cmake -VV --timeout 900 "-DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS"; fi - name: Upload Prebuilt Binaries uses: actions/upload-artifact@v2 with: name: Linux ${{ matrix.configuration }} ${{ matrix.compiler }} prebuilt binaries path: llfio-v2.0-binaries-linux-*.tgz - name: Upload Test Results if: ${{ matrix.compiler != 'arm-linux-gnueabihf-g++' }} uses: actions/upload-artifact@v2 with: name: Linux ${{ matrix.configuration }} ${{ matrix.compiler }} test results path: prebuilt/merged_junit_results.xml publish-test-results: name: "Publish Unit Tests Results" needs: [Linux] runs-on: ubuntu-latest if: success() || failure() steps: - name: Download Artifacts uses: actions/download-artifact@v2 with: path: artifacts - name: Publish Unit Test Results uses: EnricoMi/publish-unit-test-result-action@v1.6 with: check_name: Unit Test Results github_token: ${{ secrets.GITHUB_TOKEN }} files: '**/merged_junit_results.xml'