Use VCPKG in the Github Action
This commit is contained in:
parent
aa89c2267a
commit
f56aea4af1
1 changed files with 12 additions and 15 deletions
25
.github/workflows/cmake.yml
vendored
25
.github/workflows/cmake.yml
vendored
|
@ -26,11 +26,8 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get Conan
|
||||
run: |
|
||||
pip3 install wheel setuptools
|
||||
pip3 install conan --upgrade
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Fix Path on Ubuntu
|
||||
if: matrix.configurations.os == 'ubuntu-20.04' || matrix.configurations.os == 'ubuntu-18.04'
|
||||
|
@ -40,20 +37,20 @@ jobs:
|
|||
if: matrix.configurations.os == 'ubuntu-20.04' || matrix.configurations.os == 'ubuntu-18.04'
|
||||
run: sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
||||
|
||||
- name: Create Build Environment
|
||||
# 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 -E make_directory ${{runner.workspace}}/build
|
||||
- name: Bootstrap VCPKG
|
||||
if: matrix.configurations.os == 'ubuntu-20.04' || matrix.configurations.os == 'ubuntu-18.04'
|
||||
run: $GITHUB_WORKSPACE/vcpkg/bootstrap-vcpkg.sh
|
||||
|
||||
- name: Bootstrap VCPKG
|
||||
if: matrix.configurations.os == 'windows-2019'
|
||||
run: $GITHUB_WORKSPACE\\bootstrap-vcpkg.bat
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: $GITHUB_WORKSPACE
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }}
|
||||
run: cmake -B ${{runner.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }}
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
|
|
Loading…
Reference in a new issue