fix(deps): bump tycho-version from 4.0.6 to 4.0.7 #1149
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: Build | |
on: | |
push: | |
branches-ignore: # build all branches except: | |
- 'dependabot/**' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR) | |
tags-ignore: # don't build tags | |
- '**' | |
paths-ignore: | |
- '**/*.md' | |
- '.github/*.yml' | |
- '.github/workflows/licensecheck.yml' | |
- '.github/workflows/validate_pr.yml' | |
- '**/.project' | |
- '**/.settings/*.prefs' | |
- '.gitignore' | |
- '.actrc' | |
- 'Jenkinsfile' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '.github/*.yml' | |
- '.github/workflows/licensecheck.yml' | |
- '.github/workflows/validate_pr.yml' | |
- '**/.project' | |
- '**/.settings/*.prefs' | |
- '.gitignore' | |
- '.actrc' | |
- 'Jenkinsfile' | |
workflow_dispatch: | |
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ | |
inputs: | |
additional_maven_args: | |
description: 'Additional Maven Args' | |
required: false | |
default: '' | |
defaults: | |
run: | |
shell: bash | |
env: | |
JAVA_VERSION: 17 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-11 # macos-latest -> more macos-11 runners than macos-12 available | |
- windows-latest | |
target-platform: | |
- oldest | |
- latest | |
- unstable | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
- name: Show environment variables | |
run: env | sort | |
- name: Git Checkout | |
uses: actions/checkout@v4 #https://github.com/actions/checkout | |
with: | |
fetch-depth: 0 # required to prevent tycho-p2-extras-plugin:compare-version-with-baseline potentially failing the build | |
- name: Configure Fast APT Mirror | |
if: runner.os == 'Linux' | |
uses: vegardit/fast-apt-mirror.sh@v1 | |
- name: "Install: Linux packages 📦" | |
if: runner.os == 'Linux' | |
run: | | |
set -eux | |
sudo apt-get install --no-install-recommends -y xvfb | |
# prevents: "Failed to execute child process “dbus-launch” (No such file or directory)" | |
sudo apt-get install --no-install-recommends -y dbus-x11 | |
# prevents: "dbind-WARNING **: 20:17:55.046: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files" | |
# see https://gist.github.com/jeffcogswell/62395900725acef1c0a5a608f7eb7a05 | |
sudo apt-get install --no-install-recommends -y at-spi2-core | |
# prevents: | |
# java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: | |
# no swt-pi4-gtk-4956r13 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib | |
# no swt-pi4-gtk in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib | |
# no swt-pi4 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib | |
sudo apt-get install --no-install-recommends -y libswt-gtk-*-java | |
- name: "Install: JDK ${{ env.JAVA_VERSION }} ☕" | |
uses: actions/setup-java@v4 # https://github.com/actions/setup-java | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Cache: Local Maven Repository" | |
uses: actions/cache@v4 | |
with: | |
# Excluded sub directory not working https://github.com/actions/cache/issues/494#issuecomment-948783891 | |
path: | | |
~/.m2/repository/* | |
!~/.m2/repository/.cache/tycho | |
!~/.m2/repository/.meta/p2-artifacts.properties | |
!~/.m2/repository/p2 | |
!~/.m2/repository/*SNAPSHOT* | |
key: ${{ runner.os }}-repo-mvn-${{ hashFiles('**/pom.xml') }} | |
- name: "Cache: Local Tycho Repository" | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2/repository/.cache/tycho | |
~/.m2/repository/.meta/p2-artifacts.properties | |
~/.m2/repository/p2 | |
key: ${{ runner.os }}-repo-tycho-${{ hashFiles(format('target-platforms/{0}.target', matrix.target-platform)) }} | |
- name: "Install: Maven" | |
uses: stCarolas/setup-maven@v5 # https://github.com/stCarolas/setup-maven | |
with: | |
maven-version: 3.9.6 | |
- name: "Build with Maven 🔨" | |
continue-on-error: ${{ matrix.target-platform == 'unstable' }} | |
run: | | |
set -eu | |
if [[ "${{ runner.os }}" == "Windows" ]]; then | |
MAVEN_OPTS+=" -Djava.security.egd=file:/dev/urandom" # https://www.baeldung.com/java-security-egd#bd-testing-the-effect-of-javasecurityegd | |
else | |
MAVEN_OPTS+=" -Djava.security.egd=file:/dev/./urandom" # https://stackoverflow.com/questions/58991966/what-java-security-egd-option-is-for/59097932#59097932 | |
fi | |
MAVEN_OPTS+=" -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS" # https://stackoverflow.com/questions/5120470/how-to-time-the-different-stages-of-maven-execution/49494561#49494561 | |
MAVEN_OPTS+=" -Xmx1024m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dhttps.protocols=TLSv1.2" | |
export MAVEN_OPTS | |
echo "MAVEN_OPTS: $MAVEN_OPTS" | |
if [[ ${ACT:-} == "true" ]]; then # when running locally using nektos/act | |
maven_args="-Djgit.dirtyWorkingTree=warning" | |
else | |
maven_args="--no-transfer-progress" | |
fi | |
# prevent "org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]" on Linux | |
${{ runner.os == 'Linux' && 'xvfb-run --server-args="-screen 0 1600x900x24" \' || '' }} | |
mvn \ | |
--errors \ | |
--update-snapshots \ | |
--batch-mode \ | |
--show-version \ | |
-Dtycho.disableP2Mirrors=true \ | |
-Dsurefire.rerunFailingTestsCount=3 \ | |
-Dtm4e.target-platform=${{ matrix.target-platform }} \ | |
$maven_args \ | |
${{ github.event.inputs.additional_maven_args }} \ | |
clean verify |