diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aeb7ab4ac..99b5b71dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: configurations: [Debug, Release] - build_tests: [build_tests, build_library] + build: [library_and_tests, library] runs-on: ubuntu-latest env: # Configuration type to build. For documentation on how build matrices work, see @@ -38,7 +38,7 @@ jobs: - name: Build run: | mkdir build - if [ "${{matrix.build_tests}}" = "build_library" ]; then + if [ "${{matrix.build_tests}}" = "library" ]; then cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} -DVERIFIER_ENABLE_TESTS=OFF else cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} -DVERIFIER_ENABLE_TESTS=ON @@ -50,7 +50,7 @@ jobs: run: ./tests -d yes - name: Test for memory leaks - if: matrix.build_tests + if: ${{matrix.build == 'library_and_tests'}} # Any memory leaks will cause the test to fail # This BPF program was chosen because it is the largest one in the repo run: valgrind --leak-check=full --errors-for-leak-kinds=all --show-leak-kinds=all --error-exitcode=1 ./check ebpf-samples/cilium/bpf_xdp_snat_linux_v1.o 2/1 @@ -82,5 +82,5 @@ jobs: cmake --build build -j $(nproc) --config ${{env.BUILD_CONFIGURATION}} - name: Run unit tests - if: matrix.build_tests + if: ${{matrix.build == 'library_and_tests'}} run: ./${{env.BUILD_CONFIGURATION}}/tests -d yes