Skip to content

Commit

Permalink
update action
Browse files Browse the repository at this point in the history
  • Loading branch information
rikaaa0928 committed Oct 17, 2024
1 parent ccdf7ff commit c562ea4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,28 @@ jobs:
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- uses: actions/setup-go@v5
- name: Install Rust
# Or @nightly if you want
uses: dtolnay/rust-toolchain@stable
# Arguments to pass in
with:
go-version: '>=1.23.0'
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
# Make Rust compile to our target (defined in the matrix)
targets: aarch64-linux-android
- uses: nttld/setup-ndk@v1
name: set up ndk
with:
cmake-version: '3.16.x'
ndk-version: r27b

- name: setup and build
shell: bash
run: |
cd lib-src/uot
cargo install cargo-ndk;
cargo install cross --git https://github.com/cross-rs/cross;
cross build --target aarch64-linux-android --release --lib;
cd ../..
mkdir -p `pwd`/app/src/main/jniLibs/arm64-v8a
ln -s `pwd`/lib-src/uot/target/aarch64-linux-android/release/libuog.so `pwd`/app/src/main/jniLibs/arm64-v8a/libuniffi_uog.so
- name: Set Up JDK
uses: actions/setup-java@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib-src/uog"]
path = lib-src/uog
url = https://github.com/rikaaa0928/uog.git
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fun RepositoryHandler.rustlsPlatformVerifier(): MavenArtifactRepository {
@Suppress("UnstableApiUsage")
val manifestPath = let {
val dependencyJson = providers.exec {
workingDir = File(project.rootDir, "../")
workingDir = File(project.rootDir, "")
commandLine(
"cargo",
"metadata",
Expand All @@ -122,7 +122,7 @@ fun RepositoryHandler.rustlsPlatformVerifier(): MavenArtifactRepository {
"--filter-platform",
"aarch64-linux-android",
"--manifest-path",
"/Users/rikaaa0928/src/rust/udp-over-grpc/Cargo.toml"
"lib-src/uog/Cargo.toml"
)
}.standardOutput.asText
val path = Json.decodeFromString<JsonObject>(dependencyJson.get())
Expand Down
1 change: 1 addition & 0 deletions lib-src/uog
Submodule uog added at 54ce2f

0 comments on commit c562ea4

Please sign in to comment.