1
1
name : ci
2
-
3
2
on :
4
3
push :
5
4
branches :
6
- - main
5
+ - main
7
6
pull_request :
8
7
branches :
9
- - main
10
-
8
+ - main
11
9
jobs :
12
10
Test :
13
11
runs-on : ubuntu-24.04
@@ -16,78 +14,65 @@ jobs:
16
14
uses : actions/checkout@v4
17
15
with :
18
16
fetch-depth : 0
19
-
20
17
- name : Create Cache Timestamp
21
18
id : cache_timestamp
22
19
23
20
with :
24
21
format : ' YYYY-MM-DD-HH-mm-ss'
25
-
26
22
- name : Mount bazel cache
27
23
uses : actions/cache@v4
28
24
with :
29
25
path : " ~/.cache/bazel"
30
26
key : bazelcache_test_${{ steps.cache_timestamp.outputs.time }}
31
27
restore-keys : bazelcache_test_
32
-
33
28
- name : Test
34
29
run : |
35
30
export CC=gcc-13
36
31
export CXX=g++-13
37
32
bazel test --noshow_progress --keep_going ...
38
-
39
33
MacOsBuild :
40
34
runs-on : macos-latest
41
35
steps :
42
36
- name : Checkout code
43
37
uses : actions/checkout@v4
44
38
with :
45
39
fetch-depth : 0
46
-
47
40
- name : Test
48
41
run : |
49
42
bazel test --noshow_progress --keep_going ...
50
-
51
43
- name : Build
52
44
run : |
53
45
bazel build --noshow_progress -c opt //fpga:fpga-as
54
-
55
46
CodeFormatting :
56
47
runs-on : ubuntu-24.04
57
48
steps :
58
49
- name : Checkout code
59
50
uses : actions/checkout@v4
60
51
with :
61
52
fetch-depth : 0
62
-
63
53
- name : Install Dependencies
64
54
run : |
65
55
sudo apt-get install clang-format-17
66
-
67
56
- name : Run formatting style check
68
57
run : |
69
58
clang-format-17 --version
70
59
RUNNING_IN_CI=1 CLANG_FORMAT=clang-format-17 \
71
60
scripts/run-clang-format.sh
72
-
73
61
ClangTidy :
74
62
runs-on : ubuntu-24.04
75
63
steps :
76
64
- name : Checkout code
77
65
uses : actions/checkout@v4
78
66
with :
79
67
fetch-depth : 0
80
-
81
68
- name : Install Dependencies
82
69
run : |
83
70
sudo apt-get install clang-tidy-18
84
-
85
71
- name : Create Cache Timestamp
86
72
id : cache_timestamp
87
73
88
74
with :
89
75
format : ' YYYY-MM-DD-HH-mm-ss'
90
-
91
76
- name : Mount clang-tidy cache
92
77
uses : actions/cache@v4
93
78
with :
@@ -96,13 +81,24 @@ jobs:
96
81
~/.cache/bazel
97
82
key : clang-tidy-cache_${{ steps.cache_timestamp.outputs.time }}
98
83
restore-keys : clang-tidy-cache_
99
-
100
84
- name : Build Compilation DB
101
85
run : |
102
86
scripts/make-compilation-db.sh
103
-
104
87
- name : Run clang-tidy
105
88
run : |
106
89
clang-tidy-18 --version
107
90
CLANG_TIDY=clang-tidy-18 scripts/run-clang-tidy-cached.cc \
108
91
|| ( cat fpga-assembler_clang-tidy.out ; exit 1)
92
+ NixBuild :
93
+ runs-on : ubuntu-latest
94
+ steps :
95
+ - uses : actions/checkout@v4
96
+ - uses : cachix/install-nix-action@v25
97
+ with :
98
+ nix_path : nixpkgs=channel:nixos-unstable
99
+ - uses : cachix/cachix-action@v15
100
+ with :
101
+ name : mycache
102
+ authToken : " ${{ secrets.CACHIX_AUTH_TOKEN }}"
103
+ - run : nix-build
104
+ - run : nix-shell --run "echo OK"
0 commit comments