wgpu/.github/workflows/ci.yml

108 lines
3.6 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
PKG_CONFIG_ALLOW_CROSS: 1
steps:
- uses: actions/checkout@v2
- run: echo "$ANDROID_HOME/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH
- 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
prepare_command:
additional_core_features: trace
additional_player_features: winit
- name: MacOS Nightly
os: macos-10.15
channel: nightly
prepare_command:
additional_core_features:
additional_player_features:
- name: Ubuntu Stable
os: ubuntu-18.04
channel: stable
prepare_command:
additional_core_features: trace,replay
additional_player_features:
- name: Ubuntu Nightly
os: ubuntu-18.04
channel: nightly
prepare_command: |
sudo apt-get update -y -qq
echo "Installing Vulkan"
sudo apt-get install -y -qq mesa-vulkan-drivers
additional_core_features: serial-pass
additional_player_features: winit
- name: Windows Stable
os: windows-2019
channel: stable
prepare_command: rustup default stable-msvc
additional_core_features: trace,serial-pass
additional_player_features: renderdoc
- name: Windows Nightly
os: windows-2019
channel: nightly
prepare_command: rustup default nightly-msvc
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
# prepare
- if: matrix.prepare_command != ''
run: ${{ matrix.prepare_command }}
# 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 }}
- if: matrix.channel == 'stable'
run: cargo clippy
- if: matrix.channel == 'nightly'
run: cargo test -- --nocapture