10000 [CONFIG] [github actions] vcpkg installation issue fixed. · sir-gon/algorithm-exercises-cpp@b19f9bc · GitHub
[go: up one dir, main page]

Skip to content

Commit b19f9bc

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [github actions] vcpkg installation issue fixed.
1 parent 143c39a commit b19f9bc

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/cpp-macos.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ jobs:
2424
- name: Install
2525
shell: bash
2626
run: |
27-
if [ "$RUNNER_OS" == "macOS" ]; then
28-
brew install vcpkg
29-
git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
30-
export VCPKG_ROOT="$HOME/vcpkg"
31-
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
32-
elif [ "$RUNNER_OS" == "Linux" ]; then
33-
echo "VCPKG_ROOT=/usr/local/share/vcpkg" >> $GITHUB_ENV
34-
elif [ "$RUNNER_OS" == "Windows" ]; then
35-
echo "VCPKG_ROOT=C:/vcpkg" >> $GITHUB_ENV
36-
fi
27+
export VCPKG_VERSION=2024.12.16
28+
brew install vcpkg
29+
git clone \
30+
--depth 1 \
31+
--branch $VCPKG_VERSION \
32+
https://github.com/microsoft/vcpkg.git \
33+
--single-branch \
34+
"$HOME/vcpkg"
35+
export VCPKG_ROOT="$HOME/vcpkg"
36+
sh $VCPKG_ROOT/bootstrap-vcpkg.sh
37+
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
3738
3839
- name: Check Tools
3940
run: |

0 commit comments

Comments
 (0)
0