Skip to content

[ci] added new ci based on presets and vcpkg with caching #1

[ci] added new ci based on presets and vcpkg with caching

[ci] added new ci based on presets and vcpkg with caching #1

name: CI vcpkg no CUDA
on:
push:
paths-ignore:
- '**.md'
- '**.rst'
- 'docs/**'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
- 'docs/**'
workflow_dispatch:
schedule:
- cron: "5 8 * * 1"
permissions:
contents: read
checks: write
pull-requests: write
env:
VCPKG_BINARY_SOURCES: 'clear;files,${{ github.workspace }}/vcpkg_cache,readwrite'
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Cache vcpkg
uses: actions/cache@v5
with:
path: |
${{ github.workspace }}/vcpkg
${{ github.workspace }}/vcpkg_installed
${{ github.workspace }}/vcpkg_cache
key: vcpkg-${{ runner.os }}-${{ hashFiles('**/vcpkg.json', '.github/workflows/build_with_vcpkg_no_cuda.yml') }}
restore-keys: |
vcpkg-${{ runner.os }}-
- name: Set up vcpkg
uses: lukka/run-vcpkg@v11
# vcpkgGitCommitId is intentionally omitted: run-vcpkg reads the commit
# hash from the builtin-baseline field in vcpkg.json automatically.
- name: Build (Release)
uses: lukka/run-cmake@v10
with:
configurePreset: 'vcpkg-release'
configurePresetAdditionalArgs: "['-DCCTAG_WITH_CUDA:BOOL=OFF']"
buildPreset: 'vcpkg-release'
testPreset: 'vcpkg-release'
- name: Build (Debug)
uses: lukka/run-cmake@v10
with:
configurePreset: 'vcpkg-debug'
configurePresetAdditionalArgs: "['-DCCTAG_WITH_CUDA:BOOL=OFF']"
buildPreset: 'vcpkg-debug'
testPreset: 'vcpkg-debug'