Skip to content

Commit 6a7f044

Browse files
Update buildMod.yml
1 parent 68ae625 commit 6a7f044

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

.github/workflows/buildMod.yml

+28-9
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: NDK build
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, dev ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ main, dev ]
88

99
jobs:
1010
build:
11+
env:
12+
module_id: clockmod
1113
runs-on: ubuntu-latest
1214

1315
steps:
@@ -18,15 +20,32 @@ jobs:
1820
lfs: true
1921
- name: Install Powershell
2022
run: sudo apt-get install -y powershell
21-
22-
- name: Setup NDK
23-
id: setup-ndk
24-
uses: nttld/[email protected]
23+
24+
- name: Cache Android NDK
25+
id: cache-ndk
26+
uses: actions/cache@v2
27+
env:
28+
cache-name: cache-ndk
29+
ndkname: android-ndk-r21
2530
with:
26-
ndk-version: r21
31+
path: ndk
32+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}
33+
restore-keys: |
34+
${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}
35+
36+
- name: Install Android NDK
37+
if: steps.cache-ndk.outputs.cache-hit != 'true'
38+
env:
39+
ndkname: android-ndk-r21
40+
run: |
41+
wget -q -O ndk.zip https://dl.google.com/android/repository/${ndkname}-linux-x86_64.zip
42+
unzip -q ndk.zip
43+
mv ${ndkname} ndk
2744
2845
- name: Create ndkpath.txt
29-
run: echo ${{ steps.setup-ndk.outputs.ndk-path }} > ${GITHUB_WORKSPACE}/ndkpath.txt
46+
run: |
47+
cd ndk
48+
pwd > ${GITHUB_WORKSPACE}/ndkpath.txt
3049
3150
# - name: Cache QPM
3251
# id: cache-qpm
@@ -76,7 +95,7 @@ jobs:
7695
id: libname
7796
run: |
7897
cd ./libs/arm64-v8a/
79-
pattern="libclockmod.so"
98+
pattern="lib${module_id}*.so"
8099
files=( $pattern )
81100
echo ::set-output name=NAME::"${files[0]}"
82101
- name: Upload non-debug artifact

0 commit comments

Comments
 (0)