wgpu/.github/workflows/ci.yml

135 lines
4.4 KiB
YAML
Raw Normal View History

2020-04-22 13:03:26 +00:00
name: CI
on:
push:
branches: [master]
tags: [v0.*]
2020-04-22 13:03:26 +00:00
pull_request:
2020-05-01 17:32:38 +00:00
branches-ignore: [staging.tmp]
2020-04-22 13:03:26 +00:00
jobs:
2020-05-01 17:32:38 +00:00
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
2020-11-30 22:50:35 +00:00
PKG_CONFIG_ALLOW_CROSS: 1
2020-05-01 17:32:38 +00:00
steps:
- uses: actions/checkout@v2
- run: echo "$ANDROID_HOME/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH
2020-05-01 17:32:38 +00:00
- 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 }}
2020-12-17 20:47:57 +00:00
webgl_build:
name: Web Assembly
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: rustup target add wasm32-unknown-unknown
- run: cargo build --manifest-path wgpu-core/Cargo.toml --target wasm32-unknown-unknown
2020-04-22 13:03:26 +00:00
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]
2020-04-22 13:03:26 +00:00
include:
- name: MacOS Stable
2020-04-22 13:03:26 +00:00
channel: stable
os: macos-10.15
2020-11-30 22:50:35 +00:00
prepare_command:
2020-04-28 01:26:34 +00:00
additional_core_features: trace
2020-04-29 20:45:28 +00:00
additional_player_features: winit
- name: MacOS Nightly
os: macos-10.15
2020-04-22 13:03:26 +00:00
channel: nightly
2020-11-30 22:50:35 +00:00
prepare_command:
2020-04-28 01:26:34 +00:00
additional_core_features:
2020-04-29 20:45:28 +00:00
additional_player_features:
- name: Ubuntu Stable
os: ubuntu-18.04
2020-04-22 13:03:26 +00:00
channel: stable
prepare_command:
2020-04-28 01:26:34 +00:00
additional_core_features: trace,replay
2020-04-29 20:45:28 +00:00
additional_player_features:
- name: Ubuntu Nightly
os: ubuntu-18.04
2020-04-22 13:03:26 +00:00
channel: nightly
2020-11-30 22:50:35 +00:00
prepare_command: |
echo "Installing Vulkan"
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo apt-get update
sudo apt install -y libxcb-xfixes0-dev mesa-vulkan-drivers
additional_core_features: serial-pass
2020-04-29 20:45:28 +00:00
additional_player_features: winit
- name: Windows Stable
os: windows-2019
2020-04-22 13:03:26 +00:00
channel: stable
2020-11-30 22:50:35 +00:00
prepare_command: rustup default stable-msvc
additional_core_features: trace,serial-pass
additional_player_features: renderdoc
- name: Windows Nightly
os: windows-2019
2020-04-22 13:03:26 +00:00
channel: nightly
2020-11-30 22:50:35 +00:00
prepare_command: rustup default nightly-msvc
2020-04-28 01:26:34 +00:00
additional_core_features:
2020-04-29 20:45:28 +00:00
additional_player_features:
2020-04-22 13:03:26 +00:00
steps:
2020-05-01 17:32:38 +00:00
- uses: actions/checkout@v2
- if: matrix.channel == 'nightly'
name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
2020-06-19 15:16:29 +00:00
toolchain: nightly
2020-05-01 17:32:38 +00:00
override: true
- if: matrix.channel == 'stable'
run: rustup component add clippy
2020-11-30 22:50:35 +00:00
# prepare
- if: matrix.prepare_command != ''
run: ${{ matrix.prepare_command }}
2020-06-18 18:01:59 +00:00
# build with no features first
- if: matrix.additional_core_features == ''
run: cargo check --manifest-path wgpu-core/Cargo.toml --no-default-features
2020-05-01 17:32:38 +00:00
- 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 }}
2020-11-30 22:50:35 +00:00
- if: matrix.channel == 'stable'
run: cargo clippy
- if: matrix.channel == 'nightly'
run: cargo test -- --nocapture
2021-03-12 17:39:04 +00:00
lint:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings