This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-crypto.git
The following commit(s) were added to refs/heads/master by this push: new 13c44eac Reorganise tests 13c44eac is described below commit 13c44eacffbdd40b867cada39114d7cfdc1870bd Author: Sebb <s...@apache.org> AuthorDate: Thu Nov 2 13:12:57 2023 +0000 Reorganise tests - separate steps for Windows and other - drop steps that ran Crypto and OpenSslJna - they are tested anyway --- .github/workflows/maven.yml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 725a1556..a24c7dc3 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -103,7 +103,13 @@ jobs: chcp 65001 #set code page to utf-8 echo ((openssl version -e) -replace ': "','=' -replace '\\engines-.*','') >> $env:GITHUB_ENV echo "CHECK_SKIP=skip" >> $env:GITHUB_ENV - - name: Build with Maven + # N.B. '-V -B -ntp' is shorthand for '--show-version --batch-mode --no-transfer-progress' + # + # The bash shell under Windows changes the openssl default library, so is not used for running tests + # Unfortunately that means separate steps for Windows, as it uses a different syntax for referrring to + # environment variables: $env:VARNAME instead of $VARNAME + - name: Build with Maven (Windows) + if: ${{ matrix.os == 'windows-latest' }} # OPENSSL_HOME is needed for Windows build to find some header files # It's not clear how one is supposed to find the correct setting; # The value below was found by searching for openssl files under C (warning: slow) @@ -114,26 +120,14 @@ jobs: env: OPENSSL_HOME: "C:\\Miniconda\\Library" run: | - mvn --show-version --batch-mode --no-transfer-progress -DtrimStackTrace=false -D"jni.library.path=$ENGINESDIR" -D"jna.library.path=$ENGINESDIR" -D"commons.crypto.openssl.check=$CHECK_SKIP" - - name: Run Crypto (JNI - override default lib) - run: | - mvn --show-version --batch-mode --no-transfer-progress -q exec:java -D"exec.mainClass=org.apache.commons.crypto.Crypto" -D"commons.crypto.debug=true" -D"jni.library.path=$ENGINESDIR" - - name: Run OpenSslJna (JNA - don't override lib) - # This is likely to fail, so reset the status - run: | - mvn --show-version --batch-mode --no-transfer-progress -q exec:java -D"exec.mainClass=org.apache.commons.crypto.jna.OpenSslJna" -D"commons.crypto.debug=true" || true - - name: Run OpenSslJna (JNA - macOS from openssl version -a ENGINESDIR) - if: ${{ matrix.os == 'macos-11' }} - run: | - mvn --show-version --batch-mode --no-transfer-progress -q exec:java -D"exec.mainClass=org.apache.commons.crypto.jna.OpenSslJna" -D"jna.library.path=$ENGINESDIR" -D"commons.crypto.debug=true" - - name: Run OpenSslJna (JNA - Windows from openssl version -a ENGINESDIR) - if: ${{ matrix.os == 'windows-latest' }} - shell: bash + mvn -V -B -ntp -DtrimStackTrace=false -D"jni.library.path=$env:ENGINESDIR" -D"jna.library.path=$env:ENGINESDIR" -D"commons.crypto.openssl.check=$env:CHECK_SKIP" + - name: Build with Maven (not Windows) + if: ${{ matrix.os != 'windows-latest' }} run: | - mvn --show-version --batch-mode --no-transfer-progress -q exec:java -D"exec.mainClass=org.apache.commons.crypto.jna.OpenSslJna" -D"jna.library.path=$ENGINESDIR" -D"commons.crypto.debug=true" + mvn -V -B -ntp -DtrimStackTrace=false -D"jni.library.path=$ENGINESDIR" -D"jna.library.path=$ENGINESDIR" -D"commons.crypto.openssl.check=$CHECK_SKIP" - name: Check benchmark code compiles if: ${{ matrix.java == '8' }} env: OPENSSL_HOME: "C:\\Miniconda\\Library" run: | - mvn --show-version --batch-mode --no-transfer-progress clean test-compile -Pbenchmark + mvn -V -B -ntp clean test-compile -Pbenchmark