2019-11-12 01:29:43 +11:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
|
|
|
jobs:
|
2020-01-01 19:51:02 +11:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
|
|
|
|
# make sure all code has been formatted with rustfmt
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- name: check rustfmt
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: -- --check --color always
|
|
|
|
|
2019-11-12 01:29:43 +11:00
|
|
|
build_and_test:
|
|
|
|
name: Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2020-04-05 14:49:25 +10:00
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
|
|
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
|
2019-11-12 01:29:43 +11:00
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: cargo fetch
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fetch
|
|
|
|
- name: cargo test build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --tests
|
|
|
|
- name: cargo test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|