actions: Build wolfSSL in seperate job

This commit is contained in:
Juliusz Sosinowicz
2023-03-28 16:46:53 +02:00
parent 496a15037b
commit 1766a69152
3 changed files with 114 additions and 40 deletions

View File

@ -4,6 +4,46 @@ on:
workflow_call: workflow_call:
jobs: jobs:
build_wolfssl:
strategy:
matrix:
include:
- build_id: build1
wolf_extra_config: --disable-tls13
- build_id: build2
wolf_extra_config: --enable-brainpool --enable-wpas-dpp
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-20.04
steps:
# No way to view the full strategy in the browser (really weird)
- name: Print strategy
run: |
cat <<EOF
${{ toJSON(matrix) }}
EOF
- if: ${{ runner.debug }}
name: Enable wolfSSL debug logging
run: |
echo "wolf_debug_flags=--enable-debug" >> $GITHUB_ENV
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: >-
--enable-wpas CFLAGS=-DWOLFSSL_STATIC_RSA
${{ env.wolf_debug_flags }} ${{ matrix.wolf_extra_config }}
install: true
- name: Upload built lib
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.build_id }}
path: build-dir
retention-days: 1
# Build wpa_supplicant with wolfSSL and hostapd with OpenSSL and interop. # Build wpa_supplicant with wolfSSL and hostapd with OpenSSL and interop.
hostap_test: hostap_test:
strategy: strategy:
@ -23,13 +63,13 @@ jobs:
hostap_cherry_pick: 698c05da2bd3233b005d45873caa852bc29b32c5, hostap_cherry_pick: 698c05da2bd3233b005d45873caa852bc29b32c5,
remove_teap: true, remove_teap: true,
# TLS 1.3 does not work for this version # TLS 1.3 does not work for this version
wolf_extra_config: --disable-tls13, build_id: build1,
}, },
# Test the dpp patch # Test the dpp patch
{ {
hostap_ref: b607d2723e927a3446d89aed813f1aa6068186bb, hostap_ref: b607d2723e927a3446d89aed813f1aa6068186bb,
osp_ref: ad5b52a49b3cc2a5bfb47ccc1d6a5137132e9446, osp_ref: ad5b52a49b3cc2a5bfb47ccc1d6a5137132e9446,
wolf_extra_config: --enable-brainpool --enable-wpas-dpp build_id: build2
}, },
] ]
# parallelize the tests to be able to run all tests within 10 minutes # parallelize the tests to be able to run all tests within 10 minutes
@ -44,11 +84,12 @@ jobs:
config: { config: {
hostap_ref: b607d2723e927a3446d89aed813f1aa6068186bb, hostap_ref: b607d2723e927a3446d89aed813f1aa6068186bb,
osp_ref: ad5b52a49b3cc2a5bfb47ccc1d6a5137132e9446, osp_ref: ad5b52a49b3cc2a5bfb47ccc1d6a5137132e9446,
wolf_extra_config: --enable-brainpool --enable-wpas-dpp build_id: build2
} }
name: hwsim test name: hwsim test
# For openssl 1.1 # For openssl 1.1
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: build_wolfssl
steps: steps:
# No way to view the full strategy in the browser (really weird) # No way to view the full strategy in the browser (really weird)
- name: Print strategy - name: Print strategy
@ -57,6 +98,11 @@ jobs:
${{ toJSON(matrix) }} ${{ toJSON(matrix) }}
EOF EOF
- name: Checkout wolfSSL
uses: actions/checkout@v3
with:
path: wolfssl
- name: Install dependencies - name: Install dependencies
run: | run: |
# Don't prompt for anything # Don't prompt for anything
@ -75,19 +121,15 @@ jobs:
lsmod | grep mac80211 lsmod | grep mac80211
- if: ${{ runner.debug }} - if: ${{ runner.debug }}
name: Enable wolfSSL and hostap debug logging name: Enable hostap debug logging
run: | run: |
echo "wolf_debug_flags=--enable-debug" >> $GITHUB_ENV
echo "hostap_debug_flags=-d" >> $GITHUB_ENV echo "hostap_debug_flags=-d" >> $GITHUB_ENV
- name: Build wolfSSL - name: Download lib
uses: wolfSSL/actions-build-autotools-project@v1 uses: actions/download-artifact@v3
with: with:
path: wolfssl name: ${{ matrix.config.build_id }}
configure: >- path: build-dir
--enable-wpas CFLAGS=-DWOLFSSL_STATIC_RSA
${{ env.wolf_debug_flags }} ${{ matrix.config.wolf_extra_config }}
install: true
- name: Setup d-bus - name: Setup d-bus
working-directory: wolfssl/.github/workflows/hostap-files working-directory: wolfssl/.github/workflows/hostap-files

View File

@ -4,13 +4,9 @@ on:
workflow_call: workflow_call:
jobs: jobs:
openvpn_check: build_wolfssl:
strategy: name: Build wolfSSL
fail-fast: false # Just to keep it the same as the testing target
matrix:
# List of refs to test
ref: [ master, release/2.6, v2.6.0 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Build wolfSSL - name: Build wolfSSL
@ -20,6 +16,29 @@ jobs:
configure: --enable-openvpn configure: --enable-openvpn
install: true install: true
- name: Upload built lib
uses: actions/upload-artifact@v3
with:
name: wolf-install
path: build-dir
retention-days: 1
openvpn_check:
strategy:
fail-fast: false
matrix:
# List of refs to test
ref: [ master, release/2.6, v2.6.0 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v3
with:
name: wolf-install
path: build-dir
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
@ -29,6 +48,10 @@ jobs:
- if: ${{ matrix.ref != 'master' }} - if: ${{ matrix.ref != 'master' }}
name: Build and test openvpn with fsanitize name: Build and test openvpn with fsanitize
run: |
echo 'extra_c_flags=CFLAGS="-fsanitize=address -fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
- name: Build and test openvpn
uses: wolfSSL/actions-build-autotools-project@v1 uses: wolfSSL/actions-build-autotools-project@v1
with: with:
repository: OpenVPN/openvpn repository: OpenVPN/openvpn
@ -38,19 +61,9 @@ jobs:
--with-crypto-library=wolfssl --with-crypto-library=wolfssl
WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl" WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl"
WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl" WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl"
CFLAGS="-fsanitize=address -fno-omit-frame-pointer -O2" ${{ env.extra_c_flags }}
check: true
- if: ${{ matrix.ref == 'master' }}
name: Build and test openvpn without fsanitize
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: OpenVPN/openvpn
ref: ${{ matrix.ref }}
path: openvpn
configure: >-
--with-crypto-library=wolfssl
WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl"
WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl"
check: true check: true
- name: Confirm OpenVPN built with wolfSSL
working-directory: ./openvpn
run: ldd src/openvpn/openvpn | grep wolfssl

View File

@ -4,13 +4,9 @@ on:
workflow_call: workflow_call:
jobs: jobs:
stunnel_check: build_wolfssl:
strategy: name: Build wolfSSL
fail-fast: false # Just to keep it the same as the testing target
matrix:
# List of releases to test
ref: [ 5.67 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Build wolfSSL - name: Build wolfSSL
@ -19,6 +15,29 @@ jobs:
path: wolfssl path: wolfssl
configure: --enable-stunnel configure: --enable-stunnel
install: true install: true
- name: Upload built lib
uses: actions/upload-artifact@v3
with:
name: wolf-install
path: build-dir
retention-days: 1
stunnel_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 5.67 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v3
with:
name: wolf-install
path: build-dir
- name: Checkout OSP - name: Checkout OSP
uses: actions/checkout@v3 uses: actions/checkout@v3