Skip to content

Commit 484cf9a

Browse files
committed
Cleanup msvc CI
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 2a19349 commit 484cf9a

File tree

1 file changed

+15
-55
lines changed

1 file changed

+15
-55
lines changed

.github/workflows/cmake.yml

Lines changed: 15 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ on:
88
branches:
99
- '*'
1010

11-
env:
12-
BUILD_TYPE: Release
13-
1411
jobs:
1512
ubuntu-22-04:
1613
strategy:
@@ -87,78 +84,41 @@ jobs:
8784
suffix: _15
8885
target: ${{ matrix.target }}
8986

90-
cmake_win32:
87+
msvc-win32:
9188
runs-on: windows-2022
9289
steps:
93-
- name: Set environment
94-
run: |
95-
echo "release_arch=Win32" >> "${Env:GITHUB_ENV}"
96-
echo "vcpkg_triplet=x86-windows-static" >> "${Env:GITHUB_ENV}"
97-
echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
98-
- name: Restore from cache and install vcpkg
99-
uses: lukka/run-vcpkg@v6
100-
with:
101-
setupOnly: true
102-
vcpkgTriplet: ${{env.vcpkg_triplet}}
103-
vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
104-
#- name: Install packages
105-
# run: |
106-
# & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
10790
- uses: actions/checkout@v4
10891
with:
10992
submodules: recursive
110-
- name: Create Build Environment
111-
working-directory: ${{runner.workspace}}
112-
run: cmake -E make_directory build
113-
- name: Configure CMake
114-
working-directory: ${{runner.workspace}}/build
93+
- name: Configure
11594
run: |
116-
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 17 2022" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
117-
- name: Build all
118-
working-directory: ${{runner.workspace}}/build
119-
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
95+
cmake -S . -B build -G"Visual Studio 17 2022" -A"Win32" -DCMAKE_BUILD_TYPE="Release"
96+
- name: Build
97+
run: cmake --build build --config "Release" -j 2
12098
- name: Show built files
121-
working-directory: ${{runner.workspace}}/build/bin
99+
working-directory: build/bin
122100
run: tree
123101
- uses: actions/upload-artifact@v4
124102
with:
125-
name: Win32 artifacts
126-
path: ${{runner.workspace}}/build/bin/
103+
name: msvc-win32
104+
path: build/bin/
127105

128-
cmake_win64:
106+
msvc-win64:
129107
runs-on: windows-2022
130108
steps:
131-
- name: Set environment
132-
run: |
133-
echo "release_arch=x64" >> "${Env:GITHUB_ENV}"
134-
echo "vcpkg_triplet=x64-windows-static" >> "${Env:GITHUB_ENV}"
135-
echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
136-
- name: Restore from cache and install vcpkg
137-
uses: lukka/run-vcpkg@v6
138-
with:
139-
setupOnly: true
140-
vcpkgTriplet: ${{env.vcpkg_triplet}}
141-
vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
142-
#- name: Install packages
143-
# run: |
144-
# & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
145109
- uses: actions/checkout@v4
146110
with:
147111
submodules: recursive
148-
- name: Create Build Environment
149-
working-directory: ${{runner.workspace}}
150-
run: cmake -E make_directory build
151112
- name: Configure CMake
152-
working-directory: ${{runner.workspace}}/build
153113
run: |
154-
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 17 2022" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
114+
cmake -S . -B build -G"Visual Studio 17 2022" -A"x64" -DCMAKE_BUILD_TYPE="Release"
155115
- name: Build all
156-
working-directory: ${{runner.workspace}}/build
157-
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
116+
working-directory: build
117+
run: cmake --build . --config "Release" -j 2
158118
- name: Show built files
159-
working-directory: ${{runner.workspace}}/build/bin
119+
working-directory: build/bin
160120
run: tree
161121
- uses: actions/upload-artifact@v4
162122
with:
163-
name: Win64 artifacts
164-
path: ${{runner.workspace}}/build/bin/
123+
name: msvc-win64
124+
path: build/bin/

0 commit comments

Comments
 (0)