Skip to content

Update CMakeLists.txt #7

Update CMakeLists.txt

Update CMakeLists.txt #7

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Print GitHub Workspace Directory
run: |
echo "GitHub workspace directory:"
dir
- name: Print Environment Variables
run: |
echo "Printing environment variables:"
Get-ChildItem Env:
shell: pwsh
- name: Set up vcpkg
run: |
echo "Cloning vcpkg repository..."
git clone https://github.com/microsoft/vcpkg.git
echo "Bootstrapping vcpkg..."
.\vcpkg\bootstrap-vcpkg.bat
echo "Installing packages..."
.\vcpkg\vcpkg install boost sqlite3
echo "Vcpkg setup completed."
- name: Verify vcpkg Installation
run: |
echo "Listing vcpkg directory:"
dir .\vcpkg
- name: Install Visual Studio Build Tools
run: |
echo "Installing Visual Studio Build Tools..."
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.NativeDesktop --quiet --norestart"
shell: pwsh
- name: Configure CMake
run: |
echo "Creating build directory..."
if (Test-Path build) {
Remove-Item -Recurse -Force build
}
mkdir build
cd build
echo "Configuring CMake..."
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ..
echo "CMake configuration completed."
shell: pwsh
- name: Verify Build Directory
run: |
echo "Listing build directory:"
dir build
shell: pwsh
- name: Build
run: |
cd build
echo "Building project..."
cmake --build . --config Debug
echo "Build completed."
shell: pwsh
- name: Run Tests
run: |
cd build
echo "Running tests..."
ctest -C Debug --output-on-failure
echo "Tests completed."
shell: pwsh