Skip to content

Commit 188cbde

Browse files
committed
try new windows build
1 parent 6decee1 commit 188cbde

File tree

1 file changed

+55
-55
lines changed

1 file changed

+55
-55
lines changed

.github/workflows/build-and-release-windows.yml

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -31,67 +31,67 @@ jobs:
3131
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
3232

3333
steps:
34-
# Set env vars needed for vcpkg to leverage the GitHub Action cache as a storage
35-
# for Binary Caching.
36-
- uses: actions/github-script@v7
37-
with:
38-
script: |
39-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
40-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
34+
# Set env vars needed for vcpkg to leverage the GitHub Action cache as a storage
35+
# for Binary Caching.
36+
- uses: actions/github-script@v7
37+
with:
38+
script: |
39+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
40+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
4141
42-
- uses: actions/checkout@v4
43-
with:
44-
submodules: true
45-
- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
46-
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
47-
shell: bash
42+
- uses: actions/checkout@v4
43+
with:
44+
submodules: true
45+
- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
46+
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
47+
shell: bash
4848

49-
# Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service.
50-
- uses: lukka/get-cmake@latest
49+
# Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service.
50+
- uses: lukka/get-cmake@latest
5151

52-
# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
53-
# when it is being run afterwards by CMake.
54-
- name: Restore vcpkg
55-
uses: actions/cache@v4
56-
with:
57-
# The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
58-
# built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
59-
# The other paths starting with '!' are exclusions: they contain termporary files generated during the build of the installed packages.
60-
path: |
61-
${{ env._VCPKG_ }}
62-
!${{ env._VCPKG_ }}/buildtrees
63-
!${{ env._VCPKG_ }}/packages
64-
!${{ env._VCPKG_ }}/downloads
65-
!${{ env._VCPKG_ }}/installed
66-
# The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
67-
key: |
68-
${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}
52+
# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
53+
# when it is being run afterwards by CMake.
54+
- name: Restore vcpkg
55+
uses: actions/cache@v4
56+
with:
57+
# The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
58+
# built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
59+
# The other paths starting with '!' are exclusions: they contain termporary files generated during the build of the installed packages.
60+
path: |
61+
${{ env._VCPKG_ }}
62+
!${{ env._VCPKG_ }}/buildtrees
63+
!${{ env._VCPKG_ }}/packages
64+
!${{ env._VCPKG_ }}/downloads
65+
!${{ env._VCPKG_ }}/installed
66+
# The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
67+
key: |
68+
${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}
6969
70-
# On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly.
71-
# As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK.
72-
- uses: ilammy/msvc-dev-cmd@v1
70+
# On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly.
71+
# As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK.
72+
- uses: ilammy/msvc-dev-cmd@v1
7373

74-
# Configure CMake (Windows)
75-
- name: Configure CMake (Windows)
76-
shell: cmd
77-
run: |
78-
cmake --preset ninja-multi-vcpkg -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
74+
# Configure CMake (Windows)
75+
- name: Configure CMake (Windows)
76+
shell: cmd
77+
run: |
78+
cmake --preset ninja-multi-vcpkg -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
7979
80-
# 4. Build the project
81-
- name: Build PlatypusGui
82-
run: cmake --preset ninja-vcpkg-release --build build --config Release --target PlatypusGui
80+
# 4. Build the project
81+
- name: Build PlatypusGui
82+
run: cmake --preset ninja-vcpkg-release --build build --config Release --target PlatypusGui
8383

84-
- name: Deploy Qt Dependencies (Windows)
85-
shell: cmd
86-
run: |
87-
set QT_DIR=C:\Qt\5.15.2\msvc2019_64
88-
set PATH=%QT_DIR%\bin;%PATH%
89-
windeployqt.exe --compiler-runtime --dir build\deployment build\PlatypusGui.exe
84+
- name: Deploy Qt Dependencies (Windows)
85+
shell: cmd
86+
run: |
87+
set QT_DIR=C:\Qt\5.15.2\msvc2019_64
88+
set PATH=%QT_DIR%\bin;%PATH%
89+
windeployqt.exe --compiler-runtime --dir build\deployment build\PlatypusGui.exe
9090
91-
# 6. Upload artifacts for release
92-
- name: Upload Release Artifacts
93-
uses: actions/upload-artifact@v3
94-
with:
95-
name: windows-latest-platypus
96-
path: build\deployment\PlatypusGui.exe
91+
# 6. Upload artifacts for release
92+
- name: Upload Release Artifacts
93+
uses: actions/upload-artifact@v3
94+
with:
95+
name: windows-latest-platypus
96+
path: build\deployment\PlatypusGui.exe
9797

0 commit comments

Comments
 (0)