Skip to content

Commit

Permalink
Update Maven build test
Browse files Browse the repository at this point in the history
The Maven build test in maven-tests.yml has been merged into
build-tests.yml. It has also been updated to compare CMake
build artifacts and Maven build artifacts. The comparison
excludes META-INF/maven/ since that folder is only available
in Maven build artifacts.
  • Loading branch information
edewata committed Jul 5, 2022
1 parent e09488c commit a8f5cb1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 34 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ jobs:
build-test:
name: Build Test
runs-on: ubuntu-latest
env:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
strategy:
matrix:
os:
Expand All @@ -22,10 +20,16 @@ jobs:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Install Fedora/CentOS dependencies
if: ${{ startsWith(matrix.os, 'fedora:') || startsWith(matrix.os, 'centos:') }}
run: |
dnf install -y dnf-plugins-core rpm-build
dnf install -y dnf-plugins-core rpm-build maven
dnf builddep -y --spec jss.spec
- name: Install Debian/Ubuntu dependencies
Expand All @@ -35,11 +39,27 @@ jobs:
apt-get install -y \
cmake zip unzip \
g++ libnss3-dev libnss3-tools \
openjdk-17-jdk libcommons-lang3-java libslf4j-java junit4
openjdk-17-jdk libcommons-lang3-java libslf4j-java junit4 \
maven
- name: Build JSS binaries, Javadoc, and run tests
- name: Build JSS with CMake
run: ./build.sh --with-tests

- name: Build JSS with Maven
run: mvn install

- name: Compare jss.jar
run: |
jar tvf ~/build/jss/jss.jar | awk '{print $8;}' | sort | tee cmake.out
jar tvf target/jss-5.3.0-SNAPSHOT.jar | awk '{print $8;}' | grep -v '^META-INF/maven/' | sort > maven.out
diff cmake.out maven.out
- name: Build examples
run: mvn compile
working-directory: examples

# TODO: Run examples

# Compare JNI symbols in the code and in the version script.
# If there are JNI symbols in the code but not in the version script -> fail.
symbol-test:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/maven-tests.yml

This file was deleted.

0 comments on commit a8f5cb1

Please sign in to comment.