Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@ build:mingw64:
before_script:
- *windows_before_script
- ./ci/install-sdk.ps1 -directory "git-sdk"
- ./ci/install-dependencies.ps1 -Mingw
script:
- git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
# The minimal SDK's profile resets PATH.
- git-sdk/usr/bin/bash.exe -l -c
'PATH=$PATH:/c/Rust/bin ci/make-test-artifacts.sh artifacts'
artifacts:
paths:
- artifacts
Expand Down
22 changes: 16 additions & 6 deletions ci/install-dependencies.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
param(
[string]$DownloadDirectory = '.dependencies'
[string]$DownloadDirectory = '.dependencies',
[switch]$Mingw
)

$ErrorActionPreference = 'Stop'
Expand All @@ -11,7 +12,9 @@ $RustVersion = '1.96.0'

New-Item -Path $DownloadDirectory -ItemType Directory -Force | Out-Null
New-Item -Path .git/info -ItemType Directory -Force | Out-Null
New-Item -Path .git/info/exclude -ItemType File -Force | Out-Null
if (-not (Test-Path .git/info/exclude)) {
New-Item -Path .git/info/exclude -ItemType File | Out-Null
}
Add-Content -Path .git/info/exclude -Value "/$DownloadDirectory"

function Get-Installer {
Expand Down Expand Up @@ -41,6 +44,17 @@ function Invoke-Installer {
}
}

$rustTarget = if ($Mingw) { 'gnu' } else { 'msvc' }
$rustMsi = Get-Installer "rust-$rustTarget.msi" (
"https://static.rust-lang.org/dist/" +
"rust-$RustVersion-x86_64-pc-windows-$rustTarget.msi")
Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\Rust',
"ADDLOCAL=Rustc,Cargo,Std$(if ($Mingw) { ',Gcc' })", '/quiet', '/norestart')

if ($Mingw) {
return
}

$gitAssetVersion = $GitVersion -replace '\.windows\.\d+$', ''
$gitInstaller = Get-Installer "Git-Installer.exe" `
"https://github.com/git-for-windows/git/releases/download/v$GitVersion/PortableGit-$gitAssetVersion-64-bit.7z.exe"
Expand All @@ -49,7 +63,3 @@ Invoke-Installer $gitInstaller @('-y', '-o"C:\Program Files\Git"')
$mesonMsi = Get-Installer "meson.msi" `
"https://github.com/mesonbuild/meson/releases/download/$MesonVersion/meson-$MesonVersion-64.msi"
Invoke-Installer msiexec.exe @('/i', $mesonMsi, 'INSTALLDIR=C:\Meson', '/quiet', '/norestart')

$rustMsi = Get-Installer "rust.msi" `
"https://static.rust-lang.org/dist/rust-$RustVersion-x86_64-pc-windows-msvc.msi"
Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\Rust', 'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')
Loading