-
Notifications
You must be signed in to change notification settings - Fork 0
170 lines (147 loc) · 5.69 KB
/
linux-nightly-trunk.yml
File metadata and controls
170 lines (147 loc) · 5.69 KB
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
# Copyright 2020-2026, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
# Nightly Linux run.
name: Nightly Linux tests / LLVM trunk
permissions: read-all
# Run daily - test sse2-avx512 targets @ -O0/-O1/-O2
on:
schedule:
- cron: '0 7 * * *'
push:
branches:
- '**test_nightly**'
workflow_dispatch:
inputs:
llvm_sha:
description: 'Specific LLVM commit SHA to build (leave empty for trunk HEAD)'
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
define-targets:
# Only run in the main ispc/ispc repo to avoid unnecessary scheduled runs on forks.
if: github.repository == 'ispc/ispc'
runs-on: ubuntu-latest
outputs:
# TODO: restore avx2vnni targets when SDE problem is fixed
targets: >-
["generic-i1x4", "generic-i1x8", "generic-i1x16", "generic-i1x32",
"generic-i8x16", "generic-i8x32",
"generic-i16x8", "generic-i16x16",
"generic-i32x4", "generic-i32x8", "generic-i32x16",
"generic-i64x4",
"sse2-i32x4", "sse2-i32x8",
"sse4-i8x16", "sse4-i16x8", "sse4-i32x4", "sse4-i32x8",
"avx1-i32x4", "avx1-i32x8", "avx1-i32x16", "avx1-i64x4",
"avx2-i8x32", "avx2-i16x16", "avx2-i32x4", "avx2-i32x8", "avx2-i32x16", "avx2-i64x4",
"avx512skx-x4", "avx512skx-x8", "avx512skx-x16", "avx512skx-x64", "avx512skx-x32",
"avx512icl-x4", "avx512icl-x8", "avx512icl-x16", "avx512icl-x64", "avx512icl-x32",
"avx512spr-x4", "avx512spr-x8", "avx512spr-x16", "avx512spr-x64", "avx512spr-x32",
"avx512gnr-x4", "avx512gnr-x8", "avx512gnr-x16", "avx512gnr-x64", "avx512gnr-x32",
"avx10.2dmr-x4", "avx10.2dmr-x8", "avx10.2dmr-x16", "avx10.2dmr-x64", "avx10.2dmr-x32"]
llvm_sha: ${{ steps.get-llvm-sha.outputs.llvm_sha }}
steps:
- name: Get LLVM SHA
id: get-llvm-sha
env:
INPUT_LLVM_SHA: ${{ inputs.llvm_sha }}
run: |
if [ -n "$INPUT_LLVM_SHA" ]; then
LLVM_SHA="$INPUT_LLVM_SHA"
echo "Using provided LLVM SHA: $LLVM_SHA"
else
LLVM_SHA=$(git ls-remote https://github.com/llvm/llvm-project.git refs/heads/main | cut -f1)
echo "Fetched LLVM main HEAD: $LLVM_SHA"
fi
echo "llvm_sha=$LLVM_SHA" >> "$GITHUB_OUTPUT"
echo "$LLVM_SHA" > llvm-commit-sha.txt
- name: Upload LLVM SHA artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: llvm_commit_sha
path: llvm-commit-sha.txt
linux-build-llvm-trunk:
needs: [define-targets]
runs-on: ubuntu-22.04
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
submodules: true
- name: Check environment
run: |
cat /proc/cpuinfo
- name: Build LLVM
run: |
cd docker/ubuntu/22.04/cpu_ispc_build
ls -al
docker buildx create --use
docker buildx build --tag ispc/ubuntu22.04 --target=llvm_build --build-arg REPO="${GITHUB_REPOSITORY}" --build-arg SHA="${GITHUB_SHA}" --build-arg LLVM_VERSION=trunk --build-arg LLVM_SHA="${{ needs.define-targets.outputs.llvm_sha }}" --output=type=tar,dest=result.tar .
- name: Pack LLVM
run: |
cd docker/ubuntu/22.04/cpu_ispc_build
tar xvf result.tar usr/local/src/llvm
mv usr/local/src/llvm/bin-trunk .
# Note using gzip here, instead of xz - trading of space for speed, as it's just for passing to another stage.
tar czvf llvm-trunk-ubuntu22.04-Release+Asserts-x86.arm.wasm.tar.gz bin-trunk
- name: Upload package
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: llvm_trunk_linux
path: docker/ubuntu/22.04/cpu_ispc_build/llvm-trunk-ubuntu22.04-Release+Asserts-x86.arm.wasm.tar.gz
linux-build-ispc-llvm-trunk:
needs: [linux-build-llvm-trunk]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
submodules: true
- name: Download package
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: llvm_trunk_linux
- name: Install dependencies
env:
LLVM_TAR: llvm-trunk-ubuntu22.04-Release+Asserts-x86.arm.wasm.tar.gz
LLVM_VERSION: trunk
run: |
.github/workflows/scripts/install-build-deps.sh
- name: Check environment
run: |
which -a clang
cat /proc/cpuinfo
- name: Build package
run: |
.github/workflows/scripts/build-ispc.sh
- name: Sanity testing (make check-all, make test)
run: |
.github/workflows/scripts/check-ispc.sh
- name: Upload package
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ispc_llvm_trunk_linux
path: build/ispc-trunk-linux.tar.gz
linux-test-llvm-trunk:
needs: [define-targets, linux-build-ispc-llvm-trunk]
strategy:
fail-fast: false
matrix:
arch: [x86, x86-64]
uses: ./.github/workflows/reusable.ispc.test.yml
with:
platform: linux
architecture: ${{ matrix.arch }}
artifact_name: ispc_llvm_trunk_linux
targets: ${{ needs.define-targets.outputs.targets }}
optsets: -O0 -O1 -O2