-
Notifications
You must be signed in to change notification settings - Fork 26
151 lines (122 loc) · 3.83 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings"
RUSTUP_MAX_RETRIES: 10
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# will install toolchain specified in rust-toolchain
- name: Install Rust toolchain
run: |
rustup show
- name: Version Information
run: |
rustc --version
cargo --version
rustup --version
cargo fmt -- --version
cargo clippy -- --version
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
- name: Lint (rustfmt)
run: |
cargo fmt -- --check
- name: Lint (clippy)
run: |
cargo clippy --locked --workspace --all-features --all-targets
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# will install toolchain specified in rust-toolchain
- name: Install Rust toolchain
run: |
rustup show
- name: Setup Additional Languages (python3)
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Setup Additional Languages (python3 packages)
run: |
python3 -m pip install pyre-check==0.0.59
python3 -m pip install numpy==1.20.1
echo '/github/home/.local/bin' >> $GITHUB_PATH
- name: Setup Additional Languages (.Net)
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
2.1.x
3.1.x
- name: Setup Additional Languages (golang)
uses: actions/setup-go@v3
with:
go-version: '~1.15.0'
- name: Setup Additional Languages (deno)
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Setup Additional Languages (dart)
uses: dart-lang/setup-dart@v1
with:
sdk: 2.14.0
- name: Setup Additional Languages (swift)
uses: swift-actions/setup-swift@v1
with:
# older swift versions are having gpg issues https://github.com/swift-actions/setup-swift/issues/520
swift-version: "5.7"
- name: Setup Additional Languages (ocaml)
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 5.0
opam-disable-sandboxing: true
- name: Setup Additional Languages (ocaml packages)
run: |
eval $(opam env)
opam install -y stdint uutf ppxlib
- name: Version Information
run: |
rustc --version
cargo --version
rustup --version
python3 --version
pyre --version
clang++ --version
javac -version
go version
dotnet --list-sdks
deno --version
dart --version
swift --version
eval $(opam env)
ocaml --version
- name: Compile (dev tests)
run: cargo test --no-run --locked
# It's faster to `test` before `build` according to
# https://github.com/rust-lang/rust-analyzer/blob/97b357e41b99ee3d5dd72a1640f6c74e4f4d6b64/.github/workflows/ci.yaml#L55
- name: Compile (dev serde-reflection)
run: cargo build --locked --all-targets
- name: Test (dev)
run: |
eval $(opam env)
cargo test
- name: Compile (release tests)
run: cargo test --no-run --locked --release --all-features
- name: Compile (release serde-reflection)
run: cargo build --locked --release --all-targets --all-features
- name: Test (release)
run: |
eval $(opam env)
cargo test --locked --release --all-features