Skip to content

msvc: fix build for windows compiler cl.exe #52

msvc: fix build for windows compiler cl.exe

msvc: fix build for windows compiler cl.exe #52

Workflow file for this run

name: CMake
on: [push]
jobs:
build_on_ubuntu_gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Pybind11 ubuntu
run: sudo apt install python3-pybind11
- name: cmake
run: >
cmake -B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-S ${{github.workspace}}
- name: Build
run: cmake --build ${{ github.workspace }}/build --config Release
- name: Test
working-directory: ${{ github.workspace }}/build
shell: bash
run: ctest --build-config Release
build_on_ubuntu_clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Pybind11 ubuntu
run: sudo apt install python3-pybind11
- name: cmake
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: >
cmake -B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-S ${{github.workspace}}
- name: Build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build ${{ github.workspace }}/build --config Release
- name: Test
working-directory: ${{ github.workspace }}/build
shell: bash
run: ctest --build-config Release
build_on_macos_clang:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Pybind11 macos
run: brew install pybind11
- name: cmake
run: >
cmake -B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-S ${{github.workspace}}
- name: Build
run: cmake --build ${{ github.workspace }}/build --config Release
- name: Test
working-directory: ${{ github.workspace }}/build
shell: bash
run: ctest --build-config Release
build_on_windows_cl:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Pybind11 windows
run: >
git clone https://github.com/Microsoft/vcpkg.git &&
cd vcpkg &&
.\bootstrap-vcpkg.bat &&
.\vcpkg integrate install &&
vcpkg install pybind11
- name: cmake
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: >
cmake -B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=cl
-DCMAKE_CXX_COMPILER=cl
-S ${{github.workspace}}
- name: Build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build ${{ github.workspace }}/build --config Release
- name: Test
working-directory: ${{ github.workspace }}/build
shell: bash
run: ctest --build-config Release