Skip to content

Commit 8276ac8

Browse files
committed
Restore older CentOS 7 builds, vfx-2021 & 2022
* Install node20 with old glibc into container volumes - This allows us to always use recent action versions too * Use uv to install python, paying attention to path setup * Use yum on older CentOS 7 (didn't have dnf) * Update CUDA action version and CUDA version (older ones disappear from the site) Signed-off-by: Gary Oberbrunner <[email protected]>
1 parent 3aa2b55 commit 8276ac8

File tree

1 file changed

+69
-67
lines changed

1 file changed

+69
-67
lines changed

.github/workflows/build.yml

Lines changed: 69 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -21,51 +21,50 @@ jobs:
2121
github.event_name == 'push' ||
2222
github.event.pull_request.head.repo.full_name != github.repository
2323
runs-on: ${{ matrix.os }}
24-
container: ${{ matrix.container }}
24+
container:
25+
image: ${{ matrix.container }}
26+
volumes: ${{ matrix.need_node20_vol && fromJSON('["/node20217:/node20217:rw,rshared", "/node20217:/__e/node20:ro,rshared"]') || fromJSON('[]') }}
2527
env:
2628
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true'
2729
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
2830
strategy:
2931
fail-fast: false
3032
matrix:
3133
include:
32-
# Github removed support for these older CentOS versions
33-
# Nov 2024 by removing node16; all actions use node20 now
34-
# which doesn't run on CentOS 7 due to too-old GLIBC.
35-
# - name_prefix: Linux CentOS 7 VFX CY2021
36-
# release_prefix: linux-vfx2021
37-
# ostype: linux
38-
# aswfdockerbuild: true
39-
# os: ubuntu-latest
40-
# container: aswf/ci-base:2021
41-
# vfx-cy: 2021
42-
# has_cmake_presets: false
43-
# buildtype: Release
44-
# conan_version: 2.1.0
45-
# cxx-standard: 17
46-
# cxx-compiler: clang++
47-
# cc-compiler: clang
48-
# compiler-desc: Clang
49-
# checkout_version: 3
50-
# cuda: false
51-
# opencl: true
52-
# - name_prefix: Linux CentOS 7 VFX CY2022
53-
# release_prefix: linux-vfx2022
54-
# ostype: linux
55-
# aswfdockerbuild: true
56-
# os: ubuntu-latest
57-
# container: aswf/ci-base:2022
58-
# vfx-cy: 2022
59-
# has_cmake_presets: false
60-
# buildtype: Release
61-
# conan_version: 2.1.0
62-
# cxx-standard: 17
63-
# cxx-compiler: clang++
64-
# cc-compiler: clang
65-
# compiler-desc: Clang
66-
# checkout_version: 3
67-
# cuda: false
68-
# opencl: true
34+
- name_prefix: Linux CentOS 7 VFX CY2021
35+
release_prefix: linux-vfx2021
36+
ostype: linux
37+
aswfdockerbuild: true
38+
os: ubuntu-latest
39+
container: aswf/ci-base:2021
40+
vfx-cy: 2021
41+
need_node20_vol: true
42+
has_cmake_presets: false
43+
buildtype: Release
44+
conan_version: 2.1.0
45+
cxx-standard: 17
46+
cxx-compiler: clang++
47+
cc-compiler: clang
48+
compiler-desc: Clang
49+
cuda: false
50+
opencl: true
51+
- name_prefix: Linux CentOS 7 VFX CY2022
52+
release_prefix: linux-vfx2022
53+
ostype: linux
54+
aswfdockerbuild: true
55+
os: ubuntu-latest
56+
container: aswf/ci-base:2022
57+
vfx-cy: 2022
58+
need_node20_vol: true
59+
has_cmake_presets: false
60+
buildtype: Release
61+
conan_version: 2.1.0
62+
cxx-standard: 17
63+
cxx-compiler: clang++
64+
cc-compiler: clang
65+
compiler-desc: Clang
66+
cuda: false
67+
opencl: true
6968
- name_prefix: Linux Rocky 8 VFX CY2023
7069
release_prefix: linux-vfx2023
7170
ostype: linux
@@ -80,7 +79,6 @@ jobs:
8079
cxx-compiler: clang++
8180
cc-compiler: clang
8281
compiler-desc: Clang
83-
checkout_version: 4
8482
cuda: false
8583
opencl: true
8684
- name_prefix: Linux Rocky 8 VFX CY2023 No OpenGL
@@ -97,7 +95,6 @@ jobs:
9795
cxx-compiler: clang++
9896
cc-compiler: clang
9997
compiler-desc: Clang
100-
checkout_version: 4
10198
opengl: false
10299
- name_prefix: Linux Ubuntu
103100
release_prefix: linux-ubuntu
@@ -111,7 +108,6 @@ jobs:
111108
cxx-compiler: clang++
112109
cc-compiler: clang
113110
compiler-desc: Clang
114-
checkout_version: 4
115111
cuda: true
116112
opencl: true
117113
- name_prefix: MacOS
@@ -125,7 +121,6 @@ jobs:
125121
cxx-compiler: clang++
126122
cc-compiler: clang
127123
compiler-desc: Clang
128-
checkout_version: 4
129124
cuda: false
130125
opencl: true
131126
- name_prefix: Windows
@@ -139,7 +134,6 @@ jobs:
139134
cxx-compiler: clang++
140135
cc-compiler: clang
141136
compiler-desc: Clang
142-
checkout_version: 4
143137
cuda: true
144138
opencl: true
145139
- name_prefix: Windows no CUDA
@@ -153,23 +147,20 @@ jobs:
153147
cxx-compiler: clang++
154148
cc-compiler: clang
155149
compiler-desc: Clang
156-
checkout_version: 4
157150
cuda: false
158151
opencl: false
159152
defaults:
160153
run:
161154
shell: bash
162155
steps:
163-
- name: Checkout code (v4)
164-
uses: actions/checkout@v4
165-
if: matrix.checkout_version == 4
166-
with:
167-
clean: true
168-
fetch-depth: 0
156+
- name: install nodejs20glibc2.17
157+
if: matrix.need_node20_vol == true
158+
run: |
159+
curl --silent https://unofficial-builds.nodejs.org/download/release/v20.18.1/node-v20.18.1-linux-x64-glibc-217.tar.xz | \
160+
tar -xJ --strip-components 1 -C /node20217 -f -
169161
170-
- name: Checkout code (v3)
171-
uses: actions/checkout@v3
172-
if: matrix.checkout_version == 3
162+
- name: Checkout code
163+
uses: actions/checkout@v4
173164
with:
174165
clean: true
175166
fetch-depth: 0
@@ -204,9 +195,6 @@ jobs:
204195

205196
# Q: should we use uv everywhere?
206197
# Unfortunately astral-sh/setup-uv action doesn't work on CentOS 7, its GLIBC is too old.
207-
# BUT this CI build doesn't work on CentOS 7 anyway, due to recent github changes.
208-
# Keep this uv code in case we'd like to install python and conan with uv, but for now
209-
# it is not used.
210198

211199
- name: Set up uv manually
212200
if: matrix.release_prefix == 'linux-vfx2021'
@@ -215,19 +203,26 @@ jobs:
215203
source ~/.local/bin/env
216204
echo After sourcing uv env: "$PATH"
217205
uv python install --preview 3.11
218-
# Add symlinks for python3 and python
219-
(cd ~/.local/bin; ln -sf python3.11 python3; ln -sf python3.11 python)
220-
# Save updated path
221-
echo "PATH=$PATH" >> $GITHUB_ENV
206+
207+
# Python is in $(uv python dir)/cpython-*/bin
208+
# uv also installs a symlink in $HOME/.local/bin but because
209+
# that is only a symlink, it causes problems with pip and venv.
210+
# As a workaround, prepend the actual bin dir to $PATH.
211+
uv_python_dir="$(uv python dir)"
212+
uv_cpython_name="$(/bin/ls -1 $uv_python_dir)"
213+
uv_python_path="$uv_python_dir/$uv_cpython_name/bin"
214+
PATH="$uv_python_path":$PATH
215+
# Prepend to path for future steps (note: don't use $GITHUB_ENV here)
216+
echo "$uv_python_path" >> $GITHUB_PATH
222217
223218
- name: Check python, uv paths
224219
run: |
225220
echo $PATH
226221
echo -n 'which python: ' && which python
227222
echo -n 'which python3: ' && which python3
228223
echo -n 'python version: ' && python --version
229-
echo -n 'python3 version: ' python3 --version
230-
which uv || echo "No python uv; continuing"
224+
echo -n 'python3 version: ' && python3 --version
225+
echo -n 'which uv: ' && (which uv || echo "No python uv; continuing")
231226
232227
- name: Install Conan
233228
id: conan
@@ -250,9 +245,16 @@ jobs:
250245
- name: Install gh cli if needed
251246
if: ${{ matrix.aswfdockerbuild == true }}
252247
run: |
253-
dnf -y install 'dnf-command(config-manager)'
254-
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
255-
dnf -y install gh --repo gh-cli
248+
if command -v dnf; then
249+
dnf -y install 'dnf-command(config-manager)'
250+
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
251+
dnf -y install gh --repo gh-cli
252+
else
253+
# older CentOS
254+
wget https://github.com/cli/cli/releases/download/v2.63.2/gh_2.63.2_linux_amd64.rpm
255+
yum install -y gh_2.63.2_linux_amd64.rpm
256+
rm gh_2.63.2_linux_amd64.rpm
257+
fi
256258
gh --version
257259
258260
- name: Setup MSVC
@@ -266,11 +268,11 @@ jobs:
266268
uses: seanmiddleditch/gha-setup-ninja@v4
267269

268270
- name: Install CUDA Toolkit
269-
uses: Jimver/[email protected].11
271+
uses: Jimver/[email protected].19
270272
id: cuda-toolkit-linux
271273
if: matrix.ostype == 'linux' && matrix.cuda == true
272274
with:
273-
cuda: '12.1.0'
275+
cuda: '12.6.2'
274276
method: 'network'
275277
sub-packages: '["nvcc", "cudart"]'
276278
linux-local-args: '["--toolkit"]'

0 commit comments

Comments
 (0)