From dd78ed23e86a1848ec1a7ef26da5d17977886925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20B=C3=BChler?= Date: Tue, 10 Jan 2023 12:07:13 +0100 Subject: [PATCH] use cmake to build an run test This does it in a cross platform manor. --- .github/workflows/cmake.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 5018fd2af..96b4f36dc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -31,7 +31,7 @@ jobs: cmake-crypto-enable: "-DENABLE_MBEDTLS=ON" runs-on: ${{ matrix.os }} - + env: CTEST_OUTPUT_ON_FAILURE: 1 @@ -41,23 +41,23 @@ jobs: run: | sudo apt-get update sudo apt-get install libnss3-dev - + - name: Setup Ubuntu MbedTLS if: matrix.os == 'ubuntu-20.04' && matrix.crypto == 'mbedtls' run: sudo apt-get install libmbedtls-dev - + - name: Setup macOS OpenSSL if: matrix.os == 'macos-latest' && matrix.crypto == 'openssl' run: echo "cmake-crypto-dir=-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1)" >> $GITHUB_ENV - + - name: Setup macOS NSS if: matrix.os == 'macos-latest' && matrix.crypto == 'nss' run: brew install nss - + - name: Setup macOS MbedTLS if: matrix.os == 'macos-latest' && matrix.crypto == 'mbedtls' run: brew install mbedtls - + - uses: actions/checkout@v2 - name: Create Build Environment @@ -82,6 +82,5 @@ jobs: working-directory: ${{github.workspace}}/build shell: bash run: | - make clean - make C_FLAGS="-DSRTP_NO_STREAM_LIST -DSRTP_USE_TEST_STREAM_LIST" srtp_driver - ./srtp_driver -v + cmake --build . --clean-first -t srtp_driver -- C_FLAGS="-DSRTP_NO_STREAM_LIST -DSRTP_USE_TEST_STREAM_LIST" + ctest -R srtp_driver