Skip to content

Commit ff4b167

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents ed5b75e + 85acbf8 commit ff4b167

2 files changed

Lines changed: 86 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
on:
3+
push:
4+
tags-ignore:
5+
- 'v*'
6+
branches:
7+
- '*'
8+
pull_request:
9+
jobs:
10+
libcore:
11+
name: Native Build (LibCore)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Golang Status
17+
run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
18+
- name: Libcore Status
19+
run: git ls-files libcore | xargs cat | sha1sum > libcore_status
20+
- name: LibCore Cache
21+
id: cache
22+
uses: actions/cache@v4
23+
with:
24+
path: |
25+
app/libs/libcore.aar
26+
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}-ci
27+
- name: Install Golang
28+
if: steps.cache.outputs.cache-hit != 'true'
29+
uses: actions/setup-go@v5
30+
with:
31+
go-version: ^1.21
32+
- name: Native Build
33+
if: steps.cache.outputs.cache-hit != 'true'
34+
run: ./run lib core
35+
build:
36+
name: Build OSS APK
37+
runs-on: ubuntu-latest
38+
needs:
39+
- libcore
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
- name: Golang Status
44+
run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
45+
- name: Libcore Status
46+
run: git ls-files libcore | xargs cat | sha1sum > libcore_status
47+
- name: LibCore Cache
48+
uses: actions/cache@v4
49+
with:
50+
path: |
51+
app/libs/libcore.aar
52+
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}-ci
53+
- name: Gradle cache
54+
uses: actions/cache@v4
55+
with:
56+
path: ~/.gradle
57+
key: gradle-oss-${{ hashFiles('**/*.gradle.kts') }}-ci
58+
- name: Gradle Build
59+
env:
60+
BUILD_PLUGIN: none
61+
run: |
62+
echo "sdk.dir=${ANDROID_HOME}" > local.properties
63+
echo "ndk.dir=${ANDROID_HOME}/ndk/25.0.8775105" >> local.properties
64+
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
65+
./run init action gradle
66+
./gradlew app:assembleOssDebug
67+
APK=$(find app/build/outputs/apk -name '*arm64-v8a*.apk')
68+
APK=$(dirname $APK)
69+
echo "APK=$APK" >> $GITHUB_ENV
70+
- name: Upload Artifacts
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: APKs
74+
path: ${{ env.APK }}

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
- name: Golang Status
2525
run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
2626
- name: Libcore Status
2727
run: git ls-files libcore | xargs cat | sha1sum > libcore_status
2828
- name: LibCore Cache
2929
id: cache
30-
uses: actions/cache@v3
30+
uses: actions/cache@v4
3131
with:
3232
path: |
3333
app/libs/libcore.aar
3434
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
3535
- name: Install Golang
3636
if: steps.cache.outputs.cache-hit != 'true'
37-
uses: actions/setup-go@v3
37+
uses: actions/setup-go@v5
3838
with:
3939
go-version: ^1.21
4040
- name: Native Build
@@ -47,19 +47,19 @@ jobs:
4747
- libcore
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@v3
50+
uses: actions/checkout@v4
5151
- name: Golang Status
5252
run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
5353
- name: Libcore Status
5454
run: git ls-files libcore | xargs cat | sha1sum > libcore_status
5555
- name: LibCore Cache
56-
uses: actions/cache@v3
56+
uses: actions/cache@v4
5757
with:
5858
path: |
5959
app/libs/libcore.aar
6060
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
6161
- name: Gradle cache
62-
uses: actions/cache@v3
62+
uses: actions/cache@v4
6363
with:
6464
path: ~/.gradle
6565
key: gradle-oss-${{ hashFiles('**/*.gradle.kts') }}
@@ -86,9 +86,9 @@ jobs:
8686
needs: build
8787
steps:
8888
- name: Checkout
89-
uses: actions/checkout@v3
89+
uses: actions/checkout@v4
9090
- name: Donwload Artifacts
91-
uses: actions/download-artifact@v3
91+
uses: actions/download-artifact@v4
9292
with:
9393
name: APKs
9494
path: artifacts
@@ -107,7 +107,7 @@ jobs:
107107
needs: build
108108
steps:
109109
- name: Donwload Artifacts
110-
uses: actions/download-artifact@v3
110+
uses: actions/download-artifact@v4
111111
with:
112112
name: APKs
113113
path: artifacts
@@ -138,19 +138,19 @@ jobs:
138138
- libcore
139139
steps:
140140
- name: Checkout
141-
uses: actions/checkout@v3
141+
uses: actions/checkout@v4
142142
- name: Golang Status
143143
run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
144144
- name: Libcore Status
145145
run: git ls-files libcore | xargs cat | sha1sum > libcore_status
146146
- name: LibCore Cache
147-
uses: actions/cache@v3
147+
uses: actions/cache@v4
148148
with:
149149
path: |
150150
app/libs/libcore.aar
151151
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
152152
- name: Gradle cache
153-
uses: actions/cache@v3
153+
uses: actions/cache@v4
154154
with:
155155
path: ~/.gradle
156156
key: gradle-play-${{ hashFiles('**/*.gradle.kts') }}

0 commit comments

Comments
 (0)