-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mavenize project and add Github actions #91
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Java CI with Maven | ||
|
||
on: | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Set up Maven | ||
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5 | ||
with: | ||
maven-version: 3.9.6 | ||
- name: Build with Maven | ||
run: "mvn -B package --file pom.xml -DunofficialSuffix=\"'-PR${{ PR_NUMBER }}'\"" | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
- name: Archive Build Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: p2-repository | ||
path: com.wamas.ide.launching.update/target/repository/ | ||
retention-days: 7 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Java CI with Maven | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pinning the ubuntu version is even more important in the "official" build. |
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Set up Maven | ||
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5 | ||
with: | ||
maven-version: 3.9.6 | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml -DunofficialSuffix= | ||
- name: Archive Build Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: p2-repository | ||
path: com.wamas.ide.launching.update/target/repository/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
<!-- | ||
<tycho-snapshots>https://repo.eclipse.org/content/repositories/tycho-snapshots/</tycho-snapshots> | ||
--> | ||
<unofficialSuffix>'-UNOFFICIAL'</unofficialSuffix> | ||
</properties> | ||
|
||
<pluginRepositories> | ||
|
@@ -53,6 +54,7 @@ | |
</pluginRepositories> | ||
|
||
<build> | ||
<finalName>foobar</finalName> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this finalName for? |
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
|
@@ -261,12 +263,12 @@ | |
<repository> | ||
<id>eclipse</id> | ||
<layout>p2</layout> | ||
<url>http://download.eclipse.org/releases/2024-12</url> | ||
<url>http://download.eclipse.org/releases/2024-06</url> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In regards of reproducible builds, on OCXConf I've learned that we should add the specific build date here as well. |
||
</repository> | ||
<repository> | ||
<id>cbi-targetplatform-dsl-mirror</id> | ||
<layout>p2</layout> | ||
<url>https://download.eclipse.org/cbi/updates/tpd/release/3.0.0</url> | ||
<url>https://download.eclipse.org/cbi/updates/tpd/release/</url> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without the release number, this URL is a moving target as well, no? |
||
</repository> | ||
</repositories> | ||
<dependencies> | ||
|
@@ -285,7 +287,7 @@ | |
<applicationArg>target-platforms/default.tpd</applicationArg> | ||
</applicationArgs> | ||
</configuration> | ||
</plugin> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
@@ -327,6 +329,7 @@ | |
<timestampProvider>jgit</timestampProvider> | ||
<jgit.ignore>pom.xml .gitignore .launchers/**</jgit.ignore> | ||
<jgit.dirtyWorkingTree>warning</jgit.dirtyWorkingTree> | ||
<format>yyyyMMddHHmm${unofficialSuffix}</format> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When aiming for "reproducible builds", we also need to avoid dependencies with unspecified version numbers.
In particular, "latest" explicitly talks about a moving target, which breaks any reproducability of the build.