Skip to content

Commit 13cfcee

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] C/C++ rewrite.
1 parent 30fd5fb commit 13cfcee

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/cpp.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,47 @@ on: # yamllint disable-line rule:truthy
1313
jobs:
1414
build:
1515
name: C/C++ CMake CI Test
16-
runs-on: ubuntu-24.04
1716
strategy:
1817
matrix:
1918
os: ["windows-2022", "ubuntu-24.04", "macos-14"]
19+
runs-on: ${{ matrix.os }}
2020

2121
steps:
2222
- name: Checkout repository
2323
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2424

25+
- name: Install
26+
shell: bash
27+
run: |
28+
if [ "$RUNNER_OS" == "macOS" ]; then
29+
brew install vcpkg
30+
git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
31+
export VCPKG_ROOT="$HOME/vcpkg"
32+
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
33+
elif [ "$RUNNER_OS" == "Linux" ]; then
34+
echo "VCPKG_ROOT=/usr/local/share/vcpkg" >> $GITHUB_ENV
35+
elif [ "$RUNNER_OS" == "Windows" ]; then
36+
echo "VCPKG_ROOT=C:/vcpkg" >> $GITHUB_ENV
37+
fi
38+
2539
- name: Check Tools
2640
run: |
41+
echo "-----------"
2742
make --version
43+
echo "-----------"
2844
cmake --version
45+
echo "-----------"
2946
vcpkg --version
47+
echo "-----------"
3048
3149
- name: Install dependencies
3250
run: |
3351
make dependencies
3452
35-
# yamllint disable rule:line-length
3653
- name: Build
3754
run: |
38-
export VCPKG_ROOT=/usr/local/share/vcpkg
3955
make build
40-
# yamllint enable rule:line-length
4156
4257
- name: Test
43-
run: make test
58+
run: |
59+
make test

0 commit comments

Comments
 (0)