Update README.md #165
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: Build | |
on: [ push, workflow_dispatch ] | |
jobs: | |
cmake-on-linux: | |
timeout-minutes: 15 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04 ] | |
build_type: [ Release ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install prerequisites | |
run: | | |
sudo apt install libtbb-dev | |
- name: Restore artifacts, or run vcpkg, build (and cache artifacts as post step) | |
uses: lukka/run-vcpkg@v10 | |
id: runvcpkg | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgGitCommitId: 'd567b667adba0e72c5c3931ddbe745b66aa34b73' | |
vcpkgJsonGlob: 'vcpkg.json' | |
appendedCacheKey: vcpkginstall | |
- name: Configure and build | |
run: | | |
cmake . -B build -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DECOS_BUILD_EXAMPLES=ON -DECOS_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
cmake --build build | |
- name: Test | |
run: | | |
cd build/tests | |
ctest --output-on-failure | |
- uses: actions/upload-artifact@v3 | |
if: matrix.build_type == 'Release' | |
with: | |
name: ecos | |
path: build/bin/ecos* | |
cmake-on-windows: | |
timeout-minutes: 15 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-2022 ] | |
build_type: [ Release ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Restore artifacts, or run vcpkg, build (and cache artifacts as post step) | |
uses: lukka/run-vcpkg@v10 | |
id: runvcpkg | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgGitCommitId: 'd567b667adba0e72c5c3931ddbe745b66aa34b73' | |
vcpkgJsonGlob: 'vcpkg.json' | |
appendedCacheKey: vcpkginstall | |
- name: Configure and build | |
run: | | |
cmake . -A x64 -B build -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md -DECOS_BUILD_EXAMPLES=ON -DECOS_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
cmake --build build --config ${{ matrix.build_type }} | |
- name: Test | |
run: | | |
cd build/tests | |
ctest -C ${{ matrix.build_type }} --output-on-failure | |
- uses: actions/upload-artifact@v3 | |
if: matrix.build_type == 'Release' | |
with: | |
name: ecos | |
path: build/bin/ecos* |