diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18208461a..10cf96fd6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,6 +54,11 @@ jobs: - ubuntu-latest - macos-11 # macos-latest -> more macos-11 runners than macos-12 available - windows-latest + target-platform: + - oldest + - latest + - unstable + runs-on: ${{ matrix.os }} timeout-minutes: 15 @@ -99,10 +104,23 @@ jobs: - name: "Cache: Local Maven Repository" uses: actions/cache@v4 with: + # Excluded sub directory not working https://github.com/actions/cache/issues/494#issuecomment-948783891 path: | - ~/.m2/repository + ~/.m2/repository/* + !~/.m2/repository/.cache/tycho + !~/.m2/repository/.meta/p2-artifacts.properties + !~/.m2/repository/p2 !~/.m2/repository/*SNAPSHOT* - key: ${{ runner.os }}-mvnrepo-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/target-platform/tm4e-target.target') }} + key: ${{ runner.os }}-repo-mvn-${{ hashFiles('**/pom.xml') }} + + - name: "Cache: Local Tycho Repository" + uses: actions/cache@v4 + with: + path: | + ~/.m2/repository/.cache/tycho + ~/.m2/repository/.meta/p2-artifacts.properties + ~/.m2/repository/p2 + key: ${{ runner.os }}-repo-tycho-${{ hashFiles(format('target-platforms/{0}.target', matrix.target-platform)) }} - name: "Install: Maven" uses: stCarolas/setup-maven@v4.5 # https://github.com/stCarolas/setup-maven @@ -111,6 +129,7 @@ jobs: - name: Build with Maven id: maven-build + continue-on-error: ${{ matrix.target-platform == 'unstable' }} run: | set -eu @@ -139,6 +158,7 @@ jobs: --show-version \ -Dtycho.disableP2Mirrors=true \ -Dsurefire.rerunFailingTestsCount=3 \ + -Dtm4e.target-platform=${{ matrix.target-platform }} \ $maven_args \ ${{ github.event.inputs.additional_maven_args }} \ clean verify diff --git a/.github/workflows/licensecheck.yml b/.github/workflows/licensecheck.yml index 85345550f..f02ae6cbc 100644 --- a/.github/workflows/licensecheck.yml +++ b/.github/workflows/licensecheck.yml @@ -44,10 +44,23 @@ jobs: - name: "Cache: Local Maven Repository" uses: actions/cache@v4 with: + # Excluded sub directory not working https://github.com/actions/cache/issues/494#issuecomment-948783891 path: | - ~/.m2/repository - !~/.m2/**/*SNAPSHOT* - key: ${{ runner.os }}-mvnrepo-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/target-platform/tm4e-target.target') }} + ~/.m2/repository/* + !~/.m2/repository/.cache/tycho + !~/.m2/repository/.meta/p2-artifacts.properties + !~/.m2/repository/p2 + !~/.m2/repository/*SNAPSHOT* + key: ${{ runner.os }}-repo-mvn-${{ hashFiles('**/pom.xml') }} + + - name: "Cache: Local Tycho Repository" + uses: actions/cache@v4 + with: + path: | + ~/.m2/repository/.cache/tycho + ~/.m2/repository/.meta/p2-artifacts.properties + ~/.m2/repository/p2 + key: ${{ runner.os }}-repo-tycho-${{ hashFiles('target-platforms/oldest.target') }} - name: "Install: Maven" uses: stCarolas/setup-maven@v4.5 # https://github.com/stCarolas/setup-maven diff --git a/pom.xml b/pom.xml index c55022308..bfde5dad3 100644 --- a/pom.xml +++ b/pom.xml @@ -19,6 +19,7 @@ scm:git:https://github.com/eclipse/tm4e.git error + oldest Eclipse TM4E project @@ -34,7 +35,6 @@ - target-platform org.eclipse.tm4e.core org.eclipse.tm4e.core.tests org.eclipse.tm4e.registry @@ -83,11 +83,7 @@ consider - - org.eclipse.tm4e - tm4e-target - 0.10.1-SNAPSHOT - + ${maven.multiModuleProjectDirectory}/target-platforms/${tm4e.target-platform}.target diff --git a/target-platform/pom.xml b/target-platform/pom.xml deleted file mode 100644 index 323e3ef57..000000000 --- a/target-platform/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - org.eclipse - org.eclipse.tm4e - 0.10.1-SNAPSHOT - - - org.eclipse.tm4e - tm4e-target - eclipse-target-definition - \ No newline at end of file diff --git a/target-platforms/latest.target b/target-platforms/latest.target new file mode 100644 index 000000000..258f458ed --- /dev/null +++ b/target-platforms/latest.target @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target-platform/tm4e-target.target b/target-platforms/oldest.target similarity index 64% rename from target-platform/tm4e-target.target rename to target-platforms/oldest.target index e59e6adee..2485a04ff 100644 --- a/target-platform/tm4e-target.target +++ b/target-platforms/oldest.target @@ -1,6 +1,6 @@ - + @@ -8,9 +8,16 @@ + + - - + + + + + + + @@ -22,7 +29,6 @@ - @@ -36,27 +42,7 @@ - - - - - org.jruby.joni - joni - 2.2.1 - jar - - - - - + \ No newline at end of file diff --git a/target-platforms/unstable.target b/target-platforms/unstable.target new file mode 100644 index 000000000..75e847eeb --- /dev/null +++ b/target-platforms/unstable.target @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file