Skip to content

Commit

Permalink
Merge pull request #614 from vitruv-tools/build/pure-maven
Browse files Browse the repository at this point in the history
Change project structure and build process to pure (Tycho-less) Maven
  • Loading branch information
larsk21 authored Nov 20, 2024
2 parents f29dee3 + 6453e68 commit e02dbb9
Show file tree
Hide file tree
Showing 122 changed files with 995 additions and 1,196 deletions.
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
* @tsaglam
* @TomWerm
* @vitruv-tools/maintainers
26 changes: 16 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "11:00"
timezone: "Europe/Berlin"
commit-message:
prefix: "GitHub Actions"
include: "scope"
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
ignore:
- dependency-name: tools.vitruv:*
commit-message:
prefix: "Maven"
include: "scope"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "GitHub Actions"
include: "scope"
142 changes: 78 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,87 @@
name: CI

# workflow triggers
on:
push:
branches: [main]
release:
types: [created]
# manually
workflow_dispatch:
# PRs on `main`
pull_request:
branches:
- main
# nightly
schedule:
- cron: '5 3 * * *' # run nightly at 3:05 am
workflow_call:
- cron: "0 3 * * *"

jobs:
build:
verify:
name: Verify build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Java and Maven cache
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '17'
check-latest: true
cache: 'maven'

- name: Verify build
run: >
./mvnw clean verify
--batch-mode
--update-snapshots
--no-transfer-progress
- name: Stage build results
run: mkdir staging-${{ matrix.os }} && cp **/target/*.jar staging-${{ matrix.os }}/

- name: Upload build results
uses: actions/[email protected]
with:
name: Build Results
path: staging-*/

deploy-snapshot:
name: Deploy snapshot
runs-on: ubuntu-latest
needs: [verify]
if: github.ref == 'refs/heads/main' && github.repository_owner == 'vitruv-tools'
strategy:
fail-fast: true

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/MANIFEST.MF') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Build and Verify
run: >
./mvnw -B -U clean verify
'-Dstyle.color=always'
'-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
'-Dorg.slf4j.simpleLogger.log.org.eclipse.tycho.core.resolver.DefaultTychoResolver=warn'
'-Dorg.slf4j.simpleLogger.log.org.eclipse.tycho.osgi.configuration.MavenContextConfigurator=warn'
'-Dorg.slf4j.simpleLogger.log.org.eclipse.sisu.equinox.launching.internal.DefaultEquinoxLauncher=warn'
'-Dorg.slf4j.simpleLogger.log.org.eclipse.xtext.maven.XtextGenerateMojo=warn'
'-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog'
env:
MAVEN_OPTS: -Djansi.force=true
- name: Store Framework Artifact
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: framework
path: releng/tools.vitruv.updatesite/target/repository
retention-days: 1
- name: Publish Nightly Update Site
if: github.event_name != 'release' && github.ref == 'refs/heads/main' && github.repository_owner == 'vitruv-tools' && matrix.os == 'ubuntu-latest'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: vitruv-tools/updatesite
destination_dir: nightly/framework
publish_dir: releng/tools.vitruv.updatesite/target/repository
publish_branch: main
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Publish Release Update Site
if: github.event_name == 'release' && github.repository_owner == 'vitruv-tools' && matrix.os == 'ubuntu-latest'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: vitruv-tools/updatesite
destination_dir: release/framework/${{ github.event.release.tag_name }}
publish_dir: releng/tools.vitruv.updatesite/target/repository
publish_branch: main
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Java and Maven cache
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '17'
check-latest: true
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Deploy snapshot
run: >
./mvnw clean deploy -P snapshot
-DskipTests
--batch-mode
--update-snapshots
--no-transfer-progress
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
112 changes: 0 additions & 112 deletions .github/workflows/validation.yml

This file was deleted.

33 changes: 8 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
# Eclipse/Java
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*.class

# Xtext
src-gen/
**/model/generated/
.antlr-generator-*-patch.jar

# EMF
model-gen/

# Xtend
xtend-gen/
*._trace
*.xtendbin
# VS Code
.vscode/

# Maven
target/
.polyglot.build.properties
.mvn/wrapper/maven-wrapper.jar
*.log
.mvn/wrapper/*.jar

# Custom
EvaluationData
# Eclipse
META-INF
build.properties
plugin.properties
8 changes: 0 additions & 8 deletions .mvn/extensions.xml

This file was deleted.

3 changes: 3 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--update-snapshots
--fail-at-end
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Loading

0 comments on commit e02dbb9

Please sign in to comment.