|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches-ignore: [staging.tmp] |
| 6 | + pull_request: |
| 7 | + branches-ignore: [staging.tmp] |
| 8 | + |
| 9 | +jobs: |
| 10 | + ios_build: |
| 11 | + name: iOS Stable |
| 12 | + runs-on: macos-10.15 |
| 13 | + env: |
| 14 | + TARGET: aarch64-apple-ios |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - run: rustup target add ${{ env.TARGET }} |
| 18 | + - name: Check |
| 19 | + run: cargo check --manifest-path src/backend/metal/Cargo.toml --target ${{ env.TARGET }} |
| 20 | + |
| 21 | + android_build: |
| 22 | + name: Android Stable |
| 23 | + runs-on: ubuntu-18.04 |
| 24 | + env: |
| 25 | + TARGET: aarch64-linux-android |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v2 |
| 28 | + - name: Install NDK |
| 29 | + run: | |
| 30 | + curl -LO https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip |
| 31 | + unzip -qq android-ndk-r21b-linux-x86_64.zip -d $GITHUB_WORKSPACE |
| 32 | + export NDK_HOME_BIN=$GITHUB_WORKSPACE/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin |
| 33 | + ln -s $NDK_HOME_BIN/aarch64-linux-android21-clang $NDK_HOME_BIN/aarch64-linux-android-clang |
| 34 | + echo "::add-path::$NDK_HOME_BIN" |
| 35 | + - run: rustup target add ${{ env.TARGET }} |
| 36 | + - name: Check |
| 37 | + run: cargo check --manifest-path src/backend/vulkan/Cargo.toml --target ${{ env.TARGET }} |
| 38 | + |
| 39 | + build: |
| 40 | + name: ${{ matrix.name }} |
| 41 | + runs-on: ${{ matrix.os }} |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + name: |
| 46 | + [ |
| 47 | + MacOS Stable, |
| 48 | + MacOS Nightly, |
| 49 | + Ubuntu Stable, |
| 50 | + Ubuntu Nightly, |
| 51 | + Windows Stable, |
| 52 | + Windows Nightly, |
| 53 | + ] |
| 54 | + include: |
| 55 | + - os: macos-10.15 |
| 56 | + name: MacOS Stable |
| 57 | + channel: stable |
| 58 | + additional_command: cd src/backend/metal && cargo check --all-features |
| 59 | + - os: macos-10.15 |
| 60 | + name: MacOS Nightly |
| 61 | + channel: nightly |
| 62 | + additional_command: |
| 63 | + - os: ubuntu-18.04 |
| 64 | + name: Ubuntu Stable |
| 65 | + channel: stable |
| 66 | + additional_command: |
| 67 | + - os: ubuntu-18.04 |
| 68 | + name: Ubuntu Nightly |
| 69 | + channel: nightly |
| 70 | + additional_command: |
| 71 | + - os: windows-2019 |
| 72 | + name: Windows Stable |
| 73 | + channel: stable |
| 74 | + additional_command: |
| 75 | + - os: windows-2019 |
| 76 | + name: Windows Nightly |
| 77 | + channel: nightly |
| 78 | + additional_command: |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v2 |
| 81 | + - if: matrix.channel == 'nightly' |
| 82 | + name: Install latest nightly |
| 83 | + uses: actions-rs/toolchain@v1 |
| 84 | + with: |
| 85 | + toolchain: nightly |
| 86 | + override: true |
| 87 | + - if: matrix.os == 'windows-2019' |
| 88 | + name: Install make |
| 89 | + run: choco install make |
| 90 | + #- if: matrix.channel == 'stable' |
| 91 | + # run: rustup component add clippy |
| 92 | + # build with no features first |
| 93 | + - run: make all |
| 94 | + - if: matrix.additional_command != '' |
| 95 | + name: Check extra features |
| 96 | + run: ${{ matrix.additional_command }} |
0 commit comments