diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index c931129..b9286e1 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -21,13 +21,15 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: cache externals restore id: cache-externals-restore if: matrix.libressl - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: build/external/libressl/install key: ${{ matrix.os }}-externals-${{ hashFiles('external/CMakeLists.txt') }} + - name: configure externals if: matrix.libressl && (steps.cache-externals-restore.outputs.cache-hit != 'true') run: > @@ -37,16 +39,18 @@ jobs: -DCMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} -B build/external -S external + - name: build externals if: matrix.libressl && (steps.cache-externals-restore.outputs.cache-hit != 'true') run: cmake --build build/external --config ${{ matrix.build_type }} + - name: cache externals save - id: cache-externals-save - if: matrix.libressl - uses: actions/cache/save@v3 + if: matrix.libressl && (steps.cache-externals-restore.outputs.cache-hit != 'true') + uses: actions/cache/save@v4 with: path: build/external/libressl/install key: ${{ steps.cache-externals-restore.outputs.cache-primary-key }} + - name: configure run: > cmake @@ -60,14 +64,17 @@ jobs: ${{ matrix.libressl }} -B build -S . + - name: build and install run: cmake --build build --target install --config ${{ matrix.build_type }} + - name: zip uses: vimtor/action-zip@v1.2 with: files: > build/install/ dest: ${{ matrix.release_zip }} + - name: release uses: softprops/action-gh-release@v2 with: diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 0e7452f..9766f15 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -53,13 +53,15 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: cache externals restore id: cache-externals-restore if: matrix.libressl - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: build/external/libressl/install key: ${{ matrix.os }}-externals-${{ hashFiles('external/CMakeLists.txt') }} + - name: configure externals if: matrix.libressl && (steps.cache-externals-restore.outputs.cache-hit != 'true') run: > @@ -68,16 +70,18 @@ jobs: -S external ${{ matrix.generator }} -DCMAKE_BUILD_TYPE:STRING=${{ matrix.type }} + - name: build externals if: matrix.libressl && (steps.cache-externals-restore.outputs.cache-hit != 'true') run: cmake --build build/external --config ${{ matrix.type }} + - name: cache externals save - id: cache-externals-save - if: matrix.libressl - uses: actions/cache/save@v3 + if: matrix.libressl && (steps.cache-externals-restore.outputs.cache-hit != 'true') + uses: actions/cache/save@v4 with: path: build/external/libressl/install key: ${{ steps.cache-externals-restore.outputs.cache-primary-key }} + - name: configure library run: > cmake @@ -88,8 +92,10 @@ jobs: -DWITH_TLS:BOOL=ON ${{ matrix.libressl }} -DCMAKE_BUILD_TYPE:STRING=${{ matrix.type }} + - name: build library run: cmake --build build --config ${{ matrix.type }} + - name: build & run tests env: CTEST_OUTPUT_ON_FAILURE: 1