|
| 1 | +name: Replace Default Tests |
| 2 | + |
| 3 | +# START OF COMMON SECTION |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ 'master', 'main', 'release/**' ] |
| 7 | + pull_request: |
| 8 | + branches: [ '*' ] |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | +# END OF COMMON SECTION |
| 14 | + |
| 15 | +jobs: |
| 16 | + replace_default_test: |
| 17 | + name: Replace Default Test |
| 18 | + runs-on: ubuntu-22.04 |
| 19 | + timeout-minutes: 30 |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + # Test both standard and replace-default builds |
| 23 | + replace_default: ['', '--replace-default'] |
| 24 | + # Test with stable versions |
| 25 | + wolfssl_ref: ['v5.8.0-stable'] |
| 26 | + openssl_ref: ['openssl-3.5.0'] |
| 27 | + steps: |
| 28 | + - name: Checkout wolfProvider |
| 29 | + uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + fetch-depth: 1 |
| 32 | + |
| 33 | + - name: Build wolfProvider ${{ matrix.replace_default && 'with replace-default' || 'standard' }} |
| 34 | + run: | |
| 35 | + OPENSSL_TAG=${{ matrix.openssl_ref }} \ |
| 36 | + WOLFSSL_TAG=${{ matrix.wolfssl_ref }} \ |
| 37 | + ./scripts/build-wolfprovider.sh ${{ matrix.replace_default }} |
| 38 | +
|
| 39 | + - name: Run standalone test suite |
| 40 | + run: | |
| 41 | + ./test/standalone/runners/run_standalone_tests.sh |
| 42 | +
|
| 43 | + - name: Print errors on failure |
| 44 | + if: ${{ failure() }} |
| 45 | + run: | |
| 46 | + # Build failure log |
| 47 | + if [ -f scripts/build-release.log ]; then |
| 48 | + echo "=== Build log (last 50 lines) ===" |
| 49 | + tail -n 50 scripts/build-release.log |
| 50 | + fi |
| 51 | +
|
| 52 | + # Test suite failure log |
| 53 | + if [ -f test-suite.log ]; then |
| 54 | + echo "=== Test suite log ===" |
| 55 | + cat test-suite.log |
| 56 | + fi |
| 57 | +
|
| 58 | + # Standalone test failures |
| 59 | + if [ -d test/standalone/runners/test_results ]; then |
| 60 | + for log in test/standalone/runners/test_results/*.log; do |
| 61 | + if [ -f "$log" ]; then |
| 62 | + echo "=== $log ===" |
| 63 | + cat "$log" |
| 64 | + fi |
| 65 | + done |
| 66 | + fi |
0 commit comments