Upgrade Xcode on macOS #34
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: nix | |
on: | |
pull_request: | |
push: | |
branches: '**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-test-install: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- ubuntu | |
- macos | |
compiler: | |
- gcc | |
- clang | |
id: [1,2,3,4,5,6] | |
include: | |
- id: 1 | |
cmake: '3.29.0' | |
conan: 1 | |
generator: Unix Makefiles | |
flavor: release | |
linkage: static | |
cppstd: 20 | |
- id: 2 | |
cmake: '3.21.0' | |
conan: 1 | |
generator: Unix Makefiles | |
flavor: release | |
linkage: static | |
cppstd: 20 | |
- id: 3 | |
cmake: '3.29.0' | |
conan: 1 | |
generator: Ninja | |
flavor: release | |
linkage: static | |
cppstd: 20 | |
- id: 4 | |
cmake: '3.29.0' | |
conan: 1 | |
generator: Unix Makefiles | |
flavor: debug | |
linkage: static | |
cppstd: 20 | |
- id: 5 | |
cmake: '3.29.0' | |
conan: 1 | |
generator: Unix Makefiles | |
flavor: release | |
linkage: shared | |
cppstd: 20 | |
- id: 6 | |
cmake: '3.29.0' | |
conan: 1 | |
generator: Unix Makefiles | |
flavor: release | |
linkage: shared | |
cppstd: 17 | |
- platform: ubuntu | |
runner: ubuntu-24.04 | |
- platform: macos | |
runner: macos-14 | |
- platform: ubuntu | |
compiler: gcc | |
profile: | |
compiler: gcc | |
version: 13 | |
cc: /usr/bin/gcc-13 | |
cxx: /usr/bin/g++-13 | |
- platform: ubuntu | |
compiler: clang | |
profile: | |
compiler: clang | |
version: 16 | |
cc: /usr/bin/clang-16 | |
cxx: /usr/bin/clang++-16 | |
- platform: macos | |
compiler: gcc | |
profile: | |
compiler: gcc | |
version: 13 | |
cc: gcc-13 | |
cxx: g++-13 | |
- platform: macos | |
compiler: clang | |
profile: | |
compiler: apple-clang | |
version: 15 | |
cc: /usr/bin/clang | |
cxx: /usr/bin/clang++ | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: install Python | |
uses: actions/setup-python@v5 | |
with: | |
# The `imp` module is removed in Python 3.12 | |
# but required by Conan 1.x. | |
python-version: '3.11' | |
- name: install CMake | |
uses: jwlawson/actions-setup-cmake@v2 | |
with: | |
cmake-version: ${{ matrix.cmake }} | |
- name: install XCode on macOS | |
if: startsWith(matrix.platform, 'macos') | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.3' | |
- name: install Ninja on Linux | |
if: matrix.generator == 'Ninja' && startsWith(matrix.platform, 'ubuntu') | |
run: sudo apt install ninja-build | |
- name: install Ninja on macOS | |
if: matrix.generator == 'Ninja' && startsWith(matrix.platform, 'macos') | |
run: brew install ninja | |
- name: check compiler | |
run: | | |
${{ matrix.profile.cc }} --version | |
${{ matrix.profile.cxx }} --version | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install Conan and Cupcake | |
run: pipx install 'conan~=${{ matrix.conan }}.0' cupcake | |
- name: check environment | |
run: | | |
env | sort | |
echo ${PATH} | tr ':' '\n' | |
python --version | |
conan --version | |
cmake --version | |
cupcake --version | |
- name: configure Conan | |
if: matrix.conan == 1 | |
run: | | |
conan profile new default --detect | |
conan profile update settings.compiler.cppstd=${{ matrix.cppstd }} default | |
conan profile update settings.compiler=${{ matrix.profile.compiler }} default | |
conan profile update settings.compiler.version=${{ matrix.profile.version }} default | |
conan profile update env.CC=${{ matrix.profile.cc }} default | |
conan profile update env.CXX=${{ matrix.profile.cxx }} default | |
conan profile update 'conf.tools.build:compiler_executables={"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default | |
conan remote add github https://conan.jfreeman.dev | |
- name: configure Conan on macOS | |
if: runner.os == 'macOS' | |
run: | | |
conan profile update 'conf.tools.build:exelinkflags=["-Wl,-ld_classic"]' default | |
- name: configure Conan for libstdc++ | |
if: runner.os == 'Linux' || matrix.compiler == 'gcc' | |
run: | | |
conan profile update settings.compiler.libcxx=libstdc++11 default | |
- run: cupcake build --verbose -G '${{ matrix.generator }}' --flavor ${{ matrix.flavor }} --${{ matrix.linkage }} | |
- run: cupcake test --verbose | |
- run: cupcake install |