Skip to content

Using powershell in the build.yml. #6

Using powershell in the build.yml.

Using powershell in the build.yml. #6

Workflow file for this run

name: Build and Run Automated Tests
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install CMake
run: |
$url = 'https://github.com/Kitware/CMake/releases/download/v3.26.0/cmake-3.26.0-windows-x86_64.msi'
$output = 'cmake.msi'
Invoke-WebRequest -Uri $url -OutFile $output
Start-Process msiexec.exe -Wait -ArgumentList '/i', $output, '/quiet', '/norestart'
echo "C:\Program Files\CMake\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install vcpkg and SQLite3
run: |
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install sqlite3:x64-windows
echo "VCPKG_ROOT=$env:GITHUB_WORKSPACE\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "$env:GITHUB_WORKSPACE\vcpkg\installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set up Visual Studio Environment
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
shell: pwsh
run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$env:GITHUB_WORKSPACE\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: Build
run: cmake --build build
- name: Test
run: ./bin/testing