Skip to content

Switch from std::result_of to std::invoke_result #17

Switch from std::result_of to std::invoke_result

Switch from std::result_of to std::invoke_result #17

Workflow file for this run

name: nix
on:
pull_request:
push:
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-22.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: 15
cc: /usr/bin/clang-15
cxx: /usr/bin/clang++-15
- platform: macos
compiler: gcc
profile:
compiler: gcc
version: 13
cc: /opt/homebrew/bin/gcc-13
cxx: /opt/homebrew/bin/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 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: install GCC on macOS
if: matrix.compiler == 'gcc' && startsWith(matrix.platform, 'macos')
run: brew install gcc@13
- name: checkout
uses: actions/checkout@v4
- name: install Conan
run: pip install wheel 'conan~=${{ matrix.conan }}.0' cupcake
- name: check environment
run: |
env | sort
echo ${PATH} | tr ':' '\n'
python --version
conan --version
cmake --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 on Linux
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