feat: ci #190
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
architecture: [x64, arm64] | |
exclude: | |
- os: ubuntu-latest | |
architecture: arm64 | |
- os: windows-latest | |
architecture: arm64 | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 # Updated to latest version | |
# Setup vcpkg | |
- name: Set up vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
.\vcpkg\bootstrap-vcpkg.bat | |
else | |
./vcpkg/bootstrap-vcpkg.sh | |
fi | |
shell: bash # Ensures consistent shell across different OS | |
env: | |
VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
# Configure and build the project using CMake presets | |
- name: Configure and build with CMake Presets | |
run: | | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
cmake --preset windows-release | |
cmake --build --preset windows-release | |
else | |
cmake --preset unix-release | |
cmake --build --preset unix-release | |
fi | |
shell: bash |