Skip to content

Commit

Permalink
use cmake to build an run test
Browse files Browse the repository at this point in the history
This does it in a cross platform manor.
  • Loading branch information
pabuhler committed Jan 10, 2023
1 parent 914cb55 commit dd78ed2
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cmake-crypto-enable: "-DENABLE_MBEDTLS=ON"

runs-on: ${{ matrix.os }}

env:
CTEST_OUTPUT_ON_FAILURE: 1

Expand All @@ -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
Expand All @@ -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

0 comments on commit dd78ed2

Please sign in to comment.