-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Enable native builds for amd64 and aarch64 (#327)
Signed-off-by: Jason Montleon <[email protected]>
- Loading branch information
Showing
6 changed files
with
131 additions
and
141 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 |
---|---|---|
@@ -1,5 +0,0 @@ | ||
* | ||
!target/*-runner | ||
!target/*-runner.jar | ||
!target/lib/* | ||
!target/quarkus-app/* | ||
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,72 @@ | ||
name: Tackle Pathfinder CI main | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
unit-test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
java-package: jdk | ||
- name: Cache Maven packages | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build with Maven | ||
run: ./mvnw -U -B test | ||
|
||
integration-native-test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
java-package: jdk | ||
- name: Cache Maven packages | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build with Maven | ||
run: ./mvnw -U -B verify -Pnative -Dquarkus-profile=test -Dquarkus.native.additional-build-args=--allow-incomplete-classpath | ||
|
||
code-coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
java-package: jdk | ||
- name: Cache Maven packages | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Generate jacoco report | ||
run: ./mvnw -U verify -Pjacoco | ||
- uses: codecov/[email protected] | ||
with: | ||
file: ./target/site/jacoco/jacoco.xml | ||
name: codecov |
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,35 @@ | ||
name: 'Build and Push Multi-Arch Image' | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'release-*' | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: | ||
group: march-build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
push-quay: | ||
name: Build and Push Manifest | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Build Pathfinder Container | ||
uses: konveyor/release-tools/build-push-quay@main | ||
with: | ||
architectures: "amd64, arm64" | ||
containerfile: "./src/main/docker/Dockerfile.native-multi-stage" | ||
image_name: "tackle-pathfinder" | ||
image_namespace: "konveyor" | ||
image_registry: "quay.io" | ||
extra-args: | | ||
--ulimit nofile=65535:65535 | ||
quay_publish_robot: ${{ secrets.QUAY_PUBLISH_ROBOT }} | ||
quay_publish_token: ${{ secrets.QUAY_PUBLISH_TOKEN }} | ||
ref: ${{ github.ref }} |
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
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,23 @@ | ||
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest as builder | ||
COPY . /tackle-pathfinder | ||
RUN microdnf -y install freetype-devel gcc glibc-devel libstdc++-static tar wget which zlib-devel | ||
WORKDIR /opt | ||
RUN wget https://github.com/graalvm/mandrel/releases/download/mandrel-21.3.5.1-Final/mandrel-java11-linux-$(if [ $(uname -m) == "x86_64" ]; then echo amd64; elif [ $(uname -m) == "amd64" ]; then echo amd64; else echo aarch64; fi)-21.3.5.1-Final.tar.gz | ||
RUN tar -xf mandrel-java11-linux-$(if [ $(uname -m) == "x86_64" ]; then echo amd64; elif [ $(uname -m) == "amd64" ]; then echo amd64; else echo aarch64; fi)-21.3.5.1-Final.tar.gz | ||
ENV JAVA_HOME="/opt/mandrel-java11-21.3.5.1-Final" | ||
ENV GRAALVM_HOME="/opt/mandrel-java11-21.3.5.1-Final" | ||
ENV PATH=/opt/mandrel-java11-21.3.5.1-Final/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
WORKDIR /tackle-pathfinder | ||
RUN ./mvnw package -Dquarkus.native.container-build=false -Dquarkus.native.container-runtime= -Dmaven.test.skip=true -DskipTests -Pnative | ||
|
||
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest | ||
WORKDIR /work/ | ||
RUN chown 1001 /work \ | ||
&& chmod "g+rwX" /work \ | ||
&& chown 1001:root /work | ||
COPY --chown=1001:root --from=builder /tackle-pathfinder/target/*-runner /work/application | ||
|
||
EXPOSE 8080 | ||
USER 1001 | ||
|
||
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] |