-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (45 loc) · 1.81 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "**" ]
env:
OPENSSL_MODULES: /usr/local/lib64/ossl-modules/
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
run: sudo apt-get update && sudo apt-get install -y openjdk-17-jdk-headless
- name: Install OpenSSL FIPS
run: |
git clone https://github.com/openssl/openssl && cd openssl
git checkout openssl-3.0.2
sudo apt update && sudo apt install build-essential -y
./Configure enable-fips && make && sudo make install && sudo make install_fips
- name: Setup OpenSSL configuration
run: |
sudo mkdir -p /usr/local/ssl
sudo openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib64/ossl-modules/fips.so
sudo cat /usr/local/ssl/fipsmodule.cnf
sudo cp ${{ github.workspace }}/src/test/conf/openssl.cnf /usr/local/ssl/openssl.cnf
- name: Build with Maven/JDK 17
env:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64/
run: mvn -B package --file pom.xml
- name: Upload logfile
uses: actions/upload-artifact@v4
if: always()
with:
name: maven-surefire-reports
path: |
${{ github.workspace }}/target/surefire-reports
${{ github.workspace }}/build/test/test.out