Skip to content

Commit

Permalink
ci: test against minimum supported and current stable Eclipse release
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Feb 16, 2024
1 parent 6036940 commit 31eac1b
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 50 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -111,6 +129,7 @@ jobs:

- name: Build with Maven
id: maven-build
continue-on-error: ${{ matrix.target-platform == 'unstable' }}
run: |
set -eu
Expand Down Expand Up @@ -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
19 changes: 16 additions & 3 deletions .github/workflows/licensecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<tycho.scmUrl>scm:git:https://github.com/eclipse/tm4e.git</tycho.scmUrl>
<jgit.dirtyWorkingTree>error</jgit.dirtyWorkingTree>
<tycho-surefire-plugin.platformArgs></tycho-surefire-plugin.platformArgs>
<tm4e.target-platform>oldest</tm4e.target-platform>
</properties>
<organization>
<name>Eclipse TM4E project</name>
Expand All @@ -34,7 +35,6 @@
</license>
</licenses>
<modules>
<module>target-platform</module>
<module>org.eclipse.tm4e.core</module>
<module>org.eclipse.tm4e.core.tests</module>
<module>org.eclipse.tm4e.registry</module>
Expand Down Expand Up @@ -83,11 +83,7 @@
<configuration>
<pomDependencies>consider</pomDependencies>
<target>
<artifact>
<groupId>org.eclipse.tm4e</groupId>
<artifactId>tm4e-target</artifactId>
<version>0.10.1-SNAPSHOT</version>
</artifact>
<file>${maven.multiModuleProjectDirectory}/target-platforms/${tm4e.target-platform}.target</file>
</target>
</configuration>
</plugin>
Expand Down
14 changes: 0 additions & 14 deletions target-platform/pom.xml

This file was deleted.

40 changes: 40 additions & 0 deletions target-platforms/latest.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="TM4E config targeting current stable Eclipse release" sequenceNumber="9">
<locations>

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
<repository location="https://download.eclipse.org/cbi/updates/license"/>
</location>

<!-- 4.30 = Eclipse 2023-12 -->

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.gson" version="0.0.0"/>
<unit id="com.google.gson.source" version="0.0.0"/>
<unit id="org.apache.batik.css" version="0.0.0"/>
<unit id="org.apache.batik.css.source" version="0.0.0"/>
<unit id="org.jcodings" version="0.0.0"/>
<unit id="org.jcodings.source" version="0.0.0"/>
<unit id="org.joni" version="0.0.0"/>
<unit id="org.joni.source" version="0.0.0"/>
<unit id="org.snakeyaml.engine" version="0.0.0"/>
<unit id="org.snakeyaml.engine.source" version="0.0.0"/>
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.ui.tests.harness" version="0.0.0"/>
<unit id="org.eclipse.jdt.annotation" version="0.0.0"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="org.eclipse.jdt.junit5.runtime" version="0.0.0"/>
<unit id="org.eclipse.ui.trace" version="0.0.0"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.30/"/>
</location>
</locations>

<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
</target>
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="tm4e" sequenceNumber="9">
<target name="TM4E config targeting oldest supported Eclipse release" sequenceNumber="9">
<locations>

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
<repository location="https://download.eclipse.org/cbi/updates/license"/>
</location>

<!-- 4.29 = Eclipse 2023-09 -->

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.10.1"/>
<unit id="org.apache.batik.css" version="1.16.0.v20221027-0840"/>
<unit id="com.google.gson" version="0.0.0"/>
<unit id="org.apache.batik.css" version="0.0.0"/>
<unit id="org.apache.batik.css.source" version="0.0.0"/>
<unit id="org.jcodings" version="0.0.0"/>
<unit id="org.jcodings.source" version="0.0.0"/>
<unit id="org.joni" version="0.0.0"/>
<unit id="org.joni.source" version="0.0.0"/>
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-09"/>
</location>

Expand All @@ -22,7 +29,6 @@
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="org.eclipse.jdt.junit5.runtime" version="0.0.0"/>
<unit id="org.eclipse.ui.trace" version="0.0.0"/>
<!-- 4.29 = Eclipse 2023-09 -->
<repository location="https://download.eclipse.org/eclipse/updates/4.29/"/>
</location>

Expand All @@ -36,27 +42,7 @@
</dependency>
</dependencies>
</location>

<location includeDependencyDepth="direct" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven">
<dependencies>
<dependency>
<groupId>org.jruby.joni</groupId>
<artifactId>joni</artifactId>
<version>2.2.1</version>
<type>jar</type>
</dependency>
</dependencies>
<instructions><![CDATA[
Bundle-Name: Bundle derived from maven artifact ${mvnGroupId}:${mvnArtifactId}:${mvnVersion}
version: ${version_cleanup;${mvnVersion}}
Bundle-SymbolicName: org.${mvnArtifactId}
Bundle-Version: ${version}
Import-Package: *;resolution:=optional
Export-Package: *;version="${version}";-noimport:=true
DynamicImport-Package: *
]]></instructions>
</location>
</locations>

<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
</target>
</target>
40 changes: 40 additions & 0 deletions target-platforms/unstable.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="TM4E config targeting integration builds of the next Eclipse release" sequenceNumber="9">
<locations>

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
<repository location="https://download.eclipse.org/cbi/updates/license"/>
</location>

<!-- 4.31 = Eclipse 2024-03 -->

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.gson" version="0.0.0"/>
<unit id="com.google.gson.source" version="0.0.0"/>
<unit id="org.apache.batik.css" version="0.0.0"/>
<unit id="org.apache.batik.css.source" version="0.0.0"/>
<unit id="org.jcodings" version="0.0.0"/>
<unit id="org.jcodings.source" version="0.0.0"/>
<unit id="org.joni" version="0.0.0"/>
<unit id="org.joni.source" version="0.0.0"/>
<unit id="org.snakeyaml.engine" version="0.0.0"/>
<unit id="org.snakeyaml.engine.source" version="0.0.0"/>
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-03"/>
</location>

<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.ui.tests.harness" version="0.0.0"/>
<unit id="org.eclipse.jdt.annotation" version="0.0.0"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="org.eclipse.jdt.junit5.runtime" version="0.0.0"/>
<unit id="org.eclipse.ui.trace" version="0.0.0"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.31-I-builds/"/>
</location>
</locations>

<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
</target>

0 comments on commit 31eac1b

Please sign in to comment.