Skip to content

Commit 5f01a31

Browse files
chore: update workflows, move .bat files to scripts/ (#199)
- Switch workflows to use CPM instead of vcpkg, test build takes about 1 minute less this way
1 parent b6ed6be commit 5f01a31

20 files changed

+68
-46
lines changed

.github/workflows/main_ci.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@ name: Main CI [CMake]
22

33
on:
44
pull_request:
5-
branches: [main, feature/*, fix/*]
5+
branches: [main, feature/*, fix/*, maintenance]
66
paths:
77
- "CommonLibSF/**"
8+
- ".github/workflows/main_ci.yml"
89
workflow_dispatch:
910

10-
env:
11-
VCPKG_COMMIT_ID: 830f86fb309ad7167468a433a890b7415fbb90a5
12-
GITHUB_WORKSPACE: ${{ github.workspace }}
13-
1411
jobs:
1512
build:
1613
runs-on: windows-latest
@@ -27,17 +24,12 @@ jobs:
2724
- name: Get CMake
2825
uses: lukka/get-cmake@latest
2926

30-
- name: Setup vcpkg
31-
uses: lukka/[email protected]
27+
- name: Setup MSVC prompt
28+
uses: TheMrMilchmann/setup-msvc-dev@v3
3229
with:
33-
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
30+
arch: x64
31+
toolset: 14.37
3432

35-
- name: Run CMake
36-
uses: lukka/[email protected]
37-
with:
38-
cmakeListsTxtPath: "${{ github.workspace }}/CommonLibSF/CMakeLists.txt"
39-
configurePreset: build-release-${{ matrix.compiler }}-ninja-vcpkg
40-
configurePresetCmdString: "[`-B`, `$[env.GITHUB_WORKSPACE]/build`, `-S`, `$[env.GITHUB_WORKSPACE]/CommonLibSF`, `--preset`, `$[env.CONFIGURE_PRESET_NAME]`]"
41-
configurePresetAdditionalArgs: "['-DSFSE_BUILD_TESTS=true']"
42-
buildPreset: release-${{ matrix.compiler }}-ninja-vcpkg
43-
buildPresetCmdString: "[`--build`, `$[env.GITHUB_WORKSPACE]/build`, `--preset`, `$[env.BUILD_PRESET_NAME]`]"
33+
- name: Build
34+
run: |
35+
${{ github.workspace }}/scripts/build-release-${{ matrix.compiler }}-cpm-test.bat

.github/workflows/update_pdb.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ concurrency:
1010
group: pdb
1111
cancel-in-progress: true
1212

13-
env:
14-
VCPKG_COMMIT_ID: 830f86fb309ad7167468a433a890b7415fbb90a5
15-
GITHUB_WORKSPACE: ${{ github.workspace }}
16-
1713
jobs:
1814
build:
1915
runs-on: windows-latest
@@ -24,19 +20,15 @@ jobs:
2420
- name: Get CMake
2521
uses: lukka/get-cmake@latest
2622

27-
- name: Setup vcpkg
28-
uses: lukka/[email protected]
23+
- name: Setup MSVC prompt
24+
uses: TheMrMilchmann/setup-msvc-dev@v3
2925
with:
30-
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
26+
arch: x64
27+
toolset: 14.37
3128

32-
- name: Run CMake
33-
uses: lukka/[email protected]
34-
with:
35-
cmakeListsTxtPath: "${{ github.workspace }}/CommonLibSF/CMakeLists.txt"
36-
configurePreset: build-debug-msvc-ninja-vcpkg
37-
configurePresetCmdString: "[`-B`, `$[env.GITHUB_WORKSPACE]/build`, `-S`, `$[env.GITHUB_WORKSPACE]/CommonLibSF`, `--preset`, `$[env.CONFIGURE_PRESET_NAME]`]"
38-
buildPreset: debug-msvc-ninja-vcpkg
39-
buildPresetCmdString: "[`--build`, `$[env.GITHUB_WORKSPACE]/build`, `--preset`, `$[env.BUILD_PRESET_NAME]`]"
29+
- name: Build
30+
run: |
31+
${{ github.workspace }}/scripts/build-debug-${{ matrix.compiler }}-cpm.bat
4032
4133
- name: Find PDB
4234
run: |

build-clang-cl.bat

Lines changed: 0 additions & 4 deletions
This file was deleted.

build-msvc.bat

Lines changed: 0 additions & 4 deletions
This file was deleted.

make-sln-clang-cl.bat

Lines changed: 0 additions & 3 deletions
This file was deleted.

make-sln-msvc.bat

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/build-debug-clang-cl-cpm.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
echo off
2+
rd /s /q "%~dp0/../build"
3+
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-cpm
4+
cmake --build "%~dp0/../build" --config Debug
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
echo off
2+
rd /s /q "%~dp0/../build"
3+
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-vcpkg
4+
cmake --build "%~dp0/../build" --config Debug

scripts/build-debug-msvc-cpm.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
echo off
2+
rd /s /q "%~dp0/../build"
3+
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-cpm
4+
cmake --build "%~dp0/../build" --config Debug

scripts/build-debug-msvc-vcpkg.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
echo off
2+
rd /s /q "%~dp0/../build"
3+
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-vcpkg
4+
cmake --build "%~dp0/../build" --config Debug

0 commit comments

Comments
 (0)