-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (49 loc) · 1.46 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
name: Build
on:
push:
branches:
- main
paths:
- "**/*.java"
- "**/*.h"
- "**/*.cc"
- "**/CMakeList.txt"
- "**/build.gradle"
- "gradle.properties"
- "settings.gradle"
- ".github/workflows/build.yml"
pull_request:
branches:
- main
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Configure libexpr
working-directory: ${{github.workspace}}/libexpr
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=OFF
- name: Build libexpr
working-directory: ${{github.workspace}}/libexpr
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Config jni
working-directory: ${{github.workspace}}/jni/src/main/cpp
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build jni
working-directory: ${{github.workspace}}/jni/src/main/cpp
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Check and test with Gradle
run: ./gradlew check