mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 23:04:07 +00:00
107 lines
3.8 KiB
YAML
107 lines
3.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches-ignore: [staging.tmp]
|
|
pull_request:
|
|
branches-ignore: [staging.tmp]
|
|
|
|
jobs:
|
|
ios_build:
|
|
name: iOS Stable
|
|
runs-on: macos-10.15
|
|
env:
|
|
TARGET: aarch64-apple-ios
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: rustup component add clippy
|
|
- run: rustup target add ${{ env.TARGET }}
|
|
- run: cargo clippy --target ${{ env.TARGET }}
|
|
|
|
android_build:
|
|
name: Android Stable
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
TARGET: aarch64-linux-android
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install NDK
|
|
run: |
|
|
curl -LO https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip
|
|
unzip -qq android-ndk-r21b-linux-x86_64.zip -d $GITHUB_WORKSPACE
|
|
export NDK_HOME_BIN=$GITHUB_WORKSPACE/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin
|
|
ln -s $NDK_HOME_BIN/aarch64-linux-android21-clang $NDK_HOME_BIN/aarch64-linux-android-clang
|
|
echo "::add-path::$NDK_HOME_BIN"
|
|
- run: rustup component add clippy
|
|
- run: rustup target add ${{ env.TARGET }}
|
|
- run: cargo clippy --target ${{ env.TARGET }}
|
|
- name: Additional core features
|
|
run: cargo check --manifest-path wgpu-core/Cargo.toml --features trace --target ${{ env.TARGET }}
|
|
|
|
build:
|
|
name: ${{ matrix.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [macos-10.15, ubuntu-18.04, windows-2019]
|
|
channel: [stable, nightly]
|
|
include:
|
|
- name: MacOS Stable
|
|
channel: stable
|
|
os: macos-10.15
|
|
build_command: cargo clippy
|
|
additional_core_features: trace
|
|
additional_player_features: winit
|
|
- name: MacOS Nightly
|
|
os: macos-10.15
|
|
channel: nightly
|
|
build_command: cargo test -- --nocapture
|
|
additional_core_features:
|
|
additional_player_features:
|
|
- name: Ubuntu Stable
|
|
os: ubuntu-18.04
|
|
channel: stable
|
|
build_command: cargo clippy
|
|
additional_core_features: trace,replay
|
|
additional_player_features:
|
|
- name: Ubuntu Nightly
|
|
os: ubuntu-18.04
|
|
channel: nightly
|
|
build_command: |
|
|
sudo add-apt-repository ppa:oibaf/graphics-drivers;
|
|
sudo apt-get install mesa-vulkan-drivers;
|
|
cargo test -- --nocapture;
|
|
additional_core_features: serial-pass
|
|
additional_player_features: winit
|
|
- name: Windows Stable
|
|
os: windows-2019
|
|
channel: stable
|
|
build_command: rustup default stable-msvc; cargo clippy
|
|
additional_core_features: trace,serial-pass
|
|
additional_player_features: renderdoc
|
|
- name: Windows Nightly
|
|
os: windows-2019
|
|
channel: nightly
|
|
build_command: rustup default nightly-msvc; cargo test -- --nocapture
|
|
additional_core_features:
|
|
additional_player_features:
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- if: matrix.channel == 'nightly'
|
|
name: Install latest nightly
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly
|
|
override: true
|
|
- if: matrix.channel == 'stable'
|
|
run: rustup component add clippy
|
|
# build with no features first
|
|
- if: matrix.additional_core_features == ''
|
|
run: cargo check --manifest-path wgpu-core/Cargo.toml --no-default-features
|
|
- if: matrix.additional_core_features != ''
|
|
run: cargo check --manifest-path wgpu-core/Cargo.toml --features ${{ matrix.additional_core_features }}
|
|
- if: matrix.additional_player_features != ''
|
|
run: cargo check --manifest-path player/Cargo.toml --features ${{ matrix.additional_player_features }}
|
|
- run: ${{ matrix.build_command }}
|