Skip to content

Commit

Permalink
Unify build workflows and argument specification
Browse files Browse the repository at this point in the history
- Merge the external-pr workflow into the maven workflow
- Create .mvn/maven.config and common build arguments to it
- Remove unused environment variable 'WORKSPACE'
  • Loading branch information
HannesWell committed Apr 16, 2023
1 parent 93acb22 commit 6335bc1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 72 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/external-pr.yml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'

jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.base.repo.clone_url != github.event.pull_request.head.repo.clone_url
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest' ] # 'windows-latest' too flaky
Expand All @@ -33,10 +37,11 @@ jobs:
- name: Build and test
uses: coactions/setup-xvfb@v1
with:
run: mvn clean verify --show-version -PuseJenkinsSnapshots -Dsurefire.rerunFailingTestsCount=3
run: mvn clean verify -PuseJenkinsSnapshots
working-directory: org.eclipse.xtext.full.releng

build-maven-artifacts:
if: github.event_name != 'pull_request' || github.event.pull_request.base.repo.clone_url != github.event.pull_request.head.repo.clone_url
runs-on: ubuntu-latest

steps:
Expand All @@ -57,5 +62,5 @@ jobs:
restore-keys: ${{ runner.os }}-maven

- name: Build Maven artifacts
run: mvn clean verify --show-version -PuseJenkinsSnapshots
run: mvn clean verify -PuseJenkinsSnapshots
working-directory: org.eclipse.xtext.maven.releng
4 changes: 4 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--show-version
--update-snapshots
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
-Dsurefire.rerunFailingTestsCount=3
8 changes: 0 additions & 8 deletions full-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@ if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi
if [ -z "$WORKSPACE" ]; then
# if not set in environment use default
WORKSPACE=$(pwd)
fi


MVN_ARGS=(\
--update-snapshots \
-DJENKINS_URL=$JENKINS_URL \
-DWORKSPACE=$WORKSPACE \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dit-archetype-tests-skip=true \
)

Expand Down Expand Up @@ -55,7 +48,6 @@ while [ "$1" != "" ]; do
done

MVN_ARGS+=(-PuseJenkinsSnapshots)
MVN_ARGS+=(-Dsurefire.rerunFailingTestsCount=3)

echo mvn -B -f org.eclipse.xtext.full.releng ${MVN_ARGS[@]} $@

Expand Down
7 changes: 0 additions & 7 deletions full-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@ if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi
if [ -z "$WORKSPACE" ]; then
# if not set in environment use default
WORKSPACE=$(pwd)
fi


MVN_ARGS=(\
--update-snapshots \
-DJENKINS_URL=$JENKINS_URL \
-DWORKSPACE=$WORKSPACE \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dit-archetype-tests-skip=true \
)

Expand Down
7 changes: 0 additions & 7 deletions maven-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@ if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi
if [ -z "$WORKSPACE" ]; then
# if not set in environment use default
WORKSPACE=$(pwd)
fi


MVN_ARGS=(\
--update-snapshots \
--fae \
-Dmaven.test.failure.ignore=true \
-Declipse.p2.mirrors=false \
-DJENKINS_URL=$JENKINS_URL \
-DWORKSPACE=$WORKSPACE \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dit-archetype-tests-skip=true \
)

Expand Down

0 comments on commit 6335bc1

Please sign in to comment.