Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/maven-pr.yml
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
Copy link
Member

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.


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
38 changes: 38 additions & 0 deletions .github/workflows/maven.yml
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
Copy link
Member

Choose a reason for hiding this comment

The 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/
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@
*.ser
Thumbs.db
*.swp

**/src/gen
**/target/*
/com.wamas.ide.launching/model
*.rej
*.bak
*.xtendbin
/build.log
/repository
# tycho creates temporary files outside the maven target directory
.tycho*
12 changes: 12 additions & 0 deletions com.wamas.ide.launching.feature/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>com.wamas.ide.launching-parent</artifactId>
<groupId>com.wamas.ide.launching</groupId>
<version>0.7.0-SNAPSHOT</version>
</parent>
<artifactId>com.wamas.ide.launching.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
3 changes: 1 addition & 2 deletions com.wamas.ide.launching.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ Bundle-ActivationPolicy: lazy
Require-Bundle: com.wamas.ide.launching,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide,
org.antlr.runtime
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: com.wamas.ide.launching.ide.contentassist.antlr,
com.wamas.ide.launching.ide.contentassist.antlr.internal
Automatic-Module-Name: com.wamas.ide.launching.ide

8 changes: 4 additions & 4 deletions com.wamas.ide.launching.ide/build.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source.. = src/,\
src-gen/,\
xtend-gen/
source.. = src/main/java,\
src/gen/xtext,\
target/generated-sources/xtend/
bin.includes = .,\
META-INF/
javacDefaultEncoding.. = UTF-8
output.. = bin/
output.. = target/classes
12 changes: 12 additions & 0 deletions com.wamas.ide.launching.ide/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>com.wamas.ide.launching-parent</artifactId>
<groupId>com.wamas.ide.launching</groupId>
<version>0.7.0-SNAPSHOT</version>
</parent>
<artifactId>com.wamas.ide.launching.ide</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

This file was deleted.

This file was deleted.

Loading