add ninja #221
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: Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
- 57-add-support-for-adjustment-layers | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- published | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Ubuntu GCC | |
os: ubuntu-24.04 | |
compiler: gcc-13 | |
compilercxx: g++-13 | |
cflags: "" | |
cxxflags: "" | |
- name: Ubuntu Clang | |
os: ubuntu-24.04 | |
compiler: clang | |
cflags: "-fsanitize=address,leak,undefined" | |
cxxflags: "-fsanitize=address,leak,undefined" | |
compilercxx: clang++ | |
- name: Windows MSVC | |
os: windows-latest | |
compiler: msvc | |
compilercxx: msvc | |
cflags: "" | |
cxxflags: "" | |
- name: MacOS ARM GCC | |
os: macos-latest | |
compiler: gcc-13 | |
compilercxx: g++-13 | |
cflags: "" | |
cxxflags: "" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
# We need to specify Xcode15.3 here as the default for macos-14 runners is 15.01 which has a bug | |
# causing linking to fail. | |
- name: Setup Xcode 15.3 | |
if: matrix.os == 'macos-latest' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
# vcpkg requires ninja which isnt available by default on macos so we add it manually | |
- name: Setup Ninja MacOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install ninja | |
echo "Ninja build system installed" | |
- name: Initialize vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/thirdparty/vcpkg' | |
- name: Configure CMake ${{ matrix.os }}-${{ matrix.compilercxx }} | |
env: | |
CC: ${{ matrix.compiler }} | |
CXX: ${{ matrix.compilercxx }} | |
CFLAGS: ${{ matrix.cflags }} | |
CXXFLAGS: ${{ matrix.cxxflags }} | |
run: | | |
cmake -B ${{github.workspace}}/build -DVCPKG_OSX_DEPLOYMENT_TARGET="14.4" -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPSAPI_BUILD_DOCS=OFF -DPSAPI_BUILD_BENCHMARKS=OFF -DPSAPI_BUILD_EXAMPLES=OFF -DPSAPI_BUILD_PYTHON=OFF | |
- name: Build ${{ matrix.os }}-${{ matrix.compilercxx }} | |
env: | |
CC: ${{ matrix.compiler }} | |
CXX: ${{ matrix.compilercxx }} | |
CFLAGS: ${{ matrix.cflags }} | |
CXXFLAGS: ${{ matrix.cxxflags }} | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
# On windows we need to copy the test files differently as it generates sub-folders | |
# for the copied test files | |
- name: Copy Testfiles on Windows | |
if: runner.os == 'Windows' | |
working-directory: ${{github.workspace}}/build/PhotoshopTest | |
run: xcopy ".\\${{env.BUILD_TYPE}}\\documents" ".\\documents" /E /I | |
- name: Test ${{ matrix.os }}-${{ matrix.compilercxx }} | |
working-directory: ${{github.workspace}}/build/PhotoshopTest | |
run: ctest -C ${{env.BUILD_TYPE}} --extra-verbose --stop-on-failure --output-on-failure |