-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (40 loc) · 1 KB
/
checkfmt.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
name: Check the format of a PR
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
env:
USER: runner
# Cancel the current workflow when new commit pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check-format:
name: "Check format"
runs-on: [self-hosted, linux, nixos]
strategy:
fail-fast: false
if: always()
defaults:
run:
working-directory: ./templates/chisel
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Check Scala format"
run: |
nix develop -c bash -c 'mill gcd.checkFormat && mill elaborator.checkFormat'
- name: "Check Rust format"
run: |
cd gcdemu
nix develop -c cargo fmt --check
cd ..
- name: "Check nix format"
run: |
nix fmt -- --check nix flake.nix