Skip to content

Move XML parser to separate module #390

Move XML parser to separate module

Move XML parser to separate module #390

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
jobs:
matrix-build:
strategy:
fail-fast: true
matrix:
java: [11]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
java: 17
- os: ubuntu-latest
java: 21
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-os-${{ matrix.os }}-java-${{ matrix.java }}
cancel-in-progress: true
runs-on: ${{ matrix.os }}
name: "Build on ${{ matrix.os }} with Java ${{ matrix.java }}"
env:
DEFAULT_JAVA: 11
DEFAULT_OS: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
11
17
21
cache: 'maven'
- name: Cache SonarQube packages
if: ${{ env.DEFAULT_OS == matrix.os && env.DEFAULT_JAVA == matrix.java }}
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build with Java ${{ matrix.java }}
shell: bash
run: |
mvn --batch-mode -T 0.75C clean org.jacoco:jacoco-maven-plugin:prepare-agent install \
-Djava.version=${{ matrix.java }}
- name: Sonar analysis
shell: bash
if: ${{ env.DEFAULT_OS == matrix.os && env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }}
run: |
mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.token=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Archive oft binary
uses: actions/upload-artifact@v4
if: ${{ env.DEFAULT_OS == matrix.os && env.DEFAULT_JAVA == matrix.java }}
with:
name: openfasttrace-binaries
path: product/target/openfasttrace-*.jar
- name: Run self-trace
run: ./oft-self-trace.sh
- name: Upload self-tracing report
uses: actions/upload-artifact@v4
if: ${{ env.DEFAULT_OS == matrix.os && env.DEFAULT_JAVA == matrix.java }}
with:
name: self-tracing-report
path: target/self-trace-report.html
if-no-files-found: error
build:
needs: matrix-build
runs-on: ubuntu-latest
steps:
- run: echo "Build successful"