Skip to content

feat: added ci.yml for C++ CI #1

feat: added ci.yml for C++ CI

feat: added ci.yml for C++ CI #1

Workflow file for this run

name: C++ CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install dependencies (vcpkg)
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: '**/vcpkg.json'
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
runVcpkgInstall: true
- name: Configure CMake
run: cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build (Windows)
if: runner.os == 'Windows'
run: cmake --build build
shell: pwsh
- name: Build (Linux)
if: runner.os == 'Linux'
run: cmake --build build -- -j$(nproc)
- name: Build (macOS)
if: runner.os == 'macOS'
run: cmake --build build -- -j$(sysctl -n hw.logicalcpu)