|
| 1 | +name: Test Runner |
| 2 | + |
| 3 | +on: push |
| 4 | + |
| 5 | +jobs: |
| 6 | + Run-Test-Clang: |
| 7 | + name: "Run-Tests-Clang" |
| 8 | + runs-on: ubuntu-latest |
| 9 | + |
| 10 | + steps: |
| 11 | + - name: Checkout |
| 12 | + uses: actions/checkout@v2 |
| 13 | + with: |
| 14 | + submodules: recursive |
| 15 | + |
| 16 | + - name: Install Qt |
| 17 | + uses: jurplel/install-qt-action@v2 |
| 18 | + with: |
| 19 | + version: '6.2.1' |
| 20 | + |
| 21 | + - name: Install clang 12 |
| 22 | + run: | |
| 23 | + sudo apt-get update |
| 24 | + sudo apt-get install clang-12 llvm-12 |
| 25 | + |
| 26 | + - name: Test |
| 27 | + run: | |
| 28 | + mkdir build |
| 29 | + cd build |
| 30 | + cmake .. -DCMAKE_CXX_COMPILER=clang++-12 |
| 31 | + cmake --build . --target all |
| 32 | + ctest --no-tests=error . |
| 33 | + |
| 34 | + Run-Test-MSCV: |
| 35 | + name: "Run-Tests-MSCV" |
| 36 | + runs-on: windows-latest |
| 37 | + |
| 38 | + steps: |
| 39 | + - name: Checkout |
| 40 | + uses: actions/checkout@v2 |
| 41 | + with: |
| 42 | + submodules: recursive |
| 43 | + |
| 44 | + - name: Install Qt |
| 45 | + uses: jurplel/install-qt-action@v2 |
| 46 | + with: |
| 47 | + version: '6.2.1' |
| 48 | + |
| 49 | + - name: Install Tools Ninja and mvsc |
| 50 | + uses: ilammy/msvc-dev-cmd@v1 |
| 51 | + - uses: seanmiddleditch/gha-setup-ninja@master |
| 52 | + |
| 53 | + - name: Test |
| 54 | + run: | |
| 55 | + mkdir build |
| 56 | + cd build |
| 57 | + cmake .. -GNinja |
| 58 | + cmake --build . --target all |
| 59 | + $env:Path += ";${{ github.workspace }}/build/third_party/glog;${{ github.workspace }}/build/bin;" |
| 60 | + ctest --rerun-failed --output-on-failure --no-tests=error . |
| 61 | + |
| 62 | + # Static-Analyse-Clang: |
| 63 | + # name: "Static-Analyse-Clang" |
| 64 | + # runs-on: ubuntu-latest |
| 65 | + |
| 66 | + # steps: |
| 67 | + # - name: Checkout |
| 68 | + # uses: actions/checkout@v2 |
| 69 | + # with: |
| 70 | + # submodules: recursive |
| 71 | + |
| 72 | + # - name: Install clang 12 |
| 73 | + # run: | |
| 74 | + # sudo apt-get update |
| 75 | + # sudo apt-get install clang-12 llvm-12 |
| 76 | + |
| 77 | + # - name: Test |
| 78 | + # run: | |
| 79 | + # mkdir build |
| 80 | + # cd build |
| 81 | + # cmake .. -DCMAKE_CXX_FLAGS="-fsized-deallocation --analyze" -DCMAKE_CXX_COMPILER=clang++-12 |
| 82 | + # cmake --build . --target all |
| 83 | + |
| 84 | +# cpp-check: |
| 85 | +# name: cppcheck-test |
| 86 | +# runs-on: ubuntu-latest |
| 87 | +# steps: |
| 88 | +# - uses: actions/checkout@v2 |
| 89 | +# |
| 90 | +# - name: cppcheck |
| 91 | +# uses: deep5050/cppcheck-action@main |
| 92 | +# |
| 93 | +# - name: Upload report |
| 94 | +# uses: actions/upload-artifact@v1 |
| 95 | +# with: |
| 96 | +# name: report |
| 97 | +# path: output |
0 commit comments