Skip to content

Commit 3aa2b55

Browse files
committed
Clean up & sign release artifacts
* Reformat main release tar.gz to have standard include/lib dirs * Update README with signature verification instrs & release structure Note: github no longer supports building in CentOS 7 containers, so this removes those from the build matrix. Signed-off-by: Gary Oberbrunner <[email protected]>
1 parent b9f93a7 commit 3aa2b55

File tree

5 files changed

+252
-141
lines changed

5 files changed

+252
-141
lines changed

.github/workflows/build.yml

Lines changed: 191 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
name: Build OpenFX libs and examples
22

3-
on: [push, pull_request]
3+
permissions:
4+
id-token: write
5+
contents: write
6+
actions: write
7+
8+
on:
9+
push:
10+
pull_request:
11+
workflow_dispatch:
12+
release:
13+
types:
14+
- published
415

516
jobs:
617
build:
@@ -13,44 +24,48 @@ jobs:
1324
container: ${{ matrix.container }}
1425
env:
1526
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true'
27+
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
1628
strategy:
1729
fail-fast: false
1830
matrix:
1931
include:
20-
- name_prefix: Linux CentOS 7 VFX CY2021
21-
release_prefix: linux-vfx2021
22-
ostype: linux
23-
aswfdockerbuild: true
24-
os: ubuntu-latest
25-
container: aswf/ci-base:2021
26-
vfx-cy: 2021
27-
has_cmake_presets: false
28-
buildtype: Release
29-
conan_version: 2.1.0
30-
cxx-standard: 17
31-
cxx-compiler: clang++
32-
cc-compiler: clang
33-
compiler-desc: Clang
34-
checkout_version: 3
35-
cuda: false
36-
opencl: true
37-
- name_prefix: Linux CentOS 7 VFX CY2022
38-
release_prefix: linux-vfx2022
39-
ostype: linux
40-
aswfdockerbuild: true
41-
os: ubuntu-latest
42-
container: aswf/ci-base:2022
43-
vfx-cy: 2022
44-
has_cmake_presets: false
45-
buildtype: Release
46-
conan_version: 2.1.0
47-
cxx-standard: 17
48-
cxx-compiler: clang++
49-
cc-compiler: clang
50-
compiler-desc: Clang
51-
checkout_version: 3
52-
cuda: false
53-
opencl: true
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
5469
- name_prefix: Linux Rocky 8 VFX CY2023
5570
release_prefix: linux-vfx2023
5671
ostype: linux
@@ -89,7 +104,6 @@ jobs:
89104
ostype: linux
90105
aswfdockerbuild: false
91106
os: ubuntu-latest
92-
container: null
93107
has_cmake_presets: true
94108
buildtype: Release
95109
conan_version: 2.1.0
@@ -104,7 +118,6 @@ jobs:
104118
release_prefix: mac
105119
ostype: mac
106120
os: macos-latest
107-
container: null # See the null value here
108121
has_cmake_presets: true
109122
buildtype: Release
110123
conan_version: 2.1.0
@@ -119,7 +132,6 @@ jobs:
119132
release_prefix: windows
120133
ostype: windows
121134
os: windows-latest
122-
container: null
123135
has_cmake_presets: true
124136
buildtype: Release
125137
conan_version: 2.1.0
@@ -134,7 +146,6 @@ jobs:
134146
release_prefix: windows-no-cuda
135147
ostype: windows
136148
os: windows-latest
137-
container: null
138149
has_cmake_presets: true
139150
buildtype: Release
140151
conan_version: 2.0.16
@@ -155,6 +166,7 @@ jobs:
155166
with:
156167
clean: true
157168
fetch-depth: 0
169+
158170
- name: Checkout code (v3)
159171
uses: actions/checkout@v3
160172
if: matrix.checkout_version == 3
@@ -172,12 +184,51 @@ jobs:
172184
echo "CONAN_PRESET=conan-$BUILDTYPE_LC" >> $GITHUB_ENV
173185
echo "BUILD_DIR=build/${{ matrix.buildtype }}" >> $GITHUB_ENV
174186
187+
- name: Set RELEASE_NAME
188+
# this looks like "linux-vfx2022-1.5[-no-opengl]"; used in filenames
189+
run: |
190+
RELEASE_PREFIX=${{ matrix.release_prefix }}
191+
OPENGL_BUILD=${{ env.OPENGL_BUILD }}
192+
if [ "${{ github.ref_type }}" == "tag" ]; then
193+
REF_SUFFIX=$(echo "${{ github.ref_name }}" | sed 's/OFX_Release_//')
194+
else
195+
REF_SUFFIX=$(echo ${{ github.sha }} | cut -c1-8)
196+
fi
197+
echo "RELEASE_NAME=${RELEASE_PREFIX}-${REF_SUFFIX}${OPENGL_BUILD}" >> $GITHUB_ENV
198+
175199
- name: Set up python 3.11
176200
uses: actions/setup-python@v5
177201
if: matrix.ostype == 'mac'
178202
with:
179203
python-version: '3.11'
180204

