|
| 1 | +name: Main Workflow |
| 2 | +on: [push, pull_request] |
| 3 | +env: |
| 4 | + LLVM_VERSION: 13 |
| 5 | +jobs: |
| 6 | + debug: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + toolchain: ['clang', 'gcc'] |
| 11 | + include: |
| 12 | + - toolchain: gcc |
| 13 | + c-compiler: gcc |
| 14 | + cxx-compiler: g++ |
| 15 | + - toolchain: clang |
| 16 | + c-compiler: clang |
| 17 | + cxx-compiler: clang++ |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v2 |
| 20 | + - run: | |
| 21 | + wget https://apt.llvm.org/llvm.sh |
| 22 | + chmod +x llvm.sh |
| 23 | + sudo ./llvm.sh $LLVM_VERSION |
| 24 | + sudo apt update -y && sudo apt upgrade -y |
| 25 | + sudo apt-get -y install gcc-multilib g++-multilib clang-tidy-$LLVM_VERSION |
| 26 | + sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$LLVM_VERSION 50 |
| 27 | + clang-tidy --version |
| 28 | + - run: > |
| 29 | + cmake |
| 30 | + -B ${{ github.workspace }}/build |
| 31 | + -DCMAKE_BUILD_TYPE=Debug |
| 32 | + -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} |
| 33 | + -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }} |
| 34 | + tests |
| 35 | + - working-directory: ${{github.workspace}}/build |
| 36 | + run: | |
| 37 | + make VERBOSE=1 |
| 38 | + make test |
| 39 | + - uses: actions/upload-artifact@v2 |
| 40 | + if: always() |
| 41 | + with: |
| 42 | + name: ${{github.job}} |
| 43 | + path: ${{github.workspace}}/**/* |
| 44 | + retention-days: 2 |
| 45 | + |
| 46 | + optimizations: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + strategy: |
| 49 | + matrix: |
| 50 | + toolchain: ['clang', 'gcc'] |
| 51 | + build_type: [Release, MinSizeRel] |
| 52 | + include: |
| 53 | + - toolchain: gcc |
| 54 | + c-compiler: gcc |
| 55 | + cxx-compiler: g++ |
| 56 | + - toolchain: clang |
| 57 | + c-compiler: clang |
| 58 | + cxx-compiler: clang++ |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v2 |
| 61 | + - run: | |
| 62 | + sudo apt update -y && sudo apt upgrade -y |
| 63 | + sudo apt install gcc-multilib g++-multilib |
| 64 | + - run: > |
| 65 | + cmake |
| 66 | + -B ${{ github.workspace }}/build |
| 67 | + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} |
| 68 | + -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} |
| 69 | + -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }} |
| 70 | + -DNO_STATIC_ANALYSIS=1 |
| 71 | + tests |
| 72 | + - working-directory: ${{github.workspace}}/build |
| 73 | + run: | |
| 74 | + make VERBOSE=1 |
| 75 | + make test |
| 76 | + - uses: actions/upload-artifact@v2 |
| 77 | + if: always() |
| 78 | + with: |
| 79 | + name: ${{github.job}} |
| 80 | + path: ${{github.workspace}}/**/* |
| 81 | + retention-days: 2 |
0 commit comments