|
| 1 | +name: Test 7380 |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "7380-fix-test" |
| 7 | + |
| 8 | +env: |
| 9 | + QT_VERSION: 5.12.12 |
| 10 | + |
| 11 | +jobs: |
| 12 | + build_linux: |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + configuration: [Debug, Release] |
| 16 | + compiler: [gcc-9] |
| 17 | + cmake_options: [""] |
| 18 | + name: Linux |
| 19 | + runs-on: ubuntu-latest |
| 20 | + container: ghcr.io/scp-fs2open/linux_build:sha-71099c9 |
| 21 | + steps: |
| 22 | + - name: Install Qt dependencies |
| 23 | + run: apt-get -yq update && apt-get -yq install libfontconfig1 |
| 24 | + - uses: actions/checkout@v1 |
| 25 | + name: Checkout |
| 26 | + with: |
| 27 | + submodules: true |
| 28 | + fetch-depth: 0 |
| 29 | + - name: ccache |
| 30 | + uses: hendrikmuhs/ccache-action@v1 |
| 31 | + with: |
| 32 | + key: ${{ runner.os }}-${{ matrix.configuration }}-${{ matrix.compiler }} |
| 33 | + save: false # Caches are created by a separate job and only restored for PRs |
| 34 | + verbose: 1 |
| 35 | + - name: Configure ccache |
| 36 | + run: ccache --set-config=sloppiness=pch_defines,time_macros |
| 37 | + - name: Configure CMake |
| 38 | + env: |
| 39 | + CONFIGURATION: ${{ matrix.configuration }} |
| 40 | + COMPILER: ${{ matrix.compiler }} |
| 41 | + JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }} |
| 42 | + CCACHE_PATH: /usr/local/bin/ccache |
| 43 | + ENABLE_QTFRED: ON |
| 44 | + Qt5_DIR: /qt/${{ env.QT_VERSION }}/gcc_64/lib/cmake/Qt5 |
| 45 | + run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh |
| 46 | + - name: Compile |
| 47 | + working-directory: ./build |
| 48 | + run: LD_LIBRARY_PATH=$Qt5_DIR/lib:$LD_LIBRARY_PATH ninja -k 20 all |
| 49 | + - name: Run Tests |
| 50 | + working-directory: ./build |
| 51 | + env: |
| 52 | + CONFIGURATION: ${{ matrix.configuration }} |
| 53 | + XDG_RUNTIME_DIR: /root |
| 54 | + run: $GITHUB_WORKSPACE/ci/linux/run_tests.sh |
| 55 | + - name: Show CCache statistics |
| 56 | + run: ccache --show-stats |
| 57 | + - name: Run Clang Tidy |
| 58 | + # Clang-tidy reuses the precompiled headers so this only makes sense for the clang compilers |
| 59 | + if: startsWith(matrix.compiler, 'clang-') |
| 60 | + run: $GITHUB_WORKSPACE/ci/linux/clang_tidy.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} |
| 61 | + - name: Process clang-tidy warnings |
| 62 | + if: startsWith(matrix.compiler, 'clang-') |
| 63 | + uses: asarium/clang-tidy-action@v1 |
| 64 | + with: |
| 65 | + fixesFile: clang-fixes.yaml |
0 commit comments