forked from m4b/scroll
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (58 loc) · 1.66 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
push:
pull_request:
branches:
- master
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [MSRV, stable, nightly, macos, win32, win64]
include:
- build: MSRV # Minimum supported Rust version, ensure it matches the rust-version in Cargo.toml
os: ubuntu-latest
rust: 1.63
- build: stable
os: ubuntu-latest
rust: stable
- build: nightly
os: ubuntu-latest
rust: nightly
- build: macos
os: macos-latest
rust: stable
- build: win32
os: windows-latest
rust: stable-i686-msvc
- build: win64
os: windows-latest
rust: stable-x86_64-msvc
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- uses: actions/checkout@master
- name: Cache CARGO_HOME
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-home-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-home
- name: Install Rust
shell: bash
run: |
curl -sSL https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain=none
export PATH="$HOME/.cargo/bin:$PATH"
rustup override set ${{ matrix.rust }}
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: rustfmt
shell: bash
if: runner.os == 'Linux' && matrix.rust == 'stable'
run: |
rustup component add rustfmt
cargo fmt -- --check
- run: cargo build
- run: cargo test
- run: cargo test --no-default-features