Add trailing whitespace in comments #100
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
name: Nightly Quarkus Tests | |
on: | |
push: | |
paths: | |
- '.github/workflows/quarkus.yml' | |
pull_request: | |
paths: | |
- '.github/workflows/quarkus.yml' | |
schedule: | |
- cron: '0 3 * * *' | |
env: | |
COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end" | |
DB_NAME: hibernate_orm_test | |
DB_PASSWORD: hibernate_orm_test | |
DB_USER: hibernate_orm_test | |
GRAALVM_HOME: ${{ github.workspace }}/graalvm | |
LABSJDK_HOME: ${{ github.workspace }}/jdk | |
LANG: en_US.UTF-8 # Workaround testsuite locale issue | |
MX_GIT_CACHE: refcache | |
MX_PATH: ${{ github.workspace }}/mx | |
MX_PYTHON: python3.8 | |
NATIVE_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.native.native-image-xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install -DskipDocs -Dquarkus.native.container-build=false" | |
QUARKUS_PATH: ${{ github.workspace }}/quarkus | |
permissions: {} | |
jobs: | |
build-quarkus-and-graalvm: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
name: Nightly Quarkus and GraalVM build | |
runs-on: ubuntu-20.04 | |
outputs: | |
matrix: ${{ steps.read.outputs.matrix }} | |
steps: | |
- name: Checkout oracle/graal | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Checkout graalvm/mx | |
uses: actions/checkout@v3 | |
with: | |
repository: graalvm/mx.git | |
fetch-depth: 1 | |
ref: master | |
path: ${{ env.MX_PATH }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Get latest Quarkus release | |
run: | | |
export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}') | |
echo Getting Quarkus $QUARKUS_VERSION | |
curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION | |
mkdir ${QUARKUS_PATH} | |
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.mx | |
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }} | |
restore-keys: | | |
${{ runner.os }}-mx- | |
- name: Fetch LabsJDK | |
run: | | |
mkdir jdk-dl | |
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-21 --to jdk-dl --alias ${LABSJDK_HOME} | |
- name: Build graalvm native-image | |
run: | | |
export JAVA_HOME=${LABSJDK_HOME} | |
cd substratevm | |
${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" build | |
mv $(${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" graalvm-home) ${GRAALVM_HOME} | |
${GRAALVM_HOME}/bin/native-image --version | |
- name: Tar GraalVM | |
shell: bash | |
run: tar -czvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) | |
- name: Persist GraalVM build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: graalvm | |
path: graalvm.tgz | |
- name: Build Quarkus | |
run: | | |
cd ${QUARKUS_PATH} | |
eval ./mvnw -e -B -Dquickly | |
- name: Read json file with native-tests matrix | |
id: read | |
run: | | |
json=$(tr -d '\n' < ${QUARKUS_PATH}/.github/native-tests.json ) | |
echo $json | |
echo "matrix=${json}" >> $GITHUB_OUTPUT | |
- name: Tar Maven Repo | |
shell: bash | |
run: tar -czvf maven-repo.tgz -C ~ .m2/repository | |
- name: Persist Maven Repo | |
uses: actions/upload-artifact@v3 | |
with: | |
name: maven-repo | |
path: maven-repo.tgz | |
native-tests: | |
name: Native Tests - ${{matrix.category}} | |
needs: build-quarkus-and-graalvm | |
runs-on: ubuntu-latest | |
# Ignore the following YAML Schema error | |
timeout-minutes: ${{matrix.timeout}} | |
strategy: | |
max-parallel: 8 | |
fail-fast: false | |
matrix: ${{ fromJson(needs.build-quarkus-and-graalvm.outputs.matrix) }} | |
steps: | |
- name: Download GraalVM build | |
if: startsWith(matrix.os-name, 'ubuntu') | |
uses: actions/download-artifact@v3 | |
with: | |
name: graalvm | |
path: . | |
- name: Extract GraalVM build | |
if: startsWith(matrix.os-name, 'ubuntu') | |
shell: bash | |
run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) | |
- name: Get latest Quarkus release | |
if: startsWith(matrix.os-name, 'ubuntu') | |
run: | | |
export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}') | |
echo Getting Quarkus $QUARKUS_VERSION | |
curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION | |
mkdir ${QUARKUS_PATH} | |
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1 | |
- name: Reclaim Disk Space | |
if: startsWith(matrix.os-name, 'ubuntu') | |
run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh | |
- name: Download Maven Repo | |
if: startsWith(matrix.os-name, 'ubuntu') | |
uses: actions/download-artifact@v3 | |
with: | |
name: maven-repo | |
path: . | |
- name: Extract Maven Repo | |
if: startsWith(matrix.os-name, 'ubuntu') | |
shell: bash | |
run: tar -xzf maven-repo.tgz -C ~ | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: 'latest' | |
java-version: '17' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build with Maven | |
if: startsWith(matrix.os-name, 'ubuntu') | |
env: | |
TEST_MODULES: ${{matrix.test-modules}} | |
run: | | |
export GRAALVM_HOME=${{ github.workspace }}/graalvm | |
cd ${QUARKUS_PATH} | |
${GRAALVM_HOME}/bin/native-image --version | |
./mvnw $COMMON_MAVEN_ARGS -f integration-tests -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS | |
- name: Prepare failure archive (if maven failed) | |
if: failure() | |
shell: bash | |
run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T - | |
- name: Upload failure Archive (if maven failed) | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: test-reports-native-${{matrix.category}} | |
path: 'test-reports.tgz' |