Skip to content

Commit 81be700

Browse files
ni4ronaldtse
authored andcommitted
Use builtin vcpkg within the GHA Windows runner.
1 parent a33ca05 commit 81be700

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

.github/workflows/windows-msvc.yml

+7-14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
build_and_test:
1919
name: debug-${{ matrix.arch }}
2020
runs-on: ${{ matrix.os }}
21+
if: "!contains(github.event.head_commit.message, 'skip ci')"
2122
strategy:
2223
fail-fast: false
2324
matrix:
@@ -26,46 +27,38 @@ jobs:
2627
- arch: x64
2728
os: windows-latest
2829
triplet: x64-windows
29-
vcpkg_tag: 2020.11-1
3030
vcpkg_dir: 'C:\\vcpkg'
3131
- arch: Win32
3232
os: windows-latest
3333
triplet: x86-windows
34-
vcpkg_tag: 2020.11-1
3534
vcpkg_dir: 'C:\\vcpkg'
36-
3735
steps:
3836
- name: Checkout
3937
uses: actions/checkout@v2
4038
with:
4139
submodules: true
4240
lfs: true
43-
44-
- name: Configure vcpkg
45-
shell: bash
46-
run: |
47-
cd ${{ matrix.vcpkg_dir }}
48-
git fetch origin --tags
49-
git reset --hard ${{ matrix.vcpkg_tag }}
50-
./bootstrap-vcpkg.bat
5141
- name: Cache vcpkg
5242
uses: actions/cache@v2
5343
with:
5444
path: '${{ matrix.vcpkg_dir }}/installed'
55-
key: vcpkg-${{ matrix.triplet }}-${{ hashFiles('vcpkg.txt') }}-${{ matrix.vcpkg_tag }}
45+
key: vcpkg-${{ matrix.triplet }}-${{ hashFiles('vcpkg.txt') }}
5646
- name: Install vcpkg packages
5747
shell: bash
58-
run: vcpkg install --triplet ${{ matrix.triplet }} $(cat vcpkg.txt)
48+
run: |
49+
set -eux
50+
vcpkg install --debug --triplet ${{ matrix.triplet }} $(cat vcpkg.txt)
5951
- name: Configure
6052
env:
6153
VCPKG_DIR: '${{ matrix.vcpkg_dir }}'
6254
shell: bash
6355
run: |
56+
set -eux
6457
mkdir build
6558
cmake -B ./build -G "Visual Studio 16 2019" -A ${{ matrix.arch }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.vcpkg_dir }}\\scripts\\buildsystems\\vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug .
6659
- name: Compile
6760
shell: bash
68-
run: cmake --build ./build
61+
run: cmake --build ./build -j 2
6962
- name: Testing
7063
shell: bash
7164
run: ci/test.msvc.sh

vcpkg.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bzip2 zlib botan json-c getopt dirent python3[core,enable-shared]
1+
bzip2 zlib botan json-c getopt dirent python3

0 commit comments

Comments
 (0)