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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
name: CI
on:
workflow_dispatch:
merge_group:
types: [checks_requested]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'push' }}
jobs:
filter:
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.filter.outputs.should-run }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "2"
- id: filter
run: |
# This step prevents subsequent steps from running if only documentation was changed
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
git fetch origin ${{ github.base_ref }}
BASE=origin/${{ github.base_ref }}
else
BASE=HEAD^1
fi
shouldRun=true
if files="$(git diff --name-only $BASE...HEAD)"; then
# Git diff succeeded, check if non-documentation files were changed
if echo "$files" | grep -qvE '^(docs/|LICENSES/|LICENSE$|CONTRIBUTING\.md$|README\.md$)'; then
shouldRun=true
else
echo "Only documentation files changed, skipping remaining steps"
shouldRun=false
fi
else
echo "Git diff failed, conservatively running tests"
shouldRun=true
fi
echo "should-run=$shouldRun" >> $GITHUB_OUTPUT
# Linux builds
build-linux-debug-gcc-x86_64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: linux
compiler: gcc
platform: x86_64
config: debug
runs-on: '["ubuntu-22.04"]'
build-linux-release-gcc-x86_64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: linux
compiler: gcc
platform: x86_64
config: release
runs-on: '["ubuntu-22.04"]'
build-linux-release-gcc-wasm:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: linux
compiler: gcc
platform: wasm
config: release
runs-on: '["ubuntu-22.04"]'
# macOS builds
build-macos-debug-clang-aarch64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: macos
compiler: clang
platform: aarch64
config: debug
runs-on: '["macos-latest"]'
build-macos-release-clang-aarch64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: macos
compiler: clang
platform: aarch64
config: release
runs-on: '["macos-latest"]'
# Windows builds (self-hosted)
build-windows-debug-cl-x86_64-gpu:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: windows
compiler: cl
platform: x86_64
config: debug
runs-on: '["Windows", "self-hosted", "GCP-T4"]'
build-windows-release-cl-x86_64-gpu:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: windows
compiler: cl
platform: x86_64
config: release
runs-on: '["Windows", "self-hosted", "GCP-T4"]'
# Linux tests
test-linux-debug-gcc-x86_64:
needs: [filter, build-linux-debug-gcc-x86_64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: linux
compiler: gcc
platform: x86_64
config: debug
runs-on: '["ubuntu-22.04"]'
test-category: smoke
server-count: 2
test-linux-release-gcc-x86_64:
needs: [filter, build-linux-release-gcc-x86_64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: linux
compiler: gcc
platform: x86_64
config: release
runs-on: '["ubuntu-22.04"]'
test-category: full
server-count: 4
# macOS tests
test-macos-debug-clang-aarch64:
needs: [filter, build-macos-debug-clang-aarch64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: macos
compiler: clang
platform: aarch64
config: debug
runs-on: '["macos-latest"]'
test-category: smoke
server-count: 3
test-macos-release-clang-aarch64:
needs: [filter, build-macos-release-clang-aarch64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: macos
compiler: clang
platform: aarch64
config: release
runs-on: '["macos-latest"]'
test-category: full
full-gpu-tests: true
server-count: 3
# Windows GPU tests (self-hosted)
test-windows-debug-cl-x86_64-gpu:
needs: [filter, build-windows-debug-cl-x86_64-gpu]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: windows
compiler: cl
platform: x86_64
config: debug
runs-on: '["Windows", "self-hosted", "GCP-T4"]'
test-category: full
full-gpu-tests: true
test-windows-release-cl-x86_64-gpu:
needs: [filter, build-windows-release-cl-x86_64-gpu]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: windows
compiler: cl
platform: x86_64
config: release
runs-on: '["Windows", "self-hosted", "GCP-T4"]'
test-category: full
full-gpu-tests: true
|