Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

used cmake way for vcpkg #35

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
triplet: x64-windows
- os: ubuntu-latest
triplet: x64-linux
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_BINARY_SOURCES: 'default'

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -51,32 +48,21 @@ jobs:
sudo apt update
sudo apt install autoconf libudev-dev

- name: get vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: vcpkg.json
vcpkgGitCommitId: 'a7b6122f6b6504d16d96117336a0562693579933'

# On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly.
# As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK.
- uses: ilammy/msvc-dev-cmd@v1


- name: CMake configure
if: ${{ !contains(matrix.os, 'windows' ) }}
run: cmake -S . -B ./build -DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Release"
run: cmake -S . -B ./build -DCMAKE_BUILD_TYPE="Release"

- name: build
if: ${{ !contains(matrix.os, 'windows' ) }}
run: cmake --build ./build

- name: vcpkg init baseline
if: ${{ contains(matrix.os, 'windows' ) }}
run: vcpkg x-update-baseline --add-initial-baseline

- name: CMake configure
if: ${{ contains(matrix.os, 'windows' ) }}
run: cmake -S . -B ./build -DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
run: cmake -S . -B ./build -DVCPKG_TARGET_TRIPLET="x64-windows-static"

- name: build
if: ${{ contains(matrix.os, 'windows' ) }}
Expand Down