Skip to content

Commit

Permalink
ci: add tests for latest release of Eclipse
Browse files Browse the repository at this point in the history
  • Loading branch information
briandealwis committed Dec 14, 2021
1 parent 4772848 commit 94f7713
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 5 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/eclipse-latest-java11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Eclipse latest release on Java 11
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
CLOUDSDK_CORE_DISABLE_USAGE_REPORTING: true

steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v1
with:
java-version: 8 # Java 8 required for compilation.
- name: Set JDK 8 toolchain
run: |
sed -i.bak -e "s,JDK_8_HOME,${JAVA_HOME}," .github/workflows/toolchains.xml
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Set JDK 11 toolchain
run: |
sed -i.bak -e "s,JDK_11_HOME,${JAVA_HOME}," .github/workflows/toolchains.xml
- uses: google-github-actions/[email protected]

- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ env.ECLIPSE_TARGET }}
- name: Run tests
env:
MAVEN_OPTS: '-Xmx700m -Dorg.slf4j.simpleLogger.showDateTime=true'
run: |
# google-github-actions/[email protected] sets up gcloud at, e.g,.
# "/opt/hostedtoolcache/gcloud/325.0.0/x64". appengine-plugins-core
# fails to find it, since the directory doesn't end with
# "google-cloud-sdk". Instead, appengine-plugins-core picks up the SDK
# at "/usr/lib/google-cloud-sdk" managed by a package manager. As a
# workaround, create a symlink at $HOME and add it to $PATH.
ln -s "$( dirname "$( dirname "$( which gcloud )")")" \
"${HOME}"/google-cloud-sdk
ls -ld "${HOME}"/google-cloud-sdk
export PATH="${HOME}/google-cloud-sdk/bin:${PATH}"
gcloud components install app-engine-java --quiet
xvfb-run mvn --show-version --batch-mode --fail-at-end \
--toolchains=.github/workflows/toolchains.xml \
-Derrorprone -Dci-build \
clean verify
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Import-Package: com.google.cloud.tools.appengine.operations;version="0.8.1",
com.google.common.collect;version="[30.0.0,31.0.0)",
com.google.common.util.concurrent;version="[30.0.0,31.0.0)",
com.google.gson;version="[2.8.2,3.0)",
javax.inject;version="1.0.0",
javax.json;version="[1.0,1.1)",
org.eclipse.core.resources,
org.eclipse.core.runtime;version="3.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Import-Package: com.google.api.client.auth.oauth2;version="[1.25.0,1.26.0)",
com.google.cloud.tools.eclipse.util.jobs,
com.google.cloud.tools.eclipse.util.service,
com.google.cloud.tools.eclipse.util.status,
javax.inject;version="1.0.0",
org.eclipse.compare,
org.eclipse.compare.structuremergeviewer,
org.eclipse.core.filesystem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Require-Bundle: com.google.cloud.tools.eclipse.test.dependencies
Import-Package: com.google.cloud.tools.eclipse.test.util,
com.google.cloud.tools.eclipse.test.util.http,
com.google.cloud.tools.eclipse.test.util.project,
javax.inject;version="1.0.0",
org.eclipse.jdt.core,
org.eclipse.jst.common.project.facet.core
Require-Capability: com.google.cloud.tools.facets.appengine;filter:="(type=jre8)"
41 changes: 36 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
<!-- Execution environment supported by Cloud Tools for Eclipse -->
<requiredExecutionEnvironment>JavaSE-1.8</requiredExecutionEnvironment>

<tycho.version>1.5.0</tycho.version>
<tycho-extras.version>1.5.0</tycho-extras.version>
<tycho.version>2.5.0</tycho.version>
<tycho-extras.version>2.5.0</tycho-extras.version>
<product.version.qualifier.suffix/> <!-- 0-length string by default -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<eclipse.target>2018-09</eclipse.target> <!-- the default build -->
<!-- <eclipse.target>latest-release</eclipse.target> --> <!-- the default build -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

Expand Down Expand Up @@ -417,11 +417,42 @@

<profile>
<!-- Default target if no eclipse.target specified. -->
<id>build-eclipse-2018-09</id>
<id>build-latest-release</id>
<activation>
<property>
<name>!eclipse.target</name>
<!-- when no longer the default: <name>eclipse.target</name> <value>2018-09</value> -->
<!-- <name>eclipse.target</name> <value>latest-release</value> -->
</property>
</activation>
<properties>
<jettyMinVersion>9.4</jettyMinVersion>
<jettyMaxVersion>99</jettyMaxVersion>
</properties>
<repositories>
<repository>
<id>eclipse-latest-release</id>
<name>Eclipse latest release</name>
<url>https://download.eclipse.org/releases/latest/</url>
<layout>p2</layout>
</repository>
<repository>
<id>orbit</id>
<url>https://download.eclipse.org/tools/orbit/downloads/latest-R/</url>
<layout>p2</layout>
</repository>
<repository>
<id>yedit</id>
<url>http://dadacoalition.org/yedit</url>
<layout>p2</layout>
</repository>
</repositories>
</profile>

<profile>
<id>build-eclipse-2018-09</id>
<activation>
<property>
<name>eclipse.target</name> <value>2018-09</value>
</property>
</activation>
<properties>
Expand Down

0 comments on commit 94f7713

Please sign in to comment.