From 01fcdc06061ef38199e904fc60c520211b7de20a Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Fri, 6 Sep 2024 14:42:48 -0400 Subject: [PATCH] Add test-sanity GitHub Action --- .github/workflows/test-sanity.yml | 47 +++++++++++++++++++++++++++++++ scripts/test-sanity.sh | 8 ++---- 2 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test-sanity.yml diff --git a/.github/workflows/test-sanity.yml b/.github/workflows/test-sanity.yml new file mode 100644 index 0000000..8862c41 --- /dev/null +++ b/.github/workflows/test-sanity.yml @@ -0,0 +1,47 @@ +name: Simple Tests + +# START OF COMMON SECTION +on: + push: + branches: [ '*' ] +# branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +# END OF COMMON SECTION + +jobs: + make_check: + strategy: + matrix: + config: [ + # Add new configs here + '', + 'OPENSSL_TAG=master', + 'WOLFSSL_TAG=master', + 'OPENSSL_TAG=master WOLFSSL_TAG=master', + 'OPENSSL_TAG=master WOLFSSL_ISFIPS=1', + 'WOLFSSL_TAG=master WOLFSSL_ISFIPS=1', + 'OPENSSL_TAG=master WOLFSSL_TAG=master WOLFSSL_ISFIPS=1', + ] + name: make check + runs-on: ubuntu-latest + # This should be a safe limit for the tests to run. + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + name: Checkout wolfProvider + + - name: Test wolfProvider + run: | + ${{ matrix.config }} ./scripts/test-sanity.sh + + - name: Print errors + if: ${{ failure() }} + run: | + if [ -f scripts/test-sanity.log ] ; then + cat scripts/test-sanity.log + fi diff --git a/scripts/test-sanity.sh b/scripts/test-sanity.sh index 57ba88c..0c3d5c5 100755 --- a/scripts/test-sanity.sh +++ b/scripts/test-sanity.sh @@ -27,7 +27,7 @@ function runSpotCheck() { unset OPENSSL_MODULES unset OPENSSL_CONF rm -rf ${WOLFSSL_INSTALL_DIR} ${WOLFSSL_SOURCE_DIR} ${WOLFPROV_INSTALL_DIR} - doTestCmd "$1 init_wolfprov" + doTestCmd init_wolfprov SET_POST=$( set ) echo "New variables set:" @@ -52,10 +52,6 @@ function runSpotCheck() { doTestCmd "curl https://tls.support -vv --tlsv1.3 --tls-max 1.3 -o test.html" } -echo "Now testing standard version" -runSpotCheck "" - -echo "Now testing FIPS version" -runSpotCheck "WOLFSSL_ISFIPS=1" +runSpotCheck exit $?