-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.61 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
matrix-build:
strategy:
matrix:
java: [23]
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-os-${{ matrix.os }}-java-${{ matrix.java }}
cancel-in-progress: true
name: "Build on ${{ matrix.os }} with Java ${{ matrix.java }}"
env:
DEFAULT_JAVA: 23
DEFAULT_OS: 'ubuntu-latest'
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Java ${{ matrix.java }}
run: ./gradlew build --info --warning-mode=all -PjavaVersion=${{ matrix.java }}
- name: Sonar analysis
if: ${{ env.DEFAULT_JAVA == matrix.java && env.DEFAULT_OS == matrix.os && env.SONAR_TOKEN != null }}
run: |
./gradlew sonarqube -Dsonar.token=$SONAR_TOKEN --info --warning-mode=all -PjavaVersion=${{ matrix.java }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Archive native lib
uses: actions/upload-artifact@v4
with:
name: native-lib-${{ matrix.os }}
path: build/lua-libs/
if-no-files-found: error
retention-days: 5
build:
needs: matrix-build
runs-on: ubuntu-latest
steps:
- run: echo "Build successful"