Skip to content

Commit

Permalink
feat(ci): build & release - optimize workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Oct 15, 2024
1 parent b76df1b commit 710cc4d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Build code
run: cargo build
run: cargo build -p stremio-core-android

- name: Lint code format
run: cargo fmt --all -- --check
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Release stremio-core-android

on:
release:
Expand All @@ -20,22 +20,16 @@ jobs:
uses: android-actions/setup-android@v2
- name: Setup Android NDK
run: yes | sdkmanager "ndk;21.4.7075529" >/dev/null
- name: Set default rust toolchain
run: rustup default 1.70.0
- name: Install rustfmt
run: rustup component add rustfmt
- name: Install clippy
run: rustup component add clippy
- name: Add armv7 target
run: rustup target add armv7-linux-androideabi
- name: Add aarch64 target
run: rustup target add aarch64-linux-android
- name: Add i686 target
run: rustup target add i686-linux-android
- name: Add x86_64 target
run: rustup target add x86_64-linux-android
- name: Rust cache
uses: Swatinem/rust-cache@v2

# use MSRV
- name: Set Rust version to MSRV 1.70
uses: dtolnay/[email protected]
with:
# Add armv7, aarch64, i686, x86_64 targets
targets: armv7-linux-androideabi, aarch64-linux-android, i686-linux-android, x86_64-linux-android

- uses: Swatinem/rust-cache@v2

- name: Build aar
run: ./gradlew -Pversion=${GITHUB_REF##*/} publishToMavenLocal
- name: Archive artifacts
Expand Down

0 comments on commit 710cc4d

Please sign in to comment.