Skip to content

Commit

Permalink
将版本升级至 1.0.1,更新 CI 配置。
Browse files Browse the repository at this point in the history
  • Loading branch information
mzdk100 committed Nov 14, 2024
1 parent 84a7cc0 commit 75e4225
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ adb uninstall rust.example.hello_world || true

if [ -z "$1" ];
then
cargo apk run -p ndk-examples --target x86_64-linux-android --example hello_world --no-logcat
cargo apk2 run -p ndk-examples --target x86_64-linux-android --example hello_world --no-logcat
else
adb install -r "$1/hello_world.apk"
adb shell am start -a android.intent.action.MAIN -n "rust.example.hello_world/android.app.NativeActivity"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name: Publish
on:
push:
branches: [main]
paths: "**/Cargo.toml"
paths: ["**/Cargo.toml"]

jobs:
Publish:
if: github.repository_owner == 'rust-mobile'
if: github.repository_owner == 'mzdk100'
runs-on: ubuntu-latest
strategy:
max-parallel: 1 # ensure crate order
fail-fast: false
matrix:
crate:
- { name: "ndk-build", target: "x86_64-unknown-linux-gnu" }
- { name: "cargo-apk", target: "x86_64-unknown-linux-gnu" }
- { name: "ndk-build2", target: "x86_64-unknown-linux-gnu" }
- { name: "cargo-apk2", target: "x86_64-unknown-linux-gnu" }
steps:
- uses: actions/checkout@v4
- name: Publish ${{ matrix.crate.name }}
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
run: cargo clippy --all --all-targets --all-features --target aarch64-linux-android -- -Dwarnings

check_msrv:
name: Check MSRV (1.70.0)
name: Check MSRV (1.82.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.70.0
- uses: dtolnay/rust-toolchain@1.82.0
with:
target: aarch64-linux-android
- name: Check
Expand Down Expand Up @@ -66,11 +66,11 @@ jobs:
rustup default ${{ matrix.rust-channel }}
rustup target add ${{ matrix.rust-target }}
- name: Install cargo-apk
run: cargo install --path cargo-apk
- name: Install cargo-apk2
run: cargo install --path cargo-apk2

- name: Cargo apk build for target ${{ matrix.rust-target }}
run: cargo apk build -p ndk-examples --target ${{ matrix.rust-target }} --examples
run: cargo apk2 build -p ndk-examples --target ${{ matrix.rust-target }} --examples

- uses: actions/upload-artifact@v3
# Only need this for CI, unless users are interested in downloading
Expand All @@ -89,7 +89,7 @@ jobs:
matrix:
source_os: [ubuntu-latest, windows-latest, local]
env:
api-level: 29
api-level: 35
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
arch: x86_64
# the `googleapis` emulator target is considerably slower on CI.
Expand All @@ -107,10 +107,10 @@ jobs:
with:
name: hello_world_${{ matrix.source_os }}_x86_64-linux-android

- name: Install `cargo-apk` and add `x86_64-linux-android` target
- name: Install `cargo-apk2` and add `x86_64-linux-android` target
if: ${{ matrix.source_os == 'local' }}
run: |
cargo install --path cargo-apk
cargo install --path cargo-apk2
rustup target add x86_64-linux-android
- name: AVD cache
Expand Down Expand Up @@ -173,11 +173,11 @@ jobs:
rustup toolchain install ${{ matrix.rust-channel }}
rustup default ${{ matrix.rust-channel }}
- name: Test ndk-build
run: cargo test -p ndk-build --all-features
- name: Test ndk-build2
run: cargo test -p ndk-build2 --all-features

- name: Test cargo-apk
run: cargo test -p cargo-apk --all-features
- name: Test cargo-apk2
run: cargo test -p cargo-apk2 --all-features

docs:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "1.0.0"
version = "1.0.1"
authors = [
"SmileSky <[email protected]>",
"The Rust Windowing contributors",
Expand Down
3 changes: 3 additions & 0 deletions cargo-apk2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

```toml
[package.metadata.android]
# 使用aapt2构建工具来编译资源
use_aapt2 = true

# 指定清单的包属性。
package = "com.foo.bar"

Expand Down

0 comments on commit 75e4225

Please sign in to comment.