Release 0.9.0 #51
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-* | |
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.2/graalvm-community-jdk-21.0.2_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 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
ADDITIONAL_MAVEN_ARGS: ${{ github.repository == 'Axual/ksml' && ' org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=ksml' || '' }} | |
run: mvn -B verify $ADDITIONAL_MAVEN_ARGS | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
- name: Build and test for PR | |
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 && github.repository == 'Axual/ksml'}} | |
- name: verify contents of workspace | |
run: | | |
ls -l ${{ github.workspace }} | |
ls -l ${{ github.workspace }}/ksml-runner | |
ls -l ${{ github.workspace }}/ksml-runner/target |