Skip to content

Do not rely on cached artifacts in the release workflow #7

Do not rely on cached artifacts in the release workflow

Do not rely on cached artifacts in the release workflow #7

Workflow file for this run

name: Build
on:
push:
branches:
- main
- "[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.x"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'README*'
pull_request:
env:
QUARKUS_CXF_MTOM_LARGE_ATTACHMENT_INCREMENT_KB: 512
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build-and-run-jvm-tests:
if: startsWith(github.head_ref, 'trigger-release-') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Ensure mvn cq:sync-versions -N causes no changes
shell: bash
run: |
./mvnw cq:sync-versions -Dcq.simpleElementWhitespace=AUTODETECT_PREFER_SPACE -N
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: mvn -B formatter:validate install
run: ./mvnw -B formatter:validate install
- name: 'Upload generated Antora docs site'
uses: actions/upload-artifact@v3
with:
name: docs
path: docs/target/site
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: Tar Maven Repo
shell: bash
run: |
tar -czf ${{ runner.temp }}/maven-repo.tgz -C ~ .m2/repository
# Avoid caching our own artifacts
rm -Rf ~/.m2/repository/io/quarkiverse/cxf
- name: Persist Maven Repo
uses: actions/upload-artifact@v3
with:
name: maven-repo
path: ${{ runner.temp }}/maven-repo.tgz
retention-days: 1
native-tests:
strategy:
fail-fast: false
matrix:
testModule: [client, hc5, metrics, mtom, mtom-awt, server, ws-addressing, ws-rm, ws-security-client, ws-security-policy, ws-security-server, ws-trust, wsdl2java, wsdl2java-no-config]
name: ${{matrix.testModule}} native tests
needs: build-and-run-jvm-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Download Maven Repo
uses: actions/download-artifact@v3
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
tar -xzf ../maven-repo.tgz -C ~
- name: cd integration-tests/${{matrix.testModule}} && mvn verify -Pnative
# Skip native tests for CodeQL Security Scans
if: "${{ env.SKIP_NATIVE_TESTS != 'true' }}"
run: cd integration-tests/${{matrix.testModule}} && ../../mvnw -B verify -Pnative -Dquarkus.native.container-build=true