-
Notifications
You must be signed in to change notification settings - Fork 41
155 lines (133 loc) · 6.19 KB
/
Copy pathbuild.yml
File metadata and controls
155 lines (133 loc) · 6.19 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
name: Build openFrameworks 0.12.1
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: openframeworks-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
macos:
name: macOS
runs-on: macos-14
timeout-minutes: 45
env:
OF_URL: https://github.com/openframeworks/openFrameworks/releases/download/0.12.1/of_v0.12.1_osx_release.tar.gz
OF_SHA256: e4a2dd6e75805320aac905f9f82f7b85e67a8b799137d47f35d40f7c4c195c9b
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Validate Xcode project structure
run: ./scripts/validate-xcode-projects.sh
- name: Cache openFrameworks 0.12.1
id: cache-openframeworks
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ runner.temp }}/of_v0.12.1_osx_release
key: openframeworks-0.12.1-macos-${{ runner.arch }}
- name: Download verified openFrameworks release
if: steps.cache-openframeworks.outputs.cache-hit != 'true'
shell: bash
run: |
OF_ARCHIVE="${RUNNER_TEMP}/of_v0.12.1_osx_release.tar.gz"
curl --fail --location --retry 3 --output "$OF_ARCHIVE" "$OF_URL"
echo "$OF_SHA256 $OF_ARCHIVE" | shasum --algorithm 256 --check
tar --extract --gzip --file "$OF_ARCHIVE" --directory "${RUNNER_TEMP}"
- name: Build all applications and run regression tests
run: ./scripts/build-all.sh "${RUNNER_TEMP}/of_v0.12.1_osx_release"
linux-render:
name: Linux Mesa rendering
runs-on: ubuntu-24.04
timeout-minutes: 60
# A clean Jammy package set avoids dependency conflicts with SDKs preinstalled on hosted runners.
container:
image: ubuntu:22.04@sha256:2edbbc5dc405e9612ba3584ce95480277e3eb374407b5505fe26f17df77c7dbc
defaults:
run:
shell: bash
env:
OF_URL: https://github.com/openframeworks/openFrameworks/releases/download/0.12.1/of_v0.12.1_linux64_gcc6_release.tar.gz
OF_SHA256: d6c1dcab777665b2aa63e5e3d9122cc116f096b3421db3493f795a621b399c63
LIBGL_ALWAYS_SOFTWARE: "1"
GALLIUM_DRIVER: llvmpipe
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- name: Bootstrap clean Ubuntu container
run: |
apt-get update
apt-get install --yes --no-install-recommends \
ca-certificates curl git sudo zstd lsb-release pkg-config python3
mkdir -p "${RUNNER_TEMP}/example-captures"
apt-cache policy libunwind-dev libunwind8 libgstreamer1.0-dev \
| tee "${RUNNER_TEMP}/example-captures/dependency-policy.log"
# Install the GStreamer prerequisite explicitly; fail here if package resolution breaks.
apt-get install --yes --no-install-recommends libunwind-dev
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Cache openFrameworks 0.12.1
id: cache-openframeworks
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ runner.temp }}/of_v0.12.1_linux64_gcc6_release
key: openframeworks-0.12.1-jammy-container-2edbbc5dc405-${{ runner.arch }}-d6c1dcab7776-v1
- name: Download verified openFrameworks release
if: steps.cache-openframeworks.outputs.cache-hit != 'true'
shell: bash
run: |
OF_ARCHIVE="${RUNNER_TEMP}/of_v0.12.1_linux64_gcc6_release.tar.gz"
curl --fail --location --retry 3 --output "$OF_ARCHIVE" "$OF_URL"
echo "$OF_SHA256 $OF_ARCHIVE" | sha256sum --check
tar --extract --gzip --file "$OF_ARCHIVE" --directory "${RUNNER_TEMP}"
- name: Install official Ubuntu dependencies and software OpenGL
shell: bash
run: |
# This installer comes from the checksum-pinned release and supports Ubuntu 22.04.
sudo env DEBIAN_FRONTEND=noninteractive bash \
"${RUNNER_TEMP}/of_v0.12.1_linux64_gcc6_release/scripts/linux/ubuntu/install_dependencies.sh" -y
sudo apt-get install --yes --no-install-recommends xvfb xauth mesa-utils libgl1-mesa-dri
- name: Build all applications and run regression tests
run: ./scripts/build-all.sh "${RUNNER_TEMP}/of_v0.12.1_linux64_gcc6_release"
- name: Render all examples with Mesa OpenGL
shell: bash
run: |
mkdir -p "${RUNNER_TEMP}/example-captures"
xvfb-run --auto-servernum --server-args="-screen 0 1600x1000x24 +extension GLX -nolisten tcp" \
bash -euo pipefail -c '
glxinfo -B | tee "${RUNNER_TEMP}/example-captures/opengl-context.log"
grep -qi llvmpipe "${RUNNER_TEMP}/example-captures/opengl-context.log"
./scripts/smoke-all.sh "${RUNNER_TEMP}/example-captures"
'
- name: Keep rendering evidence
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: openframeworks-rendering
path: ${{ runner.temp }}/example-captures
if-no-files-found: error
retention-days: 7
retarget-contracts:
name: Retarget input and path contracts (no motion solve)
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
OPENBLAS_NUM_THREADS: "1"
OMP_NUM_THREADS: "1"
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Isolated Python 3.12 test environment
run: |
python3.12 -m venv "${RUNNER_TEMP}/g1-contract-tests"
"${RUNNER_TEMP}/g1-contract-tests/bin/python" -m pip install \
-r tools/g1-retarget/requirements.txt
"${RUNNER_TEMP}/g1-contract-tests/bin/python" -m pip check
- name: Source parser, velocity paths, and guarded export tests
run: |
"${RUNNER_TEMP}/g1-contract-tests/bin/python" -m unittest discover \
-s tools/g1-retarget/preflight -p 'test_*.py' -v
"${RUNNER_TEMP}/g1-contract-tests/bin/python" -m unittest discover \
-s tools/g1-retarget/retarget -p 'test_*.py' -v