add readme #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |