Skip to content

Commit

Permalink
ci: try build fewer targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcticLampyrid committed Oct 18, 2024
1 parent 25d3dc5 commit 275f855
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ jobs:
- rid: win-x64
msvc_arch: x64
rust_target: x86_64-pc-windows-msvc
vcpkg_target_triplet: 'x64-windows-static-md'
vcpkg_host_triplet: 'x64-windows-static-md-release'
vcpkg_target_triplet: 'x64-windows-static-md-release'
os: windows-latest
- rid: macos-arm64
osx_arch: arm64
rust_target: aarch64-apple-darwin
vcpkg_target_triplet: 'arm64-osx'
vcpkg_host_triplet: 'arm64-osx-release'
vcpkg_target_triplet: 'arm64-osx-release'
os: macos-latest
- rid: macos-x64
osx_arch: x86_64
rust_target: x86_64-apple-darwin
vcpkg_target_triplet: 'x64-osx'
vcpkg_target_triplet: 'x64-osx-release'
os: macos-latest

steps:
Expand Down Expand Up @@ -119,14 +121,15 @@ jobs:
$ErrorActionPreference = "Stop"
$rid = '${{ matrix.rid }}'
$vcpkgTargetTriplet = '${{ matrix.vcpkg_target_triplet }}'
$vcpkgHostTriplet = '${{ matrix.vcpkg_host_triplet }}'
$qtArch = '${{ matrix.qt_arch }}'
$osxArch = '${{ matrix.osx_arch }}'
$additionalConfigureArgs = @()
if ($rid.StartsWith('win-')) {
$vsPath = &(Join-Path ${env:ProgramFiles(x86)} "\Microsoft Visual Studio\Installer\vswhere.exe") -property installationpath
Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments '-arch=${{ matrix.msvc_arch }} -host_arch=x64'
$additionalConfigureArgs += '-DPKG_CONFIG_EXECUTABLE:FILEPATH=./build/vcpkg_installed/x64-windows/tools/pkgconf/pkgconf.exe'
$additionalConfigureArgs += "-DPKG_CONFIG_EXECUTABLE:FILEPATH=./build/vcpkg_installed/$($vcpkgHostTriplet ?? 'x64-windows')/tools/pkgconf/pkgconf.exe"
}
if ($osxArch) {
$additionalConfigureArgs += "-DCMAKE_OSX_ARCHITECTURES=$osxArch"
Expand All @@ -138,6 +141,9 @@ jobs:
if ($vcpkgTargetTriplet) {
$additionalConfigureArgs += "-DVCPKG_TARGET_TRIPLET:STRING=$vcpkgTargetTriplet"
}
if ($vcpkgHostTriplet) {
$additionalConfigureArgs += "-DVCPKG_HOST_TRIPLET:STRING=$vcpkgHostTriplet"
}
if (-not $qtArch) {
$additionalConfigureArgs += "-DVCPKG_MANIFEST_FEATURES=qt-from-vcpkg"
}
Expand Down

0 comments on commit 275f855

Please sign in to comment.