Skip to content

Commit c755d24

Browse files
committed
Setup CI
1 parent 4790726 commit c755d24

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches: [ "ci" ]
6+
pull_request:
7+
branches: [ "ci" ]
8+
9+
permissions:
10+
contents: write
11+
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
VCPKG_FEATURE_FLAGS: dependencygraph
15+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
16+
BUILD_TYPE: Release
17+
18+
jobs:
19+
build:
20+
runs-on: windows-2022
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Update vcpkg
26+
run: git -C C:/vcpkg pull origin $(jq -r '.builtin-baseline' vcpkg.json)
27+
28+
- name: Export GitHub Actions cache environment variables
29+
uses: actions/github-script@v7
30+
with:
31+
script: |
32+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
33+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
34+
35+
- name: Configure CMake
36+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake
37+
38+
- name: Build
39+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

0 commit comments

Comments
 (0)