diff --git a/.github/workflows/docker-Espressif.yml b/.github/workflows/docker-Espressif.yml index 3976b8e0c..4b100bbf5 100644 --- a/.github/workflows/docker-Espressif.yml +++ b/.github/workflows/docker-Espressif.yml @@ -4,7 +4,7 @@ on: jobs: espressif_latest: - name: Test Espressif on latest Docker container + name: latest Docker container runs-on: ubuntu-latest container: image: espressif/idf:latest @@ -13,7 +13,7 @@ jobs: - name: Initialize Espressif IDE and build examples run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh espressif_v4_4: - name: Test Espressif on v4.4 Docker container + name: v4.4 Docker container runs-on: ubuntu-latest container: image: espressif/idf:release-v4.4 @@ -22,7 +22,7 @@ jobs: - name: Initialize Espressif IDE and build examples run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh espressif_v5_0: - name: Test Espressif on v5.0 Docker container + name: v5.0 Docker container runs-on: ubuntu-latest container: image: espressif/idf:release-v5.0 diff --git a/.github/workflows/docker-OpenWrt.yml b/.github/workflows/docker-OpenWrt.yml index 08e3f04cf..3f11d4bc0 100644 --- a/.github/workflows/docker-OpenWrt.yml +++ b/.github/workflows/docker-OpenWrt.yml @@ -24,7 +24,7 @@ jobs: path: src/.libs/libwolfssl.so retention-days: 1 compile_container: - name: OpenWrt test + name: Compile container runs-on: ubuntu-latest needs: build_library strategy: @@ -37,8 +37,7 @@ jobs: with: name: libwolfssl.so path: Docker/OpenWrt/. - - - name: Build but dont push + - name: Build but dont push uses: docker/build-push-action@v3 with: context: Docker/OpenWrt diff --git a/.github/workflows/haproxy.yml b/.github/workflows/haproxy.yml new file mode 100644 index 000000000..13335910b --- /dev/null +++ b/.github/workflows/haproxy.yml @@ -0,0 +1,50 @@ +name: HaProxy Tests + +on: + workflow_call: + +jobs: + haproxy_check: + strategy: + matrix: + # List of refs to test + ref: [ master ] + name: ${{ matrix.ref }} + runs-on: ubuntu-latest + steps: + - name: Build wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + path: wolfssl + configure: --enable-quic --enable-haproxy + install: true + + - name: Checkout VTest + uses: actions/checkout@v3 + with: + repository: vtest/VTest + path: VTest + + - name: Build VTest + working-directory: VTest + # Special flags due to: https://github.com/vtest/VTest/issues/12 + run: make FLAGS='-O2 -s -Wall' + + - name: Checkout HaProxy + uses: actions/checkout@v3 + with: + repository: haproxy/haproxy + path: haproxy + ref: ${{ matrix.ref }} + + - name: Build HaProxy + working-directory: haproxy + run: >- + make -j TARGET=linux-glibc DEBUG='-DDEBUG_MEMORY_POOLS -DDEBUG_STRICT' + USE_OPENSSL_WOLFSSL=1 USE_QUIC=1 SSL_INC=$GITHUB_WORKSPACE/build-dir/include/ + SSL_LIB=$GITHUB_WORKSPACE/build-dir/lib/ ADDLIB=-Wl,-rpath=$GITHUB_WORKSPACE/build-dir/lib + + - name: Test HaProxy + working-directory: haproxy + run: make reg-tests reg-tests/ssl VTEST_PROGRAM=$GITHUB_WORKSPACE/VTest/vtest + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a9b1737a..92afa0655 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: wolfSSL CI tests +name: CI concurrency: group: ${{ github.ref }} cancel-in-progress: true @@ -10,11 +10,18 @@ on: branches: [ '*' ] jobs: - call_docker-Espressif: + espressif: uses: ./.github/workflows/docker-Espressif.yml - call_multi-compiler: + multi-compiler: uses: ./.github/workflows/multi-compiler.yml - call_docker-OpenWrt: + openwrt: uses: ./.github/workflows/docker-OpenWrt.yml - call_os-check: + os-check: uses: ./.github/workflows/os-check.yml + stunnel: + uses: ./.github/workflows/stunnel.yml + openvpn: + uses: ./.github/workflows/openvpn.yml +# TODO: Currently this test fails. Enable it once it becomes passing. +# haproxy: +# uses: ./.github/workflows/haproxy.yml diff --git a/.github/workflows/openvpn.yml b/.github/workflows/openvpn.yml new file mode 100644 index 000000000..93af9d637 --- /dev/null +++ b/.github/workflows/openvpn.yml @@ -0,0 +1,36 @@ +name: OpenVPN Tests + +on: + workflow_call: + +jobs: + openvpn_check: + strategy: + matrix: + # List of refs to test + ref: [ master, release/2.6, v2.6.0 ] + name: ${{ matrix.ref }} + runs-on: ubuntu-latest + steps: + - name: Build wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + path: wolfssl + configure: --enable-openvpn + install: true + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install liblzo2-dev libpam0g-dev liblz4-dev libcap-ng-dev linux-libc-dev man2html libcmocka-dev python3-docutils libtool automake autoconf + + - name: Build and test openvpn + 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 + diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 1cc683624..ed1136d74 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -8,79 +8,68 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest ] - name: make_check on ${{ matrix.os }} + config: [ + # Add new configs here + '', + '--enable-all --enable-asn=template', + '--enable-all --enable-asn=original', + ] + name: make check runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.os == 'macos-latest' }} - run: brew install automake libtool - - run: ./autogen.sh - - name: configure make check - run: | - ./configure - make - make check - make distcheck + - name: Build and test wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + configure: ${{ matrix.config }} + check: true - make_check_enable_all: + make_user_settings: strategy: matrix: os: [ ubuntu-latest, macos-latest ] - name: make_check_enable_all on ${{ matrix.os }} + user-settings: [ + # Add new user_settings.h here + 'examples/configs/user_settings_all.h', + ] + name: make user_setting.h runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.os == 'macos-latest' }} - run: brew install automake libtool - - run: ./autogen.sh - - name: configure all make check - run: | - ./configure --enable-all - make - make check - make distcheck + - name: Build and test wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + configure: --enable-usersettings + check: true + user-settings: ${{ matrix.user-settings }} - make_check_enable_all_asn: + make_user_settings_testwolfcrypt: strategy: matrix: os: [ ubuntu-latest, macos-latest ] - name: make_check_enable_all_asn on ${{ matrix.os }} + user-settings: [ + # Add new user_settings.h here + 'examples/configs/user_settings_min_ecc.h', + 'examples/configs/user_settings_wolfboot_keytools.h', + 'examples/configs/user_settings_wolftpm.h', + ] + name: make user_setting.h (testwolfcrypt only) runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.os == 'macos-latest' }} - run: brew install automake libtool - - run: ./autogen.sh - - name: configure all ASN template - run: | - ./configure --enable-all --enable-asn=template - make - make check - make distcheck + - name: Build and test wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + configure: --enable-usersettings --disable-examples + check: false + user-settings: ${{ matrix.user-settings }} - make_user: - strategy: - matrix: - os: [ ubuntu-latest, macos-latest ] - name: make_user on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.os == 'macos-latest' }} - run: brew install automake libtool - - run: ./autogen.sh - - name: make user_settings_all.h - run: | - cp ./examples/configs/user_settings_all.h user_settings.h - ./configure --enable-usersettings - make - make check + - name: Run wolfcrypt/test/testwolfcrypt + run: ./wolfcrypt/test/testwolfcrypt + # Has to be dedicated function due to the sed call make_user_all: strategy: matrix: os: [ ubuntu-latest, macos-latest ] - name: make_user_all on ${{ matrix.os }} + name: make user_setting.h (with sed) runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -95,60 +84,6 @@ jobs: make make check - make_user_minecc: - strategy: - matrix: - os: [ ubuntu-latest, macos-latest ] - name: make_user_minecc on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.os == 'macos-latest' }} - run: brew install automake libtool - - run: ./autogen.sh - - name: user_settings_min_ecc.h - run: | - cp ./examples/configs/user_settings_min_ecc.h user_settings.h - ./configure --enable-usersettings --disable-examples - make - ./wolfcrypt/test/testwolfcrypt - - make_user_wolfboot: - strategy: - matrix: - os: [ ubuntu-latest, macos-latest ] - name: make_user_wolfboot on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.os == 'macos-latest' }} - run: brew install automake libtool - - run: ./autogen.sh - - name: user_settings_wolfboot_keytools.h - run: | - cp ./examples/configs/user_settings_wolfboot_keytools.h user_settings.h - ./configure --enable-usersettings --disable-examples - make - ./wolfcrypt/test/testwolfcrypt - - make_user_wolftpm: - strategy: - matrix: - os: [ ubuntu-latest, macos-latest ] - name: make_user_wolftpm on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - if: ${{ matrix.os == 'macos-latest' }} - run: brew install automake libtool - - run: ./autogen.sh - - name: user_settings_wolftpm.h - run: | - cp ./examples/configs/user_settings_wolftpm.h user_settings.h - ./configure --enable-usersettings --disable-examples - make - ./wolfcrypt/test/testwolfcrypt - windows_build: name: Windows Build Test runs-on: windows-latest diff --git a/.github/workflows/stunnel.yml b/.github/workflows/stunnel.yml new file mode 100644 index 000000000..1821eb5e6 --- /dev/null +++ b/.github/workflows/stunnel.yml @@ -0,0 +1,41 @@ +name: stunnel Tests + +on: + workflow_call: + +jobs: + stunnel_check: + strategy: + matrix: + # List of releases to test + ref: [ 5.67 ] + name: ${{ matrix.ref }} + runs-on: ubuntu-latest + steps: + - name: Build wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + path: wolfssl + configure: --enable-stunnel + install: true + + - name: Checkout OSP + uses: actions/checkout@v3 + with: + repository: wolfssl/osp + path: osp + + - name: Build and test stunnel + uses: wolfSSL/actions-build-autotools-project@v1 + with: + repository: mtrojnar/stunnel + ref: stunnel-${{ matrix.ref }} + path: stunnel + patch-file: $GITHUB_WORKSPACE/osp/stunnel/${{ matrix.ref }}/stunnel-${{ matrix.ref }}.patch + configure: --enable-wolfssl SSLDIR=$GITHUB_WORKSPACE/build-dir + check: true + + - name: Confirm stunnel built with wolfSSL + working-directory: ./stunnel + run: ldd src/stunnel | grep wolfssl +