bevy/.github/workflows/ci.yml

95 lines
2.2 KiB
YAML
Raw Normal View History

name: CI
2020-05-29 03:48:18 +00:00
on:
2020-08-26 18:57:55 +00:00
push:
branches: [master]
2020-05-29 03:48:18 +00:00
pull_request:
2020-05-29 05:44:04 +00:00
branches: [master]
2020-05-29 03:48:18 +00:00
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
2020-08-26 18:57:35 +00:00
strategy:
matrix:
toolchain: [stable, nightly]
2020-05-29 03:48:18 +00:00
steps:
2020-05-29 05:44:04 +00:00
- uses: actions/checkout@v2
2020-08-16 03:27:41 +00:00
2020-06-08 08:05:56 +00:00
- uses: actions-rs/toolchain@v1
with:
2020-08-26 18:57:35 +00:00
toolchain: ${{ matrix.toolchain }}
2020-06-08 08:05:56 +00:00
override: true
2020-08-16 03:27:41 +00:00
2020-08-26 18:57:35 +00:00
- uses: actions/cache@v2
2020-08-16 03:27:41 +00:00
with:
2020-08-26 18:57:35 +00:00
path: |
target
key: ${{ runner.os }}-cargo-check-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
2020-08-16 03:27:41 +00:00
2020-07-23 20:18:23 +00:00
- name: Install alsa
2020-08-26 18:57:35 +00:00
run: sudo apt-get install --no-install-recommends libasound2-dev
2020-08-16 03:27:41 +00:00
2020-05-29 05:44:04 +00:00
- name: Build
2020-06-08 08:05:56 +00:00
run: cargo check
2020-08-26 18:57:35 +00:00
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: ${{ runner.os }}-cargo-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install alsa
run: sudo apt-get install --no-install-recommends libasound2-dev
- name: Run tests
run: cargo test --workspace
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
clean:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
override: true
- name: Install alsa
run: sudo apt-get install --no-install-recommends libasound2-dev
2020-08-16 03:27:41 +00:00
- name: Check the format
run: cargo +nightly fmt --all -- --check
# type complexity must be ignored because we use huge templates for queries
- name: Run clippy
run: >
cargo +nightly clippy
--all-targets
--all-features
--
-D warnings
-A clippy::type_complexity