forked from wolfSSL/wolfssl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wolfSSL:master' into zig-pkg
- Loading branch information
Showing
830 changed files
with
17,769 additions
and
5,177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: mosquitto Tests | ||
|
||
# START OF COMMON SECTION | ||
on: | ||
push: | ||
branches: [ 'master', 'main', 'release/**' ] | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
# END OF COMMON SECTION | ||
|
||
jobs: | ||
build_wolfssl: | ||
name: Build wolfSSL | ||
# Just to keep it the same as the testing target | ||
runs-on: ubuntu-latest | ||
# This should be a safe limit for the tests to run. | ||
timeout-minutes: 4 | ||
steps: | ||
- name: Build wolfSSL | ||
uses: wolfSSL/actions-build-autotools-project@v1 | ||
with: | ||
path: wolfssl | ||
configure: --enable-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN" | ||
install: true | ||
|
||
- name: Upload built lib | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wolf-install-mosquitto | ||
path: build-dir | ||
retention-days: 5 | ||
|
||
mosquitto_check: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ref: [ 2.0.18 ] | ||
name: ${{ matrix.ref }} | ||
runs-on: ubuntu-latest | ||
# This should be a safe limit for the tests to run. | ||
timeout-minutes: 4 | ||
needs: build_wolfssl | ||
steps: | ||
- name: Download lib | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wolf-install-mosquitto | ||
path: build-dir | ||
|
||
- name: Checkout OSP | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: wolfssl/osp | ||
path: osp | ||
|
||
- name: Install dependencies | ||
run: | | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make | ||
sudo pip install --upgrade psutil | ||
- name: Checkout mosquitto | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: eclipse/mosquitto | ||
ref: v${{ matrix.ref }} | ||
path: mosquitto | ||
|
||
- name: Configure and build mosquitto | ||
run: | | ||
cd $GITHUB_WORKSPACE/mosquitto/ | ||
patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch | ||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir | ||
- name: Run mosquitto tests | ||
working-directory: ./mosquitto | ||
run: | | ||
# Retry up to five times | ||
for i in {1..5}; do | ||
TEST_RES=0 | ||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$? | ||
if [ "$TEST_RES" -eq "0" ]; then | ||
break | ||
fi | ||
done | ||
if [ "$TEST_RES" -ne "0" ]; then | ||
exit $TEST_RES | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: ntp Tests | ||
|
||
# START OF COMMON SECTION | ||
on: | ||
push: | ||
branches: [ 'master', 'main', 'release/**' ] | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
# END OF COMMON SECTION | ||
|
||
jobs: | ||
build_wolfssl: | ||
name: Build wolfSSL | ||
# Just to keep it the same as the testing target | ||
runs-on: ubuntu-latest | ||
# This should be a safe limit for the tests to run. | ||
timeout-minutes: 4 | ||
steps: | ||
- name: Build wolfSSL | ||
uses: wolfSSL/actions-build-autotools-project@v1 | ||
with: | ||
path: wolfssl | ||
configure: --enable-all | ||
install: true | ||
check: false | ||
|
||
- name: Upload built lib | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wolf-install-ntp | ||
path: build-dir | ||
retention-days: 5 | ||
|
||
ntp_check: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# List of releases to test | ||
ref: [ 4.2.8p15 ] | ||
name: ${{ matrix.ref }} | ||
runs-on: ubuntu-latest | ||
# This should be a safe limit for the tests to run. | ||
timeout-minutes: 10 | ||
needs: build_wolfssl | ||
steps: | ||
- name: Download lib | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wolf-install-ntp | ||
path: build-dir | ||
|
||
- name: Checkout OSP | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: wolfssl/osp | ||
path: osp | ||
|
||
# Avoid DoS'ing ntp site so cache the tar.gz | ||
- name: Check if we have ntp | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: ntp-${{ matrix.ref }}.tar.gz | ||
key: ntp-${{ matrix.ref }}.tar.gz | ||
|
||
- name: Download ntp | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
wget https://downloads.nwtime.org/ntp/4.2.8/ntp-${{ matrix.ref }}.tar.gz | ||
- name: Extract ntp | ||
run: | | ||
tar -xf ntp-${{ matrix.ref }}.tar.gz | ||
- name: Build and test ntp | ||
working-directory: ntp-${{ matrix.ref }} | ||
run: | | ||
patch -p1 < $GITHUB_WORKSPACE/osp/ntp/${{ matrix.ref }}/ntp-${{ matrix.ref }}.patch | ||
./bootstrap | ||
./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir | ||
make -j | ||
make -j check | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: rng-tools Tests | ||
|
||
# START OF COMMON SECTION | ||
on: | ||
push: | ||
branches: [ 'master', 'main', 'release/**' ] | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
# END OF COMMON SECTION | ||
|
||
jobs: | ||
build_wolfssl: | ||
name: Build wolfSSL | ||
# Just to keep it the same as the testing target | ||
runs-on: ubuntu-latest | ||
# This should be a safe limit for the tests to run. | ||
timeout-minutes: 4 | ||
steps: | ||
- name: Build wolfSSL | ||
uses: wolfSSL/actions-build-autotools-project@v1 | ||
with: | ||
path: wolfssl | ||
configure: --enable-all | ||
install: true | ||
check: false | ||
|
||
- name: Upload built lib | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wolf-install-rng-tools | ||
path: build-dir | ||
retention-days: 5 | ||
|
||
rng-tools_check: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# List of releases to test | ||
ref: [ 6.16 ] | ||
name: ${{ matrix.ref }} | ||
runs-on: ubuntu-latest | ||
# This should be a safe limit for the tests to run. | ||
timeout-minutes: 4 | ||
needs: build_wolfssl | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
# Don't prompt for anything | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt-get update | ||
sudo apt-get install -y libcurl4-openssl-dev libjansson-dev libp11-dev librtlsdr-dev libcap-dev | ||
- name: Download lib | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wolf-install-rng-tools | ||
path: build-dir | ||
|
||
- name: Checkout OSP | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: wolfssl/osp | ||
path: osp | ||
|
||
- name: Checkout jitterentropy-library | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: smuellerDD/jitterentropy-library | ||
path: jitterentropy-library | ||
ref: v3.5.0 | ||
|
||
- name: Build jitterentropy-library | ||
working-directory: jitterentropy-library | ||
run: make -j | ||
|
||
- name: Build rng-tools | ||
uses: wolfSSL/actions-build-autotools-project@v1 | ||
with: | ||
repository: nhorman/rng-tools | ||
ref: v${{ matrix.ref }} | ||
path: rng-tools | ||
patch-file: $GITHUB_WORKSPACE/osp/rng-tools/${{ matrix.ref }}.patch | ||
configure: --without-pkcs11 --enable-jitterentropy=$GITHUB_WORKSPACE/jitterentropy-library --with-wolfssl=$GITHUB_WORKSPACE/build-dir | ||
check: false | ||
|
||
- name: Testing rng-tools | ||
id: testing | ||
working-directory: rng-tools | ||
run: | | ||
# Retry up to five times | ||
for i in {1..5}; do | ||
TEST_RES=0 | ||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib make check || TEST_RES=$? | ||
if [ "$TEST_RES" -eq "0" ]; then | ||
break | ||
fi | ||
done | ||
if [ "$TEST_RES" -ne "0" ]; then | ||
exit $TEST_RES | ||
fi | ||
- name: Print logs | ||
if: ${{ failure() && steps.testing.outcome == 'failure' }} | ||
working-directory: rng-tools/tests | ||
run: cat test-suite.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.