@@ -2,10 +2,7 @@ name: Release Build
22
33on :
44 push :
5- branches : [ "master", "main" ]
65 tags : [ "v*" ]
7- pull_request :
8- branches : [ "master", "main" ]
96 workflow_dispatch :
107
118env :
3431 uses : actions/cache@v4
3532 with :
3633 path : vcpkg_installed
37- key : ${{ runner.os }}-vcpkg-static-${{ hashFiles('vcpkg.json') }}
34+ key : ${{ runner.os }}-vcpkg-static-release- ${{ hashFiles('vcpkg.json') }}
3835 restore-keys : |
39- ${{ runner.os }}-vcpkg-
36+ ${{ runner.os }}-vcpkg-static-release-
4037
4138 - name : Setup vcpkg
4239 uses : lukka/run-vcpkg@v11
4744 runVcpkgInstall : true
4845 env :
4946 VCPKG_INSTALLED_DIR : ${{ github.workspace }}/vcpkg_installed
50- VCPKG_DEFAULT_TRIPLET : x64-windows-static
47+ VCPKG_DEFAULT_TRIPLET : x64-windows-static-release
48+ VCPKG_OVERLAY_TRIPLETS : ${{ github.workspace }}/triplets
5149
5250 - name : Cargo Chef Prepare
5351 run : cargo chef prepare --recipe-path recipe.json
6563 env :
6664 VCPKG_ROOT : ${{ github.workspace }}\vcpkg
6765 VCPKG_INSTALLED_DIR : ${{ github.workspace }}\vcpkg_installed
68- VCPKGRS_TRIPLET : x64-windows-static
69- PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static\lib\pkgconfig
66+ VCPKGRS_TRIPLET : x64-windows-static-release
67+ PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static-release \lib\pkgconfig
7068
7169 - name : Restore Source Code
7270 run : git restore server enginefs libtorrent-sys
7876 env :
7977 VCPKG_ROOT : ${{ github.workspace }}\vcpkg
8078 VCPKG_INSTALLED_DIR : ${{ github.workspace }}\vcpkg_installed
81- VCPKGRS_TRIPLET : x64-windows-static
82- PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static\lib\pkgconfig
79+ VCPKGRS_TRIPLET : x64-windows-static-release
80+ PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static-release \lib\pkgconfig
8381
8482 - name : Upload EXE
8583 uses : actions/upload-artifact@v4
@@ -92,16 +90,16 @@ jobs:
9290 env :
9391 VCPKG_ROOT : ${{ github.workspace }}\vcpkg
9492 VCPKG_INSTALLED_DIR : ${{ github.workspace }}\vcpkg_installed
95- VCPKGRS_TRIPLET : x64-windows-static
96- PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static\lib\pkgconfig
93+ VCPKGRS_TRIPLET : x64-windows-static-release
94+ PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static-release \lib\pkgconfig
9795
9896 - name : Build MSI Installer
9997 run : cargo wix --package server --no-build --nocapture --target x86_64-pc-windows-msvc
10098 env :
10199 VCPKG_ROOT : ${{ github.workspace }}\vcpkg
102100 VCPKG_INSTALLED_DIR : ${{ github.workspace }}\vcpkg_installed
103- VCPKGRS_TRIPLET : x64-windows-static
104- PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static\lib\pkgconfig
101+ VCPKGRS_TRIPLET : x64-windows-static-release
102+ PKG_CONFIG_PATH : ${{ github.workspace }}\vcpkg_installed\x64-windows-static-release \lib\pkgconfig
105103
106104
107105 - name : Upload MSI
@@ -140,9 +138,9 @@ jobs:
140138 uses : actions/cache@v4
141139 with :
142140 path : vcpkg_installed
143- key : ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }}
141+ key : ${{ runner.os }}-vcpkg-release- ${{ hashFiles('vcpkg.json') }}
144142 restore-keys : |
145- ${{ runner.os }}-vcpkg-
143+ ${{ runner.os }}-vcpkg-release-
146144
147145 - name : Setup vcpkg
148146 uses : lukka/run-vcpkg@v11
@@ -153,6 +151,8 @@ jobs:
153151 runVcpkgInstall : true
154152 env :
155153 VCPKG_INSTALLED_DIR : ${{ github.workspace }}/vcpkg_installed
154+ VCPKG_DEFAULT_TRIPLET : x64-linux-release
155+ VCPKG_OVERLAY_TRIPLETS : ${{ github.workspace }}/triplets
156156
157157 - name : Cargo Chef Prepare
158158 run : cargo chef prepare --recipe-path recipe.json
@@ -165,12 +165,12 @@ jobs:
165165
166166 - name : Cargo Chef Cook
167167 run : |
168- export VCPKG_ROOT=${{ github.workspace }}/vcpkg
169- cargo chef cook --release --recipe-path recipe.json --features libtorrent --no-default-features
168+ export VCPKG_ROOT=${{ github.workspace }}/vcpkg
169+ cargo chef cook --release --recipe-path recipe.json --features libtorrent --no-default-features
170170 env :
171- VCPKG_ROOT : ${{ github.workspace }}/vcpkg
172- VCPKG_INSTALLED_DIR : ${{ github.workspace }}/vcpkg_installed
173- PKG_CONFIG_PATH : ${{ github.workspace }}/vcpkg_installed/x64-linux/lib/pkgconfig
171+ VCPKG_ROOT : ${{ github.workspace }}/vcpkg
172+ VCPKG_INSTALLED_DIR : ${{ github.workspace }}/vcpkg_installed
173+ PKG_CONFIG_PATH : ${{ github.workspace }}/vcpkg_installed/x64-linux-release /lib/pkgconfig
174174
175175 - name : Restore Source Code
176176 run : git restore server enginefs libtorrent-sys
@@ -180,7 +180,7 @@ jobs:
180180 env :
181181 VCPKG_ROOT : ${{ github.workspace }}/vcpkg
182182 VCPKG_INSTALLED_DIR : ${{ github.workspace }}/vcpkg_installed
183- PKG_CONFIG_PATH : ${{ github.workspace }}/vcpkg_installed/x64-linux/lib/pkgconfig
183+ PKG_CONFIG_PATH : ${{ github.workspace }}/vcpkg_installed/x64-linux-release /lib/pkgconfig
184184
185185 - name : Build DEB Package
186186 run : cargo deb --package server --no-build
0 commit comments