Skip to content

Commit 9554055

Browse files
committed
Add GitHub actions workflow
1 parent 1c00a97 commit 9554055

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/build.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags:
8+
- '*'
9+
schedule:
10+
- cron: '40 5 * * *' # every day at 5:40
11+
pull_request:
12+
13+
jobs:
14+
test:
15+
name: "Test"
16+
17+
strategy:
18+
matrix:
19+
platform: [
20+
ubuntu-latest,
21+
macos-latest,
22+
windows-latest
23+
]
24+
25+
runs-on: ${{ matrix.platform }}
26+
timeout-minutes: 15
27+
28+
steps:
29+
- name: "Checkout Repository"
30+
uses: actions/checkout@v1
31+
32+
- name: Install Rustup
33+
run: |
34+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
35+
echo ::add-path::$HOME/.cargo/bin
36+
if: runner.os == 'macOS'
37+
38+
- name: Set Rustup profile to minimal
39+
run: rustup set profile minimal
40+
41+
- name: "Print Rust Version"
42+
run: |
43+
rustc -Vv
44+
cargo -Vv
45+
46+
- name: "Run cargo build"
47+
run: cargo build
48+
49+
- name: "Build with `alloc_ref` feature"
50+
run: cargo build --features alloc_ref
51+
52+
- name: "Run cargo test"
53+
run: cargo test
54+
55+
- name: 'Deny Warnings'
56+
run: cargo build --features deny-warnings
57+
58+
check_formatting:
59+
name: "Check Formatting"
60+
runs-on: ubuntu-latest
61+
timeout-minutes: 2
62+
steps:
63+
- uses: actions/checkout@v1
64+
- run: rustup install nightly
65+
- run: cargo +nightly fmt -- --check

0 commit comments

Comments
 (0)