Skip to content

Commit

Permalink
chore: fix Android build on CI (#169)
Browse files Browse the repository at this point in the history
Also cache `cargo-apk` for faster CI run times.
  • Loading branch information
vmx authored Nov 29, 2022
1 parent 73169ba commit e8ff340
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,24 @@ jobs:

- name: Install cargo-apk
if: contains(matrix.platform.target, 'android')
run: cargo install cargo-apk
uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0
with:
crate: cargo-apk

- name: Build
if: contains(matrix.platform.target, 'android') == false
run: cargo build --workspace --all-features --target ${{ matrix.platform.target }}

- name: Build android
if: contains(matrix.platform.target, 'android')
run: cargo apk --target ${{ matrix.platform.target }} build --workspace --all-features
run: |
cargo apk -- build --all-features --target ${{ matrix.platform.target }} -p libipld-core
cargo apk -- build --all-features --target ${{ matrix.platform.target }} -p libipld-cbor
cargo apk -- build --all-features --target ${{ matrix.platform.target }} -p libipld-macro
cargo apk -- build --all-features --target ${{ matrix.platform.target }} -p libipld-cbor-derive
cargo apk -- build --all-features --target ${{ matrix.platform.target }} -p libipld
cargo apk -- build --all-features --target ${{ matrix.platform.target }} -p libipld-json
cargo apk -- build --all-features --target ${{ matrix.platform.target }} -p libipld-pb
- name: Rust tests
if: matrix.platform.cross == false
Expand Down

0 comments on commit e8ff340

Please sign in to comment.