.NET Runtime OpenSSL CI #61
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: .NET Runtime OpenSSL 3.5 CI | |
| on: | |
| schedule: | |
| - cron: '0 13 * * 1-5' | |
| workflow_dispatch: | |
| inputs: | |
| openssl_ref: | |
| type: string | |
| description: openssl/openssl Branch | |
| required: true | |
| default: 'openssl-3.5' | |
| runtime_ref: | |
| type: string | |
| description: dotnet/runtime Branch | |
| required: true | |
| default: 'main' | |
| push: | |
| paths: | |
| - '.github/workflows/ci.yml' | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| permissions: | |
| actions: write | |
| contents: read | |
| issues: write | |
| packages: read | |
| jobs: | |
| run: | |
| runs-on: ubuntu-24.04-arm | |
| container: | |
| image: ghcr.io/vcsjones/runtime-ci:main | |
| steps: | |
| - name: Checkout .NET Runtime | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: dotnet/runtime | |
| path: runtime | |
| ref: ${{ inputs.runtime_ref || 'main' }} | |
| - name: Checkout OpenSSL | |
| uses: actions/checkout@v4 | |
| id: checkout-openssl | |
| with: | |
| repository: openssl/openssl | |
| path: openssl | |
| ref: ${{ inputs.openssl_ref || 'openssl-3.5' }} | |
| - name: OpenSSL Build Cache | |
| id: openssl-build-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/openssl | |
| !${{ github.workspace }}/openssl/.git | |
| key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.checkout-openssl.outputs.commit }}-openssl | |
| - name: Build OpenSSL | |
| if: steps.openssl-build-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd $GITHUB_WORKSPACE/openssl | |
| ./Configure -shared --prefix=/opt/openssl --openssldir=/opt/openssl | |
| make -j 4 | |
| - name: Install OpenSSL | |
| run: | | |
| cd $GITHUB_WORKSPACE/openssl | |
| make install_sw | |
| - name: Build .NET | |
| env: | |
| OPENSSL_ROOT_DIR: /opt/openssl | |
| run: | | |
| cd $GITHUB_WORKSPACE/runtime | |
| ./build.sh -rc release -s clr+libs /p:NativeOptimizationDataSupported=false | |
| - name: .NET Cryptography Tests | |
| env: | |
| LD_LIBRARY_PATH: /opt/openssl/lib | |
| OPENSSL_ROOT_DIR: /opt/openssl | |
| run: | | |
| cd $GITHUB_WORKSPACE/runtime | |
| ./dotnet.sh test src/libraries/System.Security.Cryptography/tests | |
| SSC_RESULT=$? | |
| ./dotnet.sh test src/libraries/Microsoft.Bcl.Cryptography/tests | |
| MBC_RESULT=$? | |
| echo "SSC_RESULT: $SSC_RESULT; MBC_RESULT: $MBC_RESULT" | |
| if [ $SSC_RESULT -ne 0 ] || [ $MBC_RESULT -ne 0 ]; then | |
| exit 1 | |
| else | |
| exit 0 | |
| fi | |
| - name: Upload Test Results | |
| if: ${{ success() || failure() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/runtime/artifacts/bin/**/TestResults/ | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| - name: Open Failure Issue | |
| if: ${{ failure() && (!inputs.runtime_ref || inputs.runtime_ref == 'main') }} | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| await github.rest.issues.create({ | |
| owner: "vcsjones", | |
| repo: "runtime-ci", | |
| title: "Build Failure for run ${{ github.run_id }}", | |
| body: "There was a CI build failure. Go look at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", | |
| }); |