2020-04-14 06:15:46 +10:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
2020-09-20 18:00:20 +10:00
|
|
|
- cron: '0 0 * * 0'
|
2020-04-14 06:15:46 +10:00
|
|
|
jobs:
|
|
|
|
checks:
|
|
|
|
name: Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
- beta
|
2021-03-09 20:40:24 +11:00
|
|
|
- 1.50.0
|
2020-04-14 06:15:46 +10:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v2
|
2020-04-19 07:58:42 +10:00
|
|
|
- name: Update apt repos
|
|
|
|
run: sudo apt-get -y update
|
2020-04-14 06:15:46 +10:00
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt -y install libsdl2-dev
|
|
|
|
- name: Install toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
- name: Cargo check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
2020-12-28 01:35:17 +11:00
|
|
|
args: --all
|
2020-04-14 06:15:46 +10:00
|
|
|
tests:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
- beta
|
2021-03-09 20:40:24 +11:00
|
|
|
- 1.50.0
|
2020-04-14 06:15:46 +10:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v2
|
2020-04-19 07:58:42 +10:00
|
|
|
- name: Update apt repos
|
|
|
|
run: sudo apt-get -y update
|
2020-04-14 06:15:46 +10:00
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt -y install libsdl2-dev
|
|
|
|
- name: Install toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
- name: Cargo test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2020-12-11 15:00:13 +11:00
|
|
|
args: --all
|
2020-04-14 06:15:46 +10:00
|
|
|
lints:
|
|
|
|
name: Lints
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v2
|
2020-04-19 07:58:42 +10:00
|
|
|
- name: Update apt repos
|
|
|
|
run: sudo apt-get -y update
|
2020-04-14 06:15:46 +10:00
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt -y install libsdl2-dev
|
|
|
|
- name: Install toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2020-12-28 01:35:17 +11:00
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
components: clippy, rustfmt
|
|
|
|
override: true
|
2020-04-14 06:15:46 +10:00
|
|
|
- name: Cargo fmt
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
- name: Cargo doc
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: doc
|
|
|
|
args: --workspace --no-deps
|
|
|
|
- name: Cargo clippy
|
|
|
|
uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --all --tests -- -D warnings
|