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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
- name: Get Conan
|
submodules: recursive
|
||||||
run: |
|
|
||||||
pip3 install wheel setuptools
|
|
||||||
pip3 install conan --upgrade
|
|
||||||
|
|
||||||
- name: Fix Path on Ubuntu
|
- name: Fix Path on Ubuntu
|
||||||
if: matrix.configurations.os == 'ubuntu-20.04' || matrix.configurations.os == 'ubuntu-18.04'
|
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'
|
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)"
|
run: sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
||||||
|
|
||||||
- name: Create Build Environment
|
- name: Bootstrap VCPKG
|
||||||
# Some projects don't allow in-source building, so create a separate build directory
|
if: matrix.configurations.os == 'ubuntu-20.04' || matrix.configurations.os == 'ubuntu-18.04'
|
||||||
# We'll use this as our working directory for all subsequent commands
|
run: $GITHUB_WORKSPACE/vcpkg/bootstrap-vcpkg.sh
|
||||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
||||||
|
- name: Bootstrap VCPKG
|
||||||
|
if: matrix.configurations.os == 'windows-2019'
|
||||||
|
run: $GITHUB_WORKSPACE\\bootstrap-vcpkg.bat
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
|
working-directory: $GITHUB_WORKSPACE
|
||||||
# Use a bash shell so we can use the same syntax for environment variable
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
# access regardless of the host operating system
|
# access regardless of the host operating system
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
run: cmake -B ${{runner.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }}
|
||||||
# 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 }}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
Loading…
Reference in a new issue