Skip to content

Commit 4d27fc0

Browse files
author
Levent KARAGÖL
committed
Github Action .yml files have been updated
1 parent 7334e3d commit 4d27fc0

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/macos.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,27 @@ jobs:
1717
run: |
1818
brew update
1919
brew install cmake pkg-config git wget curl
20-
- name: Prepare vcpkg
20+
- name: Manage vcpkg installation
2121
run: |
22-
if brew list vcpkg; then
23-
brew unlink vcpkg
24-
brew uninstall --ignore-dependencies vcpkg
22+
if brew list vcpkg &>/dev/null; then
23+
brew unlink vcpkg && brew uninstall --ignore-dependencies vcpkg
2524
fi
2625
if [ -f /usr/local/bin/vcpkg ]; then
27-
rm /usr/local/bin/vcpkg
26+
sudo rm /usr/local/bin/vcpkg
2827
fi
2928
brew install vcpkg
30-
brew link --overwrite vcpkg
29+
- name: Setup vcpkg environment
30+
run: |
31+
export VCPKG_ROOT=$(brew --prefix vcpkg)
32+
echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV
3133
vcpkg integrate install
3234
- name: Clone project repository
3335
run: |
3436
git clone https://github.com/lk-libs/libcpp-http-client.git ~/libcpp-http-client
3537
- name: Run cmake with vcpkg toolchain
3638
run: |
3739
cd ~/libcpp-http-client
38-
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$(brew --prefix vcpkg)/scripts/buildsystems/vcpkg.cmake
40+
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
3941
- name: Build the project
4042
run: |
4143
cd ~/libcpp-http-client

0 commit comments

Comments
 (0)