Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ A clear and concise description of what you expected to happen.

**Screenshots / Exceptions**
If applicable, add screenshots to help explain your problem.
Provide error messages and exceptions you may got in the eclipse plugin (see error log view).
Provide error messages and exceptions you may got in VS Code (Output view, channel "CML Language Server") or in your application (standalone library).

**Input files to reproduce**
If possible, provide input files which allow reproducing the problem (CML or SCL files).

**IDE and Plugin (please complete the following information):**
- Eclipse version
- ContextMapper plugin version
**Environment (please complete the following information):**
- VS Code version and Context Mapper extension version, or version of the standalone library
- Java version

**Additional context**
Add any other context about the problem here.
83 changes: 11 additions & 72 deletions .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ on:
jobs:
build_standalone:
name: Build Standalone Libraries (DSL, LSP)
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
# release commits are built and published by the release workflow (tag)
if: startsWith(github.event.head_commit.message, 'Release v') == false
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
uses: actions/cache@v4
- name: Gradle caches
uses: actions/cache@v6
with:
path: |
~/.gradle/caches
Expand All @@ -40,52 +41,24 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

build_eclipse:
name: Build Eclipse Plugin
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Build with Maven
run: ./mvnw clean verify

publish_standalone_lib:
name: Publish Snapshots of Libraries (DSL Standalone Lib, LSP)
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
runs-on: ubuntu-latest

needs:
- build_eclipse
- build_standalone

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
uses: actions/cache@v4
- name: Gradle caches
uses: actions/cache@v6
with:
path: |
~/.gradle/caches
Expand All @@ -109,37 +82,3 @@ jobs:
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}

publish_eclipse_snapshot:
name: Publish Snapshot of Eclipse Plugin (P2 repo)
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
runs-on: ubuntu-latest

needs:
- build_eclipse
- build_standalone

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Configure Git user
run: |
git config --global user.email "contextmapper-ci@kapferer.ch"
git config --global user.name "Context Mapper CI"
- name: Publish Eclipse plugin to Snapshot Repo
run: ./mvnw --settings ./.github/workflows/settings.xml clean deploy -Prelease-composite -Prelease-snapshot-version -Dgithub-update-repo=https://${{ secrets.GH_CI_USERNAME }}:${{ secrets.GH_CI_TOKEN }}@github.com/ContextMapper/eclipse-update-site-snapshots
36 changes: 5 additions & 31 deletions .github/workflows/build_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
build_standalone:
name: Build Standalone Libraries (DSL, LSP)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
uses: actions/cache@v4
- name: Gradle caches
uses: actions/cache@v6
with:
path: |
~/.gradle/caches
Expand All @@ -37,29 +37,3 @@ jobs:
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

build_eclipse:
name: Build Eclipse Plugin
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Build with Maven
run: ./mvnw clean verify

76 changes: 58 additions & 18 deletions .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,80 @@ name: Trigger Release (manual)

on:
workflow_dispatch:
inputs:
release-version:
description: 'Release version (x.y.z); default: the current version without -SNAPSHOT'
required: false
next-version:
description: 'Next development version (x.y.z-SNAPSHOT); default: next patch version'
required: false

jobs:
prepare_release:
name: Prepare Release
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# the CI token is needed (instead of the default GITHUB_TOKEN) so that pushing the tag triggers the release workflow
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- name: Set up JDK 21
uses: actions/setup-java@v4
token: ${{ secrets.GH_CI_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: 21
java-version: 17
- name: Configure Git user
run: |
git config user.email "contextmapper-ci@kapferer.ch"
git config user.name "Context Mapper CI"
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
uses: actions/cache@v4
- name: Gradle caches
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Prepare Release
run: ./mvnw --settings ./.github/workflows/settings.xml clean release:prepare -B
${{ runner.os }}-gradle-
- name: Determine versions
run: |
CURRENT=$(sed -n 's/^version=//p' gradle.properties)
RELEASE="${RELEASE_INPUT:-${CURRENT%-SNAPSHOT}}"
if ! [[ "$RELEASE" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid release version: $RELEASE"; exit 1
fi
if [ -z "$NEXT_INPUT" ]; then
IFS=. read -r MAJOR MINOR PATCH <<< "$RELEASE"
NEXT="$MAJOR.$MINOR.$((PATCH + 1))-SNAPSHOT"
else
NEXT="$NEXT_INPUT"
fi
if ! [[ "$NEXT" =~ ^[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT$ ]]; then
echo "Invalid next development version: $NEXT"; exit 1
fi
if git rev-parse -q --verify "refs/tags/v$RELEASE" > /dev/null; then
echo "Tag v$RELEASE already exists"; exit 1
fi
echo "Releasing $RELEASE (current: $CURRENT, next: $NEXT)"
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
echo "NEXT=$NEXT" >> $GITHUB_ENV
env:
GH_CI_USERNAME: ${{ secrets.GH_CI_USERNAME }}
GH_CI_TOKEN: ${{ secrets.GH_CI_TOKEN }}

RELEASE_INPUT: ${{ inputs.release-version }}
NEXT_INPUT: ${{ inputs.next-version }}
- name: Build release version
run: |
sed -i "s/^version=.*/version=$RELEASE/" gradle.properties
chmod +x gradlew
./gradlew clean build
- name: Commit and tag release, prepare next development iteration
run: |
git commit -am "Release v$RELEASE"
git tag "v$RELEASE"
sed -i "s/^version=.*/version=$NEXT/" gradle.properties
git commit -am "Prepare next development iteration ($NEXT)"
git push --atomic origin HEAD:master "v$RELEASE"
Loading
Loading