From 01831ce2fa58d06400d4a3db381508788109821c Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Sat, 4 Jan 2025 16:46:31 -0500 Subject: [PATCH] Update build-and-test.yml Signed-off-by: Ben Collins --- .github/workflows/build-and-test.yml | 53 ++++++++++++---------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 721fb8ba..ca171b23 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,4 +1,4 @@ -name: Build and Coverage +name: LibJWT Unit Tests, Coverage, and Docs on: push: @@ -11,47 +11,38 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 + - uses: ConorMacBride/install-package@v1 with: - brew: gnutls openssl@3 jansson pkgconf cmake doxygen graphviz - - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build - - - name: Build - working-directory: ${{github.workspace}}/build - run: make + brew: gnutls openssl@3 jansson pkgconf cmake check - - name: Unit Tests - working-directory: ${{github.workspace}}/build - run: make check - - - name: Documents - working-directory: ${{github.workspace}}/build - run: make doxygen-doc + - name: Build, Test, and Docs + uses: threeal/cmake-action@v2.1.0 + with: + options: | + WITH_OPENSSL=YES + WITH_GNUTLS=YES + WITH_TESTS=YES + build-args: | + -- + check build-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ConorMacBride/install-package@v1 with: apt: gnutls-dev libssl-dev libjansson-dev pkg-config check lcov valgrind - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -ENABLE_COVERAGE=YES - - - name: Build - working-directory: ${{github.workspace}}/build - run: make - - - name: Unit Tests - working-directory: ${{github.workspace}}/build - run: make check - - - name: Code Coverage - working-directory: ${{github.workspace}}/build - run: make check-code-coverage + - name: Build, Test, and Coverage + uses: threeal/cmake-action@v2.1.0 + with: + options: | + ENABLE_COVERAGE=YES + build-args: | + -- + check + check-code-coverage - uses: codecov/codecov-action@v5.1.2 with: