-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
118 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[build] | ||
rustflags = ["-C", "target-feature=+crt-static"] | ||
target = "aarch64-linux-android" | ||
|
||
[profile.release] | ||
strip = true | ||
codegen-units = 1 | ||
lto = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Build release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Tag to build' | ||
required: true | ||
push: | ||
tags: | ||
- v** | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install cargo-ndk | ||
run: cargo install cargo-ndk | ||
|
||
- name: Install Rust targets for Android | ||
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android | ||
|
||
- name: Build aarch64-linux-android | ||
env: | ||
RUSTFLAGS: -C target-feature=+crt-static | ||
run: cargo ndk -t aarch64-linux-android -p 33 build --release | ||
|
||
- name: Build armv7-linux-androideabi | ||
env: | ||
RUSTFLAGS: -C target-feature=+crt-static | ||
run: cargo ndk -t armv7-linux-androideabi -p 33 build --release | ||
|
||
- name: Build i686-linux-android | ||
env: | ||
RUSTFLAGS: -C target-feature=+crt-static | ||
run: cargo ndk -t i686-linux-android -p 33 build --release | ||
|
||
- name: Build x86_64-linux-android | ||
env: | ||
# Currently unable to build statically for x86_64-linux-android, ensure that the target is built with the correct flags | ||
RUSTFLAGS: "" | ||
run: cargo ndk -t x86_64-linux-android -p 33 build --release | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/aarch64-linux-android/release/apbf | ||
target/armv7-linux-androideabi/release/apbf | ||
target/i686-linux-android/release/apbf | ||
target/x86_64-linux-android/release/apbf | ||
tag_name: ${{ github.event.inputs.tag || github.ref }} | ||
generate_release_notes: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters