-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.42 KB
/
ctl-unit-tests.yml
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
name: CTL Unit Tests
on: [pull_request, push]
jobs:
ctl-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set CTL_MODULE_PATH
run: echo "CTL_MODULE_PATH=${{ github.workspace }}/lib:${{ github.workspace }}/tests" >> $GITHUB_ENV
- name: Install Homebrew and Add to PATH
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH" >> $GITHUB_ENV
- name: Install CTL via Homebrew
run: |
brew install ctl
- name: Generate a TIFF Image
run: |
sudo apt-get update
sudo apt-get install -y imagemagick
convert -size 20x20 -depth 8 -colorspace RGB gradient:red-blue /tmp/input.tif
- name: Run CTL Render and Capture Output
run: |
ctlrender -ctl /home/runner/work/aces-unittest-test/aces-unittest-test/tests/ACEStests.Execute.Tests.ctl /tmp/input.tif /tmp/output.tif 2>&1 > /tmp/ctl_output.txt
retval=$?
cat /tmp/ctl_output.txt
if [ $retval -ne 0 ]; then
echo "ctlrender exited with code $retval"
exit $retval
fi
continue-on-error: true
- name: Check for 'FAILED' in Output
run: |
if grep -q "FAILED" /tmp/ctl_output.txt; then
echo "Failed tests detected"
exit 1
fi