-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 983 Bytes
/
format.yaml
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
name: format
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
clang-format:
runs-on: ubuntu-latest
strategy:
matrix:
compiler:
- clang13
cuda:
- false
env:
WITH_SHELL: nix-shell /home/runner/work/sisi4s/sisi4s/etc/env/nix/shell.nix --argstr compiler ${{matrix.compiler}} --arg cuda ${{matrix.cuda}} --run
NJ: 4
steps:
- uses: actions/checkout@v2.3.4
- name: pwd
run: |
pwd
- name: Install Nix
uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Format
run: |
${WITH_SHELL} './tools/ci-format.sh'
- name: Format
run: |
${WITH_SHELL} './tools/ci-format.sh'
- name: Files changed
run: |
files="$(git diff --name-only)"
if [[ -n "$files" ]]; then
echo files changed
echo $files
exit 1
fi