2023-10-16 17:15:18 +00:00
|
|
|
name: HIRS build and packages for Linux
|
2023-10-16 17:00:14 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*v3*'
|
|
|
|
- 'main'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# run the package script for HIRS ACA, Provisioners, tcg_rim_tool, and tcg_eventlog_tool
|
2023-10-16 18:04:10 +00:00
|
|
|
Package_linux:
|
2023-10-16 17:00:14 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
steps:
|
2023-10-16 17:56:27 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-16 17:00:14 +00:00
|
|
|
- name: Set up JDK 17
|
2023-10-16 17:56:27 +00:00
|
|
|
uses: actions/setup-java@v3
|
2023-10-16 17:00:14 +00:00
|
|
|
with:
|
|
|
|
java-version: '17'
|
2023-10-16 17:56:27 +00:00
|
|
|
distribution: 'temurin'
|
2023-10-16 17:00:14 +00:00
|
|
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
|
|
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
|
|
|
- name: directory setup
|
|
|
|
run: |
|
|
|
|
mkdir -p artifacts/jars
|
|
|
|
mkdir -p artifacts/wars
|
|
|
|
mkdir -p artifacts/rpms
|
|
|
|
mkdir -p artifacts/debs
|
|
|
|
- name: install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install git curl nano cron mariadb-server
|
|
|
|
- name: Setup Gradle
|
2023-10-16 17:15:18 +00:00
|
|
|
uses: gradle/gradle-build-action@v2
|
2023-10-16 17:00:14 +00:00
|
|
|
- name: Execute Gradle build
|
|
|
|
run: |
|
2023-10-16 17:31:20 +00:00
|
|
|
pwd
|
|
|
|
ls
|
|
|
|
echo "build starts here ....."
|
2023-10-16 17:00:14 +00:00
|
|
|
./gradlew build;
|
|
|
|
./gradlew bootWar;
|
|
|
|
./gradlew buildDeb;
|
|
|
|
./gradlew buildRpm;
|
2023-10-16 17:39:49 +00:00
|
|
|
cp HIRS_AttestationCAPortal/build/libs/*.jar artifacts/jars/.
|
|
|
|
cp HIRS_AttestationCA/build/libs/*.jar artifacts/jars/.
|
|
|
|
cp HIRS_Utils/build/libs/*.jar artifacts/jars/.
|
|
|
|
cp HIRS_Structs/build/libs/*.jar artifacts/jars/.
|
|
|
|
cp HIRS_AttestationCAPortal/build/libs/HIRS_AttestationCAPortal.war artifacts/wars/.
|
|
|
|
cp HIRS_AttestationCAPortal/build/distributions/*.rpm artifacts/rpms/.
|
|
|
|
cp HIRS_AttestationCAPortal/build/distributions/*.deb artifacts/debs/.
|
2023-10-16 17:00:14 +00:00
|
|
|
- name: Archive RPM files
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: RPM_Files
|
|
|
|
path: artifacts/rpms/*
|
|
|
|
if-no-files-found: error
|
|
|
|
- name: Archive DEB files
|
2023-10-16 18:11:35 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-10-16 17:00:14 +00:00
|
|
|
with:
|
|
|
|
name: DEB_Files
|
|
|
|
path: artifacts/debs/*
|
|
|
|
if-no-files-found: error
|
|
|
|
- name: Archive Jar files
|
2023-10-16 18:11:35 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-10-16 17:00:14 +00:00
|
|
|
with:
|
|
|
|
name: JAR_Files
|
|
|
|
path: artifacts/jars/
|