205+
# Q: should we use uv everywhere?
206+
# 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.
210+
211+
- name: Set up uv manually
212+
if: matrix.release_prefix == 'linux-vfx2021'
213+
run: |
214+
curl -LsSf https://astral.sh/uv/install.sh | sh
215+
source ~/.local/bin/env
216+
echo After sourcing uv env: "$PATH"
217+
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
222+
223+
- name: Check python, uv paths
224+
run: |
225+
echo $PATH
226+
echo -n 'which python: ' && which python
227+
echo -n 'which python3: ' && which python3
228+
echo -n 'python version: ' && python --version
229+
echo -n 'python3 version: ' python3 --version
230+
which uv || echo "No python uv; continuing"
231+
181232
- name: Install Conan
182233
id: conan
183234
uses: turtlebrowser/get-conan@main
@@ -186,15 +237,23 @@ jobs:
186237

187238
- name: Set up conan
188239
run: |
240+
which conan
241+
conan --version
189242
conan profile detect
190243
191244
- name: Install system dependencies if needed
192245
uses: ConorMacBride/install-package@v1
193246
if: ${{ matrix.aswfdockerbuild == false }}
194247
with:
195248
apt: libgl-dev libgl1-mesa-dev
196-
brew:
197-
brew-cask:
249+
250+
- name: Install gh cli if needed
251+
if: ${{ matrix.aswfdockerbuild == true }}
252+
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
256+
gh --version
198257
199258
- name: Setup MSVC
200259
if: startsWith(matrix.os, 'windows')
@@ -277,7 +336,8 @@ jobs:
277336
cmake --install $BUILD_DIR
278337
fi
279338
280-
- name: Build with make
339+
# This isn't used for release; just checks that makefiles still work.
340+
- name: Build old stuff with make
281341
run: |
282342
if [[ ${{ matrix.ostype }} = windows ]]; then
283343
echo No Windows nmake build yet
@@ -286,36 +346,98 @@ jobs:
286346
# should build Support/Plugins too, but those need work
287347
fi
288348
289-
- name: Copy includes into build folder for installation
349+
############################################################
350+
# Installation: produce release artifacts
351+
############################################################
352+
353+
354+
- name: Copy includes and libs into release folder for installation
355+
# Dir structure:
356+
# Install/OpenFX
357+
# lib
358+
# *.a or *.lib
359+
# include/
360+
# openfx/*.h
361+
# Support/*.h
362+
# HostSupport/*.h
363+
# so e.g `#include <openfx/Support/foo.h>` works with `-I.../OpenFX/include`
290364
run: |
291-
cp -R include ${{ env.BUILD_DIR }}/include
292-
cp -R Support/include ${{ env.BUILD_DIR }}/Support/include
293-
cp -R HostSupport/include ${{ env.BUILD_DIR }}/HostSupport/include
365+
mkdir -p Install/OpenFX/include/openfx
366+
tar -C include \
367+
--exclude='*.png' --exclude='*.doxy' --exclude='*.dtd' \
368+
--exclude='DocSrc' \
369+
-cf - . \
370+
| tar -xf - -C Install/OpenFX/include/openfx
371+
372+
mkdir -p Install/OpenFX/include/openfx/Support
373+
tar -C Support/include/ --exclude='*.png' --exclude='*.doxy' --exclude='*.dtd' \
374+
--exclude='DocSrc' \
375+
-cf - . \
376+
| tar -xf - -C Install/OpenFX/include/openfx/Support/
377+
378+
mkdir -p Install/OpenFX/include/openfx/HostSupport
379+
tar -C HostSupport/include/ --exclude='*.png' --exclude='*.doxy' --exclude='*.dtd' \
380+
--exclude='DocSrc' \
381+
-cf - . \
382+
| tar -xf - -C Install/OpenFX/include/openfx/HostSupport/
294383
295-
- name: Archive header files and libs to artifact
296-
uses: actions/upload-artifact@v3
384+
mkdir -p Install/OpenFX/lib
385+
find build -name 'lib*' -type f -exec cp {} Install/OpenFX/lib/ \;
386+
387+
# Artifacts for build & release:
388+
# - Header files, doc, and support libs, for use when developing hosts & plugins
389+
# - Built/installed example plugins, for testing in a host
390+
391+
# Create and sign headers/libs tarball
392+
- name: Create headers/libs tarball
393+
run: |
394+
tar -czf openfx-$RELEASE_NAME.tar.gz -C Install OpenFX
395+
396+
- name: Sign header/libs tarball with Sigstore
397+
uses: sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46 # v3.0.0
398+
# if: github.event_name == 'release'
297399
with:
298-
name: openfx-${{ matrix.release_prefix }}-${{ env.BUILDTYPE_LC }}-${{ env.GIT_COMMIT_ID }}${{env.OPENGL_BUILD}}
400+
inputs: openfx-${{ env.RELEASE_NAME }}.tar.gz
401+
upload-signing-artifacts: false
402+
release-signing-artifacts: false
403+
404+
- name: Upload header/libs tarball and signatures
405+
uses: actions/upload-artifact@v4
406+
with:
407+
name: "openfx-${{ env.RELEASE_NAME }}"
299408
path: |
300-
${{ env.BUILD_DIR }}/include
301-
!${{ env.BUILD_DIR }}/include/DocSrc
302-
!${{ env.BUILD_DIR }}/include/*.png
303-
!${{ env.BUILD_DIR }}/include/*.doxy
304-
!${{ env.BUILD_DIR }}/include/*.dtd
305-
${{ env.BUILD_DIR }}/Support/include
306-
${{ env.BUILD_DIR }}/HostSupport/include
307-
${{ env.BUILD_DIR }}/**/lib*
308-
309-
- name: Archive built/installed plugins
310-
uses: actions/upload-artifact@v3
409+
openfx-${{ env.RELEASE_NAME }}.tar.gz
410+
openfx-${{ env.RELEASE_NAME }}.tar.gz.sigstore.json
411+
412+
# Now the same, for the plugins
413+
414+
- name: Create built/installed plugins tarball
415+
run: |
416+
tar -czf openfx_plugins-$RELEASE_NAME.tar.gz -C build/Install .
417+
418+
- name: Sign plugins tarball with Sigstore
419+
uses: sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46 # v3.0.0
420+
with:
421+
inputs: openfx_plugins-${{ env.RELEASE_NAME }}.tar.gz
422+
upload-signing-artifacts: false
423+
release-signing-artifacts: false
424+
425+
- name: Upload plugins tarball and signatures
426+
uses: actions/upload-artifact@v4
311427
with:
312-
name: openfx_plugins-${{ matrix.release_prefix }}-${{ env.BUILDTYPE_LC }}-${{ env.GIT_COMMIT_ID }}${{env.OPENGL_BUILD}}
428+
name: "openfx_plugins-${{ env.RELEASE_NAME }}"
313429
path: |
314-
build/Install
315-
316-
# - name: Archive all build artifacts (for debugging CI)
317-
# uses: actions/upload-artifact@v3
318-
# with:
319-
# name: openfx-build-${{ matrix.release_prefix }}-${{ env.BUILDTYPE_LC }}-${{ env.GIT_COMMIT_ID }}
320-
# path: |
321-
# .
430+
openfx_plugins-${{ env.RELEASE_NAME }}.tar.gz
431+
openfx_plugins-${{ env.RELEASE_NAME }}.tar.gz.sigstore.json
432+
433+
- name: Upload artifacts to release
434+
if: github.event_name == 'release'
435+
env:
436+
GH_TOKEN: ${{ github.token }}
437+
TAG: ${{ github.ref_name }}
438+
run: |
439+
gh release upload ${TAG} \
440+
openfx-${{ env.RELEASE_NAME }}.tar.gz \
441+
openfx-${{ env.RELEASE_NAME }}.tar.gz.sigstore.json \
442+
openfx_plugins-${{ env.RELEASE_NAME }}.tar.gz \
443+
openfx_plugins-${{ env.RELEASE_NAME }}.tar.gz.sigstore.json

0 commit comments

Comments
 (0)