Skip to content

Commit 4bbb8a1

Browse files
committed
Consolidate android into single step
1 parent 683f1c1 commit 4bbb8a1

File tree

2 files changed

+8
-37
lines changed

2 files changed

+8
-37
lines changed

.github/workflows/build-libs.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -160,39 +160,15 @@ jobs:
160160
path: ./libs/ios/*
161161

162162
build_android:
163-
name: Android-arm
163+
name: Android
164164
if: "! contains(github.event.head_commit.message, '[skip ci]')"
165165
runs-on: ubuntu-latest
166166
steps:
167-
- name: Checkout
168-
uses: actions/checkout@v1
169-
with:
170-
submodules: "true"
167+
- uses: actions/checkout@v1
171168

172-
- name: Run build script
173-
run: ./devops/BuildLibraries.ps1 -Platform Android-ARM -OutLocation ./libs/android
169+
- run: ./devops/BuildLibraries.ps1 -Platform Android -OutLocation ./libs/android
174170
shell: pwsh
175-
- name: Upload Android artifact
176-
uses: actions/upload-artifact@v2
177-
with:
178-
name: android-arm
179-
path: ./libs/android/*
180-
181-
build_android_x86:
182-
name: Android-x86
183-
if: "! contains(github.event.head_commit.message, '[skip ci]')"
184-
runs-on: ubuntu-latest
185-
steps:
186-
- name: Checkout
187-
uses: actions/checkout@v1
188-
with:
189-
submodules: "true"
190-
191-
- name: Run build script
192-
run: ./devops/BuildLibraries.ps1 -Platform Android-x86 -OutLocation ./libs/android
193-
shell: pwsh
194-
- name: Upload Android artifact
195-
uses: actions/upload-artifact@v2
171+
- uses: actions/upload-artifact@v2
196172
with:
197-
name: android-x86
198-
path: ./libs/android/*
173+
name: android
174+
path: ./libs/android/*

devops/BuildLibraries.ps1

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,10 @@ try {
9191
Copy-Item -Path "./target/aarch64-apple-ios/release/libokapi.a" -Destination "$TargetOutput/libokapi.a"
9292
break
9393
}
94-
Android-ARM {
94+
Android {
9595
cargo install cargo-ndk
96-
rustup target add aarch64-linux-android armv7-linux-androideabi
96+
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
9797
cargo ndk --target armv7-linux-androideabi --target aarch64-linux-android -o "$TargetOutput" build --release
98-
break
99-
}
100-
Android-x86 {
101-
cargo install cargo-ndk
102-
rustup target add i686-linux-android x86_64-linux-android
10398
cargo ndk --target x86_64-linux-android --target i686-linux-android -o "$TargetOutput" build --release
10499
break
105100
}

0 commit comments

Comments
 (0)