ci: ORAS-backed OpenSSL/wolfSSL dep cache for from-source builders (#… #2428
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Simple Tests | |
| # START OF COMMON SECTION | |
| on: | |
| push: | |
| branches: [ 'master', 'main', 'release/**' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE*' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/dependabot.yml' | |
| - '.gitignore' | |
| - 'AUTHORS' | |
| - 'COPYING' | |
| - 'README*' | |
| - 'CHANGELOG*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # END OF COMMON SECTION | |
| jobs: | |
| discover_versions: | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| uses: ./.github/workflows/_discover-versions.yml | |
| simple_test: | |
| needs: discover_versions | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| name: Simple Test | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 2 wolfssl (master + latest-stable, resolved at run time) x | |
| # 2 openssl (latest upstream release + oldest 3.0.x LTS) | |
| # x 2 replace-default = 8 jobs. | |
| wolfssl_ref: ${{ fromJson(needs.discover_versions.outputs.wolfssl_latest_ref_array) }} | |
| openssl_ref: | |
| - ${{ needs.discover_versions.outputs.openssl_latest_ref }} | |
| - openssl-3.0.17 | |
| debug: [''] | |
| replace_default: [ | |
| '', | |
| '--replace-default --enable-replace-default-testing'] | |
| steps: | |
| - name: Checkout wolfProvider | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Cache build dependencies | |
| id: deps | |
| uses: ./.github/actions/oras-build-deps | |
| with: | |
| variant: simple${{ matrix.debug != '' && '-debug' || '' }}${{ matrix.replace_default != '' && '-rd' || '' }} | |
| openssl_ref: ${{ matrix.openssl_ref }} | |
| wolfssl_ref: ${{ matrix.wolfssl_ref }} | |
| cache_openssl_source: ${{ matrix.replace_default != '' }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and test wolfProvider | |
| run: | | |
| OPENSSL_TAG=${{ matrix.openssl_ref }} \ | |
| WOLFSSL_TAG=${{ matrix.wolfssl_ref }} \ | |
| ./scripts/build-wolfprovider.sh ${{ matrix.debug }} ${{ matrix.replace_default }} | |
| - name: Push build dependencies | |
| uses: ./.github/actions/oras-build-deps-push | |
| with: | |
| registry: ${{ steps.deps.outputs.registry }} | |
| openssl_install_tag: ${{ steps.deps.outputs.openssl_install_tag }} | |
| wolfssl_install_tag: ${{ steps.deps.outputs.wolfssl_install_tag }} | |
| openssl_source_tag: ${{ steps.deps.outputs.openssl_source_tag }} | |
| openssl_hit: ${{ steps.deps.outputs.openssl_hit }} | |
| wolfssl_hit: ${{ steps.deps.outputs.wolfssl_hit }} | |
| openssl_source_hit: ${{ steps.deps.outputs.openssl_source_hit }} | |
| cache_openssl_source: ${{ steps.deps.outputs.cache_openssl_source }} | |
| - name: Print errors | |
| if: ${{ failure() }} | |
| run: | | |
| if [ -f test-suite.log ] ; then | |
| cat test-suite.log | |
| fi |