Release 0.2.4 #47
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
name: Build and test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- branch-* | |
- release/* | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build-and-test: | |
name: Build and test on GraalVM | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: download GraalVM | |
run: | | |
download_url="https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.1/graalvm-community-jdk-21.0.1_linux-x64_bin.tar.gz" | |
wget -O $RUNNER_TEMP/graal_package.tar.gz $download_url | |
- name: Set up GraalVM | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'jdkfile' | |
jdkFile: ${{ runner.temp }}/graal_package.tar.gz | |
java-version: '21' | |
architecture: x64 | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build and test coverage | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=ksml | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
- name: Build and test but no coverage, PR only | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
run: mvn -B verify | |
if: ${{ github.event.pull_request.head.repo.fork }} | |
- name: verify contents of workspace | |
run: | | |
ls -l ${{ github.workspace }} | |
ls -l ${{ github.workspace }}/ksml-runner | |
ls -l ${{ github.workspace }}/ksml-runner/target |