Skip to content

Update cmake-build.yml to macOS-14 #4

Update cmake-build.yml to macOS-14

Update cmake-build.yml to macOS-14 #4

Workflow file for this run

name: issue-9997
on:
workflow_dispatch:
push:
branches:
- issue-9997
pull_request:
branches:
- master
release:
types:
- published
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-24.04
compiler: gcc-13
compilercxx: g++-13
- name: Windows MSVC
os: windows-latest
compiler: msvc
compilercxx: msvc
- name: MacOS Intel GCC
os: macos-14
compiler: gcc-13
compilercxx: g++-13
- name: MacOS ARM GCC
os: macos-latest
compiler: gcc-13
compilercxx: g++-13
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.2
#if: matrix.os == 'macos-latest'
#uses: maxim-lobanov/setup-xcode@v1
#with:
#xcode-version: '15.2'
# We need to specify Xcode15.2 here as the default for macos-13 runners is 15.01 which has a bug
# causing linking to fail.
- name: Setup Xcode 15.2
if: matrix.os == 'macos-14'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2'
- name: Configure CMake ${{ matrix.os }}
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compilercxx }}
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPSAPI_BUILD_DOCS=OFF -DPSAPI_BUILD_BENCHMARKS=OFF -DPSAPI_BUILD_TESTS=OFF -DPSAPI_BUILD_PYTHON=OFF
- name: Build ${{ matrix.os }}
# Build your program with the given configuration
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compilercxx }}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# Call our python script to generate the relevant release artifacts after which we upload
# them for each platform
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Generate artifacts for ${{ matrix.os }}
run: python scripts/generate_release.py --build-dir ${{github.workspace}}/build
- name: Upload Release Artifacts
uses: actions/upload-artifact@v3
with:
name: PhotoshopAPI-${{ matrix.os }}
path: ${{github.workspace}}/release