|
| 1 | +name: rsync Tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [ 'master', 'main', 'release/**' ] |
| 5 | + pull_request: |
| 6 | + branches: [ '*' ] |
| 7 | + |
| 8 | +concurrency: |
| 9 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
| 12 | +jobs: |
| 13 | + build_wolfprovider: |
| 14 | + uses: ./.github/workflows/build-wolfprovider.yml |
| 15 | + with: |
| 16 | + wolfssl_ref: ${{ matrix.wolfssl_ref }} |
| 17 | + openssl_ref: ${{ matrix.openssl_ref }} |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + wolfssl_ref: [ 'master', 'v5.8.0-stable' ] |
| 21 | + openssl_ref: [ 'openssl-3.5.0' ] |
| 22 | + |
| 23 | + test_rsync: |
| 24 | + runs-on: ubuntu-22.04 |
| 25 | + needs: build_wolfprovider |
| 26 | + timeout-minutes: 15 |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + wolfssl_ref: [ 'master', 'v5.8.0-stable' ] |
| 30 | + openssl_ref: [ 'openssl-3.5.0' ] |
| 31 | + rsync_ref: [ 'master', 'v3.2.7' ] |
| 32 | + force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ] |
| 33 | + exclude: |
| 34 | + - rsync_ref: 'master' |
| 35 | + force_fail: 'WOLFPROV_FORCE_FAIL=1' |
| 36 | + steps: |
| 37 | + - name: Checkout wolfProvider |
| 38 | + uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + fetch-depth: 1 |
| 41 | + |
| 42 | + - name: Retrieving wolfSSL/wolfProvider from cache |
| 43 | + uses: actions/cache/restore@v4 |
| 44 | + id: wolfprov-cache |
| 45 | + with: |
| 46 | + path: | |
| 47 | + wolfssl-install |
| 48 | + wolfprov-install |
| 49 | + openssl-install/lib64 |
| 50 | + openssl-install/include |
| 51 | + openssl-install/bin |
| 52 | + key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} |
| 53 | + fail-on-cache-miss: true |
| 54 | + |
| 55 | + - name: Install rsync dependencies |
| 56 | + run: | |
| 57 | + sudo apt-get update |
| 58 | + sudo apt-get install -y gcc g++ gawk autoconf automake python3-cmarkgfm \ |
| 59 | + acl libacl1-dev attr libattr1-dev libxxhash-dev \ |
| 60 | + libzstd-dev liblz4-dev |
| 61 | +
|
| 62 | + - name: Checkout rsync |
| 63 | + uses: actions/checkout@v4 |
| 64 | + with: |
| 65 | + repository: RsyncProject/rsync |
| 66 | + path: rsync_repo |
| 67 | + ref: ${{ matrix.rsync_ref }} |
| 68 | + fetch-depth: 1 |
| 69 | + |
| 70 | + - name: Build and install rsync |
| 71 | + working-directory: rsync_repo |
| 72 | + run: | |
| 73 | + # Set up the environment for wolfProvider |
| 74 | + source $GITHUB_WORKSPACE/scripts/env-setup |
| 75 | + ./configure --disable-xxhash |
| 76 | +
|
| 77 | + # Run the patch script from wolfProvider |
| 78 | + $GITHUB_WORKSPACE/.github/scripts/add-rsync-sha-test.sh |
| 79 | +
|
| 80 | + make -j$(nproc) |
| 81 | + #export RSYNC_CHECKSUM_LIST="none" |
| 82 | + #This can disable file checksums which currently use rsycs own implementation of MD4 and MD5 |
| 83 | + #Causes a lot of tests in the make check to fail so im keeping it disabled |
| 84 | +
|
| 85 | + - name: Run rsync tests |
| 86 | + working-directory: rsync_repo |
| 87 | + run: | |
| 88 | + # Set up the environment for wolfProvider |
| 89 | + source $GITHUB_WORKSPACE/scripts/env-setup |
| 90 | + export ${{ matrix.force_fail }} |
| 91 | +
|
| 92 | + # Run rsync test suite including our SHA test |
| 93 | + make check 2>&1 | tee rsync-test.log |
| 94 | +
|
| 95 | + # Check test results - look for "0 failed" in the output |
| 96 | + if grep -q "overall result is 0" rsync-test.log; then |
| 97 | + TEST_RESULT=0 |
| 98 | + else |
| 99 | + TEST_RESULT=1 |
| 100 | + fi |
| 101 | +
|
| 102 | + $GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} rsync |
0 commit comments