Feature/use panama #356
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: Java CI with Gradle | |
on: | |
push: | |
branches: [ master, 'release/**' ] | |
pull_request: | |
branches: [ master, 'release/**' ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-14, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: print architecture | |
run: uname -m | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
cache: 'gradle' | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build & test klang macos | |
if: matrix.os == 'macos-14' | |
run: | | |
cd ./klang | |
./gradlew test | |
- name: Build & test klang ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
LIBCLANG_PATH: "/usr/lib/llvm-15/lib/libclang-15.so.1" | |
run: | | |
cd ./klang | |
./gradlew test | |
- name: Bundle the build report | |
if: failure() | |
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | |
- name: Upload the build report | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
path: build-reports.zip |