|
| 1 | +name: libeac3 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 | + build_wolfprovider: |
| 17 | + uses: ./.github/workflows/build-wolfprovider.yml |
| 18 | + with: |
| 19 | + wolfssl_ref: ${{ matrix.wolfssl_ref }} |
| 20 | + openssl_ref: ${{ matrix.openssl_ref }} |
| 21 | + strategy: |
| 22 | + matrix: |
| 23 | + wolfssl_ref: [ 'master', 'v5.8.0-stable' ] |
| 24 | + openssl_ref: [ 'openssl-3.5.0' ] |
| 25 | + |
| 26 | + test_libeac3: |
| 27 | + runs-on: ubuntu-22.04 |
| 28 | + needs: build_wolfprovider |
| 29 | + # This should be a safe limit for the tests to run. |
| 30 | + timeout-minutes: 20 |
| 31 | + strategy: |
| 32 | + matrix: |
| 33 | + openpace_ref: [ '1.1.3' ] # no master branch |
| 34 | + wolfssl_ref: [ 'master', 'v5.8.0-stable' ] |
| 35 | + openssl_ref: [ 'openssl-3.5.0' ] |
| 36 | + force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ] |
| 37 | + |
| 38 | + steps: |
| 39 | + # Checkout the source so we can run the check-workflow-result script. |
| 40 | + - name: Checkout wolfProvider |
| 41 | + uses: actions/checkout@v4 |
| 42 | + with: |
| 43 | + fetch-depth: 1 |
| 44 | + |
| 45 | + - name: Retrieving wolfProvider from cache |
| 46 | + uses: actions/cache/restore@v4 |
| 47 | + id: wolfprov-cache-restore |
| 48 | + with: |
| 49 | + path: | |
| 50 | + wolfssl-install |
| 51 | + wolfprov-install |
| 52 | + openssl-install/lib64 |
| 53 | + openssl-install/include |
| 54 | + openssl-install/bin |
| 55 | + key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} |
| 56 | + fail-on-cache-miss: true |
| 57 | + |
| 58 | + - name: Install libeac3 dependencies |
| 59 | + run: | |
| 60 | + sudo apt-get update |
| 61 | + sudo apt-get install -y autoconf automake libtool libc6 help2man gengetopt pkg-config m4 libeac3 |
| 62 | +
|
| 63 | + - name: Checkout openpace |
| 64 | + uses: actions/checkout@v4 |
| 65 | + with: |
| 66 | + repository: frankmorgner/openpace |
| 67 | + ref: ${{ matrix.openpace_ref }} |
| 68 | + path: openpace |
| 69 | + fetch-depth: 1 |
| 70 | + |
| 71 | + - name: Checkout OSP |
| 72 | + uses: actions/checkout@v4 |
| 73 | + with: |
| 74 | + repository: wolfSSL/osp |
| 75 | + path: osp |
| 76 | + fetch-depth: 1 |
| 77 | + - run: | |
| 78 | + cd openpace |
| 79 | + patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/openpace/openpace-${{ matrix.openpace_ref }}-wolfprov.patch |
| 80 | +
|
| 81 | + - name: Build openpace |
| 82 | + working-directory: openpace |
| 83 | + run: | |
| 84 | + autoreconf --verbose --install |
| 85 | + ./configure |
| 86 | + make |
| 87 | + sudo make install |
| 88 | +
|
| 89 | + - name: Run libeac3 tests |
| 90 | + working-directory: openpace |
| 91 | + run: | |
| 92 | + echo "Setting environment variables..." |
| 93 | + source $GITHUB_WORKSPACE/scripts/env-setup |
| 94 | + export ${{ matrix.force_fail }} |
| 95 | + ./src/eactest > libeac3-test.log || echo "eactest failed with exit code $?" |
| 96 | + cat libeac3-test.log |
| 97 | +
|
| 98 | + if grep -q "Everything works as expected." libeac3-test.log; then |
| 99 | + TEST_RESULT=0 |
| 100 | + else |
| 101 | + TEST_RESULT=1 |
| 102 | + fi |
| 103 | + $GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} libeac3 |
0 commit comments