Skip to content

macos-14 M1

macos-14 M1 #503

Workflow file for this run

# Copyright (c) 2024 Devexperts LLC.
# SPDX-License-Identifier: MPL-2.0
name: CI
on:
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
config:
- image: windows-latest
os: windows
cores: 4
cc: 'cl'
cxx: 'cl'
- image: macos-13
os: macos
cores: 4
xcode: '15.0'
cc: 'clang'
cxx: 'clang++'
- image: ubuntu-22.04
os: linux
cores: 4
cc: 'gcc-13'
cxx: 'g++-13'
- image: macos-14
os: macos
cores: 3
xcode: '15.0'
cc: 'clang'
cxx: 'clang++'
buildType: [ Release ]
runs-on: ${{ matrix.config.image }}
steps:
- uses: actions/checkout@v3
- name: Select Xcode version
if: ${{ contains(matrix.config.os, 'macos') }}
run: sudo xcode-select -s '/Applications/Xcode_${{matrix.config.xcode}}.app/Contents/Developer'
- name: Configure MSVC console (Windows)
if: ${{ contains(matrix.config.os, 'win') }}
uses: ilammy/msvc-dev-cmd@v1
# - name: Add msbuild to PATH
# uses: microsoft/setup-msbuild@v2
# if: ${{ contains(matrix.config.os, 'win') }}
- name: Prepare build
run: |
ls
mkdir ${{github.workspace}}/build
- name: Configure CMake (Mac)
if: ${{ contains(matrix.config.os, 'mac') }}
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DCMAKE_C_COMPILER=${{matrix.config.cc}} -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} -DDXFCXX_BUILD_DOC=OFF
- name: Configure CMake (Linux)
if: ${{ contains(matrix.config.os, 'linux') }}
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DCMAKE_C_COMPILER=${{matrix.config.cc}} -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} -DDXFCXX_BUILD_DOC=OFF
- name: Configure CMake (Win)
if: ${{ contains(matrix.config.os, 'win') }}
run: |
cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DCMAKE_C_COMPILER=${{matrix.config.cc}} -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} -DDXFCXX_BUILD_DOC=OFF
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.buildType}} -j ${{matrix.config.cores}}
# - name: Build (Win)
# if: ${{ contains(matrix.config.os, 'win') }}
# run: cmake --build ${{github.workspace}}/build --config ${{matrix.buildType}} -j ${{matrix.config.cores}} -- /p:CL_MPCount=${{matrix.config.cores}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.buildType}} --extra-verbose