-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (49 loc) · 1.91 KB
/
verify.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
name: verify
on: [push, pull_request, workflow_dispatch]
# Verify software.
jobs:
# Skipping duplicate jobs doesn't work well with matrix (!!),
# so we'll just do excess work.
###########################################################
# skip_dups:
# name: Check for duplicate jobs to avoid duplication
# # continue-on-error: true # Uncomment once integration is finished
# runs-on: ubuntu-latest
# # Map a step output to a job output
# outputs:
# should_skip: ${{ steps.skip_check.outputs.should_skip }}
# steps:
# - id: skip_check
# uses: fkirc/skip-duplicate-actions@master
# with:
# github_token: ${{ github.token }}
# paths_ignore: '["**/README.md", "**/docs/**"]'
###########################################################
test:
name: Rebuild and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest, windows-latest, macOS-latest]
rust: [stable] # [stable, nightly]
# needs: skip_dups
# if: ${{ needs.skip_dups.outputs.should_skip != 'true' }}
steps:
- uses: actions/checkout@v2
- name: Install rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
components: clippy, rustfmt
# TODO(David): Add more static tests, perhaps eventually fail on warnings
# (or disable those warnings, preferably as specifically as we can).
- name: Run tests
run: cargo test --verbose
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Format
run: cargo fmt -- --check
- name: Verify official set.mm
run: |
curl -s -G https://raw.githubusercontent.com/metamath/set.mm/master/set.mm > set.mm
cargo run -- --jobs 8 set.mm --verify --grammar --parse-stmt --verify-parse-stmt