|
| 1 | +name: systemd 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: ['v5.8.0-stable', 'master'] |
| 24 | + openssl_ref: ['openssl-3.5.0'] |
| 25 | + |
| 26 | + test_systemd: |
| 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 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + systemd_ref: ['v254'] |
| 35 | + wolfssl_ref: ['v5.8.0-stable', 'master'] |
| 36 | + openssl_ref: ['openssl-3.5.0'] |
| 37 | + force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] |
| 38 | + steps: |
| 39 | + - name: Install dependencies |
| 40 | + run: | |
| 41 | + sudo apt-get update |
| 42 | + sudo apt-get install -y build-essential meson ninja-build \ |
| 43 | + libmount-dev gperf python3-pytest libuv1-dev libnghttp2-dev \ |
| 44 | + libcap-dev uuid-dev libdevmapper-dev libpopt-dev libjson-c-dev \ |
| 45 | + libssh-dev libargon2-dev libblkid-dev asciidoctor pkgconf \ |
| 46 | + zlib1g-dev |
| 47 | +
|
| 48 | + - name: Checkout wolfProvider |
| 49 | + uses: actions/checkout@v4 |
| 50 | + with: |
| 51 | + fetch-depth: 1 |
| 52 | + |
| 53 | + - name: Retrieving wolfSSL/wolfProvider from cache |
| 54 | + uses: actions/cache/restore@v4 |
| 55 | + id: wolfprov-cache |
| 56 | + with: |
| 57 | + path: | |
| 58 | + wolfssl-install |
| 59 | + wolfprov-install |
| 60 | + openssl-install/lib64 |
| 61 | + openssl-install/include |
| 62 | + openssl-install/bin |
| 63 | + key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} |
| 64 | + fail-on-cache-miss: true |
| 65 | + |
| 66 | + - name: Checkout systemd |
| 67 | + uses: actions/checkout@v4 |
| 68 | + with: |
| 69 | + repository: systemd/systemd |
| 70 | + path: systemd |
| 71 | + fetch-depth: 1 |
| 72 | + ref: ${{ matrix.systemd_ref }} |
| 73 | + |
| 74 | + - name: Build systemd |
| 75 | + working-directory: systemd |
| 76 | + run: | |
| 77 | + source $GITHUB_WORKSPACE/scripts/env-setup |
| 78 | + meson setup -Dnobody-group=nogroup build |
| 79 | + ninja -C build |
| 80 | +
|
| 81 | + - name: Run systemd tests |
| 82 | + working-directory: systemd |
| 83 | + run: | |
| 84 | + set +e |
| 85 | + source $GITHUB_WORKSPACE/scripts/env-setup |
| 86 | + # The following test cases link directly to libcrypto. |
| 87 | + TEST_CASES="fuzz-dns-packet fuzz-etc-hosts fuzz-resource-record \ |
| 88 | + resolvectl systemd-resolved test-cryptolib \ |
| 89 | + test-dns-packet test-dnssec test-resolve-tables \ |
| 90 | + test-resolved-etc-hosts test-resolved-packet \ |
| 91 | + test-resolved-stream" |
| 92 | + if [ -n ${{ matrix.force_fail }} ]; then |
| 93 | + export ${{ matrix.force_fail }} |
| 94 | + fi |
| 95 | + meson test -C build $TEST_CASES |
| 96 | + TEST_RESULT=$? |
| 97 | + $GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} systemd |
0 commit comments