testsuite.yaml (3932B)
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 add-apt-repository ppa:ubuntu-toolchain-r/test 33 sudo apt update 34 sudo apt install -y --no-install-recommends gcc-${{ matrix.version }} g++-${{ matrix.version }} 35 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} 100 36 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} 100 37 - name: Build with native chk 38 if: ${{ matrix.use_native_chk == true }} 39 run: make CFLAGS=-DUSE_NATIVE_CHK -C tests gcc 40 - name: Build without native chk, and run the testsuite 41 if: ${{ matrix.use_native_chk == false }} 42 shell: bash 43 run: | 44 make -C tests clean gcc run > ./results.txt 45 grep -zvq 'FAIL' ./results.txt 46 47 clang: 48 runs-on: ubuntu-latest 49 strategy: 50 matrix: 51 version: [13, 14, 15] 52 use_native_chk: [true, false] 53 steps: 54 - name: Checking out the code 55 uses: actions/checkout@v3 56 - name: Cache musl toolchain 57 uses: actions/cache@v3 58 id: cache-musl 59 with: 60 path: x86_64-linux-musl-native 61 key: musl 62 - name: Downloading musl-based toolchain 63 if: steps.cache-musl.outputs.cache-hit != 'true' 64 run: wget --quiet https://musl.cc/x86_64-linux-musl-native.tgz 65 - name: Extracting musl-based toolchain 66 if: steps.cache-musl.outputs.cache-hit != 'true' 67 run: tar xzf ./x86_64-linux-musl-native.tgz 68 - name: Setting up clang version 69 run: | 70 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.version }} 100 71 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ matrix.version }} 100 72 - name: Build with native chk 73 if: ${{ matrix.use_native_chk == true }} 74 run: make CFLAGS=-DUSE_NATIVE_CHK -C tests clang 75 - name: Building and running without native chk 76 if: ${{ matrix.use_native_chk == false }} 77 shell: bash 78 run: | 79 make -C tests clean clang run > ./results.txt 80 grep -zvq 'FAIL' ./results.txt 81 82 c_versions: 83 runs-on: ubuntu-latest 84 strategy: 85 matrix: 86 version: ["c89", "c99", "c11", "c17"] 87 steps: 88 - name: Checking out the code 89 uses: actions/checkout@v3 90 - name: Cache musl toolchain 91 uses: actions/cache@v3 92 id: cache-musl 93 with: 94 path: x86_64-linux-musl-native 95 key: musl 96 - name: Downloading musl-based toolchain 97 if: steps.cache-musl.outputs.cache-hit != 'true' 98 run: wget --quiet https://musl.cc/x86_64-linux-musl-native.tgz 99 - name: Extracting musl-based toolchain 100 if: steps.cache-musl.outputs.cache-hit != 'true' 101 run: tar xzf ./x86_64-linux-musl-native.tgz 102 - name: Building with clang 103 shell: bash 104 run: make CFLAGS=-std=${{ matrix.version }} -C tests clean clang 105 - name: Building with gcc 106 shell: bash 107 run: make CFLAGS=-std=${{ matrix.version }} -C tests clean gcc