Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/scripts/check-workflow-result.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then

# Define expected failures based on curl version
case "$CURL_VERSION" in
"curl-7_88_1")
EXPECTED_FAILS="9 39 41 44 64 65 70 71 72 88 153 154 158 163 166 167 168 169 170 173 186 206 245 246 258 259 273 277 327 335 388 540 551 552 554 565 579 584 643 645 646 647 648 649 650 651 652 653 654 666 667 668 669 670 671 672 673 1001 1002 1030 1053 1060 1061 1071 1072 1079 1095 1133 1136 1158 1186 1187 1189 1190 1191 1192 1193 1194 1195 1196 1198 1199 1229 1284 1285 1286 1293 1315 1404 1412 1418 1437 1568 1905 1916 1917 2024 2026 2027 2028 2030 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2073 2076 2200 2201 2202 2203 2204 3017 3018"
;;
"curl-8_4_0")
EXPECTED_FAILS="9 31 39 41 44 46 61 64 65 70 71 72 73 88 153 154 158 163 166 167 168 169 170 171 173 186 206 245 246 258 259 273 277 327 335 388 420 444 540 551 552 554 565 579 584 643 645 646 647 648 649 650 651 652 653 654 666 667 668 669 670 671 672 673 977 1001 1002 1030 1053 1060 1061 1071 1072 1079 1095 1105 1133 1136 1151 1155 1158 1160 1161 1186 1187 1189 1190 1191 1192 1193 1194 1195 1196 1198 1199 1229 1284 1285 1286 1293 1315 1404 1412 1415 1418 1437 1568 1903 1905 1916 1917 1964 2024 2026 2027 2028 2030 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2073 2076 2200 2201 2202 2203 2204 3017 3018"
;;
Expand Down
88 changes: 23 additions & 65 deletions .github/workflows/build-wolfprovider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,110 +22,70 @@ jobs:
outputs:
cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
steps:
# Check if this version of wolfssl/wolfprovider has already been built,
# mark to cache these items on post if we do end up building
# On a push, the first workflow(s) will complete the build and cache it
# and any delayed workflow will be able to utilize it.
# This is not designed to cache builds across commits.
- name: Checking wolfSSL/wolfProvider in cache
uses: actions/cache@v4
id: wolfprov-cache
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf

key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
lookup-only: true

# if cache hit, exit the workflow
- name: Exit workflow if cache hit
if: steps.wolfprov-cache.outputs.cache-hit == 'true'
- name: Install build dependencies
run: |
echo "Found cached build, exiting workflow"
exit 0
sudo apt-get update
sudo apt-get install -y build-essential autoconf libtool pkg-config

- name: Checkout wolfProvider
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
fetch-depth: 1

# Convert OpenSSL branch name to commit hash if needed
- name: Get OpenSSL commit hash
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
id: openssl-ref
run: |
if [[ "${{ inputs.openssl_ref }}" =~ ^[0-9a-f]{40}$ ]]; then
echo "ref=${{ inputs.openssl_ref }}" >> $GITHUB_OUTPUT
else
sha=$(curl -s "https://api.github.com/repos/openssl/openssl/commits/${{ inputs.openssl_ref }}" | jq -r '.sha')
echo "ref=$sha" >> $GITHUB_OUTPUT
echo "OpenSSL ref ${{ inputs.openssl_ref }} is commit $sha"
fi
sha=$(./scripts/resolve-ref.sh "${{ inputs.openssl_ref }}" "openssl/openssl")
echo "ref=$sha" >> "$GITHUB_OUTPUT"
env:
# Used token to bypass rate limits
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get WolfSSL commit hash
id: wolfssl-ref
run: |
sha=$(./scripts/resolve-ref.sh "${{ inputs.wolfssl_ref }}" "wolfssl/wolfssl")
echo "ref=$sha" >> "$GITHUB_OUTPUT"
env:
# Used token to bypass rate limits
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Look for a cached version of OpenSSL
- name: Checking OpenSSL in cache
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
uses: actions/cache/restore@v4
id: openssl-cache
with:
path: |
openssl-source
openssl-install

key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
lookup-only: false

# Convert WolfSSL branch name to commit hash if needed
- name: Get WolfSSL commit hash
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
id: wolfssl-ref
run: |
if [[ "${{ inputs.wolfssl_ref }}" =~ ^[0-9a-f]{40}$ ]]; then
echo "ref=${{ inputs.wolfssl_ref }}" >> $GITHUB_OUTPUT
else
sha=$(curl -s "https://api.github.com/repos/wolfssl/wolfssl/commits/${{ inputs.wolfssl_ref }}" | jq -r '.sha')
echo "ref=$sha" >> $GITHUB_OUTPUT
echo "WolfSSL ref ${{ inputs.wolfssl_ref }} is commit $sha"
fi

# Look for a cached version of WolfSSL
- name: Checking WolfSSL in cache
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
uses: actions/cache/restore@v4
id: wolfssl-cache
with:
path: |
wolfssl-source
wolfssl-install

key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }}
lookup-only: false

- name: Build wolfProvider
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
run: |
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh

# This is potentially chewing up a lot of cache space.
# Could investigate reducing the size of this cache.
# Note that we use actions/cache/save and actions/cache/restore instead of
# actions/cache to reduce the chance of a cache lock issue.
# Save the wolfProvider outputs for use by the parent jobs.
# Note that we don't try to restore since it will likely always
# be a cache miss.
- name: Save wolfProvider into cache
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}

# If openssl cache miss, save it to the cache
Expand All @@ -134,7 +94,6 @@ jobs:
uses: actions/cache/save@v4
with:
path: |
openssl-source
openssl-install
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}

Expand All @@ -143,7 +102,6 @@ jobs:
uses: actions/cache/save@v4
with:
path: |
wolfssl-source
wolfssl-install
key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }}

Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/cjose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,18 @@ jobs:
id: wolfprov-cache-restore
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin

key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true

- name: Install cjose dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential autoconf libtool pkg-config clang libc++-dev
sudo apt-get install libjansson-dev check
sudo apt-get install -y libjansson-dev check

- name: Download cjose
uses: actions/checkout@v4
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
curl_ref: [ 'master', 'curl-8_4_0' ]
curl_ref: [ 'master', 'curl-8_4_0', 'curl-7_88_1' ]
Comment thread
aidangarske marked this conversation as resolved.
Outdated
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
openssl_ref: [ 'openssl-3.5.0' ]
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
Expand All @@ -48,12 +48,11 @@ jobs:
id: wolfprov-cache
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin

key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ jobs:
id: wolfprov-cache
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin

key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/iperf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ jobs:
id: wolfprov-cache
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin

key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ipmitool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ jobs:
id: wolfprov-cache
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin

key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/libfido2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ jobs:
id: wolfprov-cache
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Install test dependencies
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/liboauth2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ jobs:
id: wolfprov-cache
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin

key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/libwebsockets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,18 @@ jobs:
- name: Checkout wolfProvider
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
fetch-depth: 1

- name: Retrieving wolfProvider from cache
uses: actions/cache/restore@v4
id: wolfprov-cache-restore
with:
path: |
scripts
wolfssl-source
wolfssl-install
wolfprov-install
openssl-install
provider.conf
openssl-install/lib64
openssl-install/include
openssl-install/bin
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
fail-on-cache-miss: true

Expand All @@ -77,6 +76,7 @@ jobs:
cmake ..
make -j$(nproc)
sudo make install

- name: Run libwebsockets tests
working-directory: libwebsockets
run: |
Expand Down
Loading
Loading