-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a single workflow with a reusable maven build action
- Loading branch information
1 parent
a9f17d8
commit d5aca76
Showing
5 changed files
with
82 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: "HotSpot Build" | ||
|
||
inputs: | ||
BUILD_REVISION: | ||
description: "Canonical build revision for this execution" | ||
required: true | ||
MAVEN_JOB_ARGS: | ||
description: "Maven arguments to add" | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@v4" | ||
- name: "Cache local Maven repository" | ||
uses: "actions/cache@v4" | ||
with: | ||
path: "~/.m2/repository" | ||
key: "${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pom.xml') }}" | ||
restore-keys: | | ||
${{ runner.os }}-${{ runner.arch }}- | ||
- name: "Build and test" | ||
shell: "/bin/bash" | ||
run: | | ||
set -euo pipefail | ||
mvn -B -e -fae --show-version \ | ||
-Dmaven.repo.local="$HOME/.m2/repository" \ | ||
-DsurefireTmpDir="$(pwd)/.github/tmpdir" \ | ||
-Drevision="${{ inputs.BUILD_REVISION }}" \ | ||
${{ inputs.MAVEN_JOB_ARGS }} | ||
if [ -f "target/jacoco/jacoco.csv" ]; then | ||
awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, " instructions covered"; print 100*covered/instructions, "% covered" }' target/site/jacoco/jacoco.csv | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
FROM ghcr.io/mangadex-pub/jdk-maven:23-corretto AS hotspot-corretto | ||
FROM amazoncorretto:23-headless AS hotspot | ||
|
||
USER root | ||
RUN mkdir -pv /opt/mcw | ||
COPY target/mcw.jar /opt/mcw/mcw.jar | ||
RUN mkdir -pv /opt/mcw/bin | ||
COPY target/mcw.jar /opt/mcw/bin/mcw.jar | ||
|
||
USER mangadex | ||
RUN java -jar /opt/mcw/mcw.jar --version | ||
RUN java -jar /opt/mcw/bin/mcw.jar --version | ||
|
||
FROM ghcr.io/mangadex-pub/containers-base/rockylinux:9 AS aot-glibc | ||
FROM ghcr.io/mangadex-pub/containers-base/rockylinux:9 AS graal | ||
|
||
USER root | ||
RUN mkdir -pv /opt/mcw | ||
RUN mkdir -pv /opt/mcw/bin | ||
COPY target/mcw /opt/mcw/mcw | ||
|
||
USER mangadex | ||
RUN /opt/mcw/mcw --version |