fix: add options for optional deps and find them after installation #227
Workflow file for this run
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: Matplotplusplus | |
on: | |
push: | |
paths: | |
- '**.c' | |
- '**.cpp' | |
- '**.h' | |
- '**.hpp' | |
- '**.cmake' | |
- '**/CMakeLists.txt' | |
- '.github/workflows/build.yml' | |
pull_request: | |
paths: | |
- '**.c' | |
- '**.cpp' | |
- '**.h' | |
- '**.hpp' | |
- '**.cmake' | |
- '**/CMakeLists.txt' | |
- '.github/workflows/build.yml' | |
jobs: | |
Build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# see: https://github.com/actions/virtual-environments | |
- { | |
name: "Windows-MSVC/2019/Static/X86/Release", | |
os: windows-2019, | |
config: Release, | |
cmake_extra_args: -G "Visual Studio 16 2019" -A Win32, | |
sudocmd: "", | |
artifact_name: "Windows x86", | |
cores: 2, | |
} | |
- { | |
name: "Windows-MSVC/2019/Static/X64/Release", | |
os: windows-2019, | |
config: Release, | |
cmake_extra_args: -G "Visual Studio 16 2019" -A x64 -DCMAKE_CXX_FLAGS="/O2", | |
sudocmd: "", | |
artifact_name: "Windows x64", | |
cores: 2, | |
} | |
# GitHub Images have changed. This workflow needs to be updated. | |
# - { | |
# name: "Windows-MinGW/2019/Static/X64/Release", | |
# os: windows-2019, | |
# config: Release, | |
# cmake_extra_args: "-G \"MinGW Makefiles\" -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/g++.exe", | |
# sudocmd: "", | |
# artifact_name: "Windows x64", | |
# cores: 2, | |
# } | |
- { | |
name: "Ubuntu/22.04/Static/X64/Release", | |
os: ubuntu-22.04, | |
config: Release, | |
cmake_extra_args: "-DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 -DCMAKE_CXX_FLAGS=\"-O2\"", | |
sudocmd: "sudo", | |
artifact_name: "Linux", | |
cores: 2, | |
} | |
- { | |
name: "MacOSX/10.15/Static/X64/Release", | |
os: macos-12, | |
config: Release, | |
cmake_extra_args: "-DCMAKE_CXX_FLAGS=\"-O2\"", | |
sudocmd: "sudo", | |
artifact_name: "MacOSX", | |
cores: 4, | |
} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create Work Dir | |
run: mkdir build | |
- name: Configure | |
working-directory: ./build | |
run: | | |
cmake .. ${{ matrix.config.cmake_extra_args }} -DCMAKE_BUILD_TYPE=${{ matrix.config.config }} -DMATPLOTPP_BUILD_WITH_PEDANTIC_WARNINGS=ON | |
- name: Build | |
working-directory: ./build | |
run: cmake --build . --parallel ${{ matrix.config.cores }} --config ${{ matrix.config.config }} | |
- name: Test | |
working-directory: ./build | |
run: ctest --parallel ${{ matrix.config.cores }} -C ${{ matrix.config.config }} | |
- name: Install | |
working-directory: ./build | |
run: ${{ matrix.config.sudocmd }} cmake --install . | |
- name: Integration Test | |
working-directory: ./test/integration | |
run: | | |
mkdir build | |
cd build | |
cmake .. ${{ matrix.config.cmake_extra_args }} -DCMAKE_BUILD_TYPE=${{ matrix.config.config }} | |
cmake --build . --parallel ${{ matrix.config.cores }} --config ${{ matrix.config.config }} | |
continue-on-error: true | |
- name: Create packages | |
working-directory: ./build | |
run: ${{ matrix.config.sudocmd }} cpack | |
- name: Archive Packages | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Binary Packages ${{ matrix.config.artifact_name }} | |
path: build/Matplot++-?.?.?-*.* | |
- name: Archive Installer Packages as is | |
uses: kittaakos/upload-artifact-as-is@v0 | |
with: | |
path: build/Matplot++-?.?.?-*.* |