Skip to content

Commit

Permalink
Add tests against code in jar
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Nov 30, 2023
1 parent 1ae8893 commit 370381c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
if: ${{ runner.os == 'macOS' }}
run: |
echo $(openssl version -e | sed -n -e 's/engines-.*//' -e 's/: "/=/p') >> "$GITHUB_ENV"
- name: Build with Maven (skip tests)
- name: Package with Maven (skip tests)
# 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)
Expand All @@ -105,18 +105,25 @@ jobs:
env:
OPENSSL_HOME: "C:\\Miniconda\\Library"
run: |
mvn -V -B -ntp -DskipTests
mvn -V -B -ntp -DskipTests clean package
- name: Test with Maven (macOS)
# macOS needs to override the library name
# macOS needs to override the library name (sometimes!)
if: ${{ runner.os == 'macOS' }}
# Show the defaults after the main run (will likely fail with unsafe load)
run: |
mvn -V -B -ntp surefire:test -DtrimStackTrace=false -Djni.library.path=$ENGINESDIR -Djna.library.path=$ENGINESDIR
echo "------- Full test using classes -------"
mvn -V -B -ntp surefire:test -Djni.library.path=$ENGINESDIR -Djna.library.path=$ENGINESDIR
echo "------- Full test using jar -------"
mvn -V -B -ntp surefire:test -Djni.library.path=$ENGINESDIR -Djna.library.path=$ENGINESDIR -Ptest-with-jar
echo "------- Quick test without library override -------"
mvn -V -B -ntp surefire:test -D"test=CryptoTest,OpenSslJnaTest" || true
- name: Test with Maven (not macOS)
if: ${{ runner.os != 'macOS' }}
run: |
mvn -V -B -ntp surefire:test -DtrimStackTrace=false
echo "------- Full test using classes -------"
mvn -V -B -ntp surefire:test
echo "------- Full test using jar -------"
mvn -V -B -ntp surefire:test -Ptest-with-jar
- name: Check benchmark code compiles
if: ${{ matrix.java == '8' }}
env:
Expand Down

0 comments on commit 370381c

Please sign in to comment.