From d466905532b5bcd76f798fa565f3e5506548e81b Mon Sep 17 00:00:00 2001 From: mrizzi Date: Wed, 1 Mar 2023 11:37:50 +0100 Subject: [PATCH 1/2] Restored previous GH jobs with some debug info --- .github/workflows/pull_request_push_build.yml | 199 +++++++++--------- 1 file changed, 101 insertions(+), 98 deletions(-) diff --git a/.github/workflows/pull_request_push_build.yml b/.github/workflows/pull_request_push_build.yml index d635692..d2bd0cb 100644 --- a/.github/workflows/pull_request_push_build.yml +++ b/.github/workflows/pull_request_push_build.yml @@ -11,121 +11,124 @@ on: - 'releases/**' jobs: -# windup-build: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout repo -# uses: actions/checkout@v3 -# with: -# repository: windup/windup -# ref: ${{ github.base_ref }} -# - name: Set up JDK 11 -# uses: actions/setup-java@v3 -# with: -# java-version: '11' -# distribution: 'temurin' -# java-package: jdk -# - name: Cache local Maven repository -# uses: actions/cache@v3 -# with: -# path: .m2 -# key: maven-windup-build-${{ github.sha }} -# - name: Build Windup on JDK 11 -# run: mvn -B clean install -DskipTests -Dmaven.repo.local=.m2 -# -# windup-rulesets-build: -# runs-on: ubuntu-latest -# needs: [windup-build] -# steps: -# - name: Checkout repo -# uses: actions/checkout@v3 -# with: -# repository: windup/windup-rulesets -# ref: ${{ github.base_ref }} -# - name: Set up JDK 11 -# uses: actions/setup-java@v3 -# with: -# java-version: '11' -# distribution: 'temurin' -# java-package: jdk -# - name: Cache local Maven repository -# uses: actions/cache@v3 -# with: -# path: .m2 -# key: maven-windup-rulesets-build-${{ github.sha }} -# restore-keys: | -# maven-windup-build-${{ github.sha }} -# - name: Build Windup Rulesets -# run: mvn -B clean install -DskipTests -Dmaven.repo.local=.m2 -# -# windup-cli-build: -# strategy: -# fail-fast: false -# matrix: -# jdk-distribution: [ temurin ] -# os: [ubuntu-latest, windows-latest, macos-latest] -# runs-on: ${{ matrix.os }} -# needs: [windup-rulesets-build] -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 -# - name: Set up JDK 11 -# uses: actions/setup-java@v3 -# with: -# java-version: '11' -# distribution: ${{ matrix.jdk-distribution }} -# - name: Cache local Maven repository -# uses: actions/cache@v3 -# with: -# path: .m2 -# key: maven-windup-cli-build-${{ github.sha }} -# enableCrossOsArchive: true -# restore-keys: | -# maven-windup-rulesets-build-${{ github.sha }} -# - name: Set up Maven -# uses: stCarolas/setup-maven@v4.5 -# with: -# maven-version: 3.8.7 -# - name: Maven build -# run: mvn clean install -DskipTests -B -s build/settings.xml -Dmaven.repo.local=.m2 - - windup-cli-build: - strategy: - fail-fast: false - matrix: - jdk-distribution: [ temurin ] - os: [ ubuntu-latest, windows-latest, macos-latest ] - runs-on: ${{ matrix.os }} + windup-build: + runs-on: ubuntu-latest steps: - - name: Checkout windup project + - name: Checkout repo uses: actions/checkout@v3 with: repository: windup/windup ref: ${{ github.base_ref }} - path: windup - - name: Checkout windup-rulesets project + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + java-package: jdk + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: .m2 + key: maven-windup-build-${{ github.sha }} + - name: Build Windup on JDK 11 + run: mvn -B clean install -DskipTests -Dmaven.repo.local=.m2 + + windup-rulesets-build: + runs-on: ubuntu-latest + needs: [windup-build] + steps: + - name: Checkout repo uses: actions/checkout@v3 with: repository: windup/windup-rulesets ref: ${{ github.base_ref }} - path: windup-rulesets - - name: Checkout PR code - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + java-package: jdk + - name: Cache local Maven repository + uses: actions/cache@v3 with: - path: windup-distribution + path: .m2 + key: maven-windup-rulesets-build-${{ github.sha }} + restore-keys: | + maven-windup-build-${{ github.sha }} + - name: Build Windup Rulesets + run: mvn -B clean install -DskipTests -Dmaven.repo.local=.m2 + + windup-cli-build: + strategy: + fail-fast: false + matrix: + jdk-distribution: [ temurin ] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + needs: [windup-rulesets-build] + steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Set up JDK 11 uses: actions/setup-java@v3 with: java-version: '11' distribution: ${{ matrix.jdk-distribution }} - cache: 'maven' + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: .m2 + key: maven-windup-cli-build-${{ github.sha }} + enableCrossOsArchive: true + restore-keys: | + maven-windup-rulesets-build-${{ github.sha }} + - name: some debugging + run: find ./.m2 + shell: bash - name: Set up Maven uses: stCarolas/setup-maven@v4.5 with: maven-version: 3.8.7 - - name: Build Windup dependencies - run: | - mvn install -DskipTests -f windup - mvn install -DskipTests -f windup-rulesets - name: Maven build - run: mvn clean install -DskipTests -B -s windup-distribution/build/settings.xml -f windup-distribution + run: mvn clean install -DskipTests -B -s build/settings.xml -Dmaven.repo.local=.m2 + +# windup-cli-build: +# strategy: +# fail-fast: false +# matrix: +# jdk-distribution: [ temurin ] +# os: [ ubuntu-latest, windows-latest, macos-latest ] +# runs-on: ${{ matrix.os }} +# steps: +# - name: Checkout windup project +# uses: actions/checkout@v3 +# with: +# repository: windup/windup +# ref: ${{ github.base_ref }} +# path: windup +# - name: Checkout windup-rulesets project +# uses: actions/checkout@v3 +# with: +# repository: windup/windup-rulesets +# ref: ${{ github.base_ref }} +# path: windup-rulesets +# - name: Checkout PR code +# uses: actions/checkout@v3 +# with: +# path: windup-distribution +# - name: Set up JDK 11 +# uses: actions/setup-java@v3 +# with: +# java-version: '11' +# distribution: ${{ matrix.jdk-distribution }} +# cache: 'maven' +# - name: Set up Maven +# uses: stCarolas/setup-maven@v4.5 +# with: +# maven-version: 3.8.7 +# - name: Build Windup dependencies +# run: | +# mvn install -DskipTests -f windup +# mvn install -DskipTests -f windup-rulesets +# - name: Maven build +# run: mvn clean install -DskipTests -B -s windup-distribution/build/settings.xml -f windup-distribution From b9450a414205f7eeec3a210d00ece6435871874b Mon Sep 17 00:00:00 2001 From: mrizzi Date: Wed, 1 Mar 2023 14:14:31 +0100 Subject: [PATCH 2/2] Escaped '-D' Maven option for Windows --- .github/workflows/pull_request_push_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_push_build.yml b/.github/workflows/pull_request_push_build.yml index d2bd0cb..3ddee62 100644 --- a/.github/workflows/pull_request_push_build.yml +++ b/.github/workflows/pull_request_push_build.yml @@ -90,7 +90,7 @@ jobs: with: maven-version: 3.8.7 - name: Maven build - run: mvn clean install -DskipTests -B -s build/settings.xml -Dmaven.repo.local=.m2 + run: mvn clean install -DskipTests -B -s build/settings.xml -D"maven.repo.local=.m2" # windup-cli-build: # strategy: