testsuite.yaml (2797B)
1 name: Test suite 2 on: 3 pull_request: 4 push: 5 schedule: 6 - cron: '0 16 * * 5' 7 8 jobs: 9 gcc: 10 runs-on: ubuntu-latest 11 strategy: 12 matrix: 13 version: [9, 10, 11, 12, 13] 14 use_native_chk: [true, false] 15 steps: 16 - name: Checking out the code 17 uses: actions/checkout@v3 18 - name: Cache musl toolchain 19 uses: actions/cache@v3 20 id: cache-musl 21 with: 22 path: x86_64-linux-musl-native 23 key: musl 24 - name: Downloading musl-based toolchain 25 if: steps.cache-musl.outputs.cache-hit != 'true' 26 run: wget --quiet https://musl.cc/x86_64-linux-musl-native.tgz 27 - name: Extracting musl-based toolchain 28 if: steps.cache-musl.outputs.cache-hit != 'true' 29 run: tar xzf ./x86_64-linux-musl-native.tgz 30 - name: Setting up gcc version 31 run: | 32 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} 100 33 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} 100 34 - name: Build with native chk 35 if: ${{ matrix.use_native_chk == true }} 36 run: make CFLAGS=-DUSE_NATIVE_CHK -C tests gcc 37 - name: Build without native chk, and run the testsuite 38 if: ${{ matrix.use_native_chk == false }} 39 shell: bash 40 run: | 41 make -C tests clean gcc run > ./results.txt 42 grep -zvq 'FAIL' ./results.txt 43 44 clang: 45 runs-on: ubuntu-latest 46 strategy: 47 matrix: 48 version: [13, 14, 15] 49 use_native_chk: [true, false] 50 steps: 51 - name: Checking out the code 52 uses: actions/checkout@v3 53 - name: Cache musl toolchain 54 uses: actions/cache@v3 55 id: cache-musl 56 with: 57 path: x86_64-linux-musl-native 58 key: musl 59 - name: Downloading musl-based toolchain 60 if: steps.cache-musl.outputs.cache-hit != 'true' 61 run: wget --quiet https://musl.cc/x86_64-linux-musl-native.tgz 62 - name: Extracting musl-based toolchain 63 if: steps.cache-musl.outputs.cache-hit != 'true' 64 run: tar xzf ./x86_64-linux-musl-native.tgz 65 - name: Setting up clang version 66 run: | 67 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.version }} 100 68 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ matrix.version }} 100 69 - name: Build with native chk 70 if: ${{ matrix.use_native_chk == true }} 71 run: make CFLAGS=-DUSE_NATIVE_CHK -C tests clang 72 - name: Building and running without native chk 73 if: ${{ matrix.use_native_chk == false }} 74 shell: bash 75 run: | 76 make -C tests clean clang run > ./results.txt 77 grep -zvq 'FAIL' ./results.txt