Skip to content

Commit

Permalink
Add android to ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvc94ch committed Feb 17, 2020
1 parent d29f328 commit 3308ab6
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ jobs:
# - { target: i686-pc-windows-gnu, os: windows-latest, host: -i686-pc-windows-gnu }
- { target: i686-unknown-linux-gnu, os: ubuntu-latest, }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, }
- { target: aarch64-linux-android, os: ubuntu-latest, }
- { target: aarch64-linux-android, os: ubuntu-latest, cmd: apk }
# - { target: x86_64-apple-darwin, os: macos-latest, }
# - { target: x86_64-apple-ios, os: macos-latest, }
# - { target: armv7-apple-ios, os: macos-latest, }
# - { target: aarch64-apple-ios, os: macos-latest, }
# We're using Windows rather than Ubuntu to run the wasm tests because caching cargo-web
# doesn't currently work on Linux.
#- { target: wasm32-unknown-unknown, os: windows-latest, features: stdweb, web: web }
#- { target: wasm32-unknown-unknown, os: windows-latest, features: web-sys, web: web }
#- { target: wasm32-unknown-unknown, os: windows-latest, features: stdweb, cmd: web }
#- { target: wasm32-unknown-unknown, os: windows-latest, features: web-sys, cmd: web }

env:
RUST_BACKTRACE: 1
Expand Down Expand Up @@ -143,6 +143,11 @@ jobs:
if: matrix.platform.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install libgbm-dev libdrm-dev

- name: Install cargo-apk
if: contains(matrix.platform.target, 'android')
# FIXME
run: cargo install --git https://github.com/dvc94ch/android-ndk-rs --branch android-glue

- name: Install cargo-web
continue-on-error: true
if: contains(matrix.platform.target, 'wasm32')
Expand All @@ -151,19 +156,22 @@ jobs:
- name: Check documentation
shell: bash
if: matrix.platform.target != 'wasm32-unknown-unknown'
run: cargo doc --no-deps --target ${{ matrix.platform.target }} --features $FEATURES
run: cargo $CMD doc --no-deps --target ${{ matrix.platform.target }} --features $FEATURES

- name: Build
shell: bash
run: cargo $WEB build --verbose --target ${{ matrix.platform.target }} --features $FEATURES
run: cargo $CMD build --verbose --target ${{ matrix.platform.target }} --features $FEATURES

- name: Build tests
shell: bash
run: cargo $WEB test --no-run --verbose --target ${{ matrix.platform.target }} --features $FEATURES
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} --features $FEATURES
- name: Run tests
shell: bash
if: (!contains(matrix.platform.target, 'ios') && !contains(matrix.platform.target, 'wasm32'))
run: cargo $WEB test --verbose --target ${{ matrix.platform.target }} --features $FEATURES
if: (
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios') &&
!contains(matrix.platform.target, 'wasm32'))
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} --features $FEATURES

- name: iOS example
shell: bash
Expand Down

0 comments on commit 3308ab6

Please sign in to comment.