mirror of
https://github.com/gbdev/rgbds.git
synced 2026-03-25 14:23:04 +00:00
Cache library deps on Windows
Besides the immediate performance improvement, reducing the frequency of downloads should make spurious failures (network, rate-limiting...) less bothersome.
This commit is contained in:
18
.github/scripts/get_win_deps.ps1
vendored
18
.github/scripts/get_win_deps.ps1
vendored
@@ -1,18 +0,0 @@
|
||||
function getlibrary ([string] $URI, [string] $filename, [string] $hash, [string] $destdir) {
|
||||
$wc = New-Object Net.WebClient
|
||||
[string] $downloadhash = $null
|
||||
try {
|
||||
$wc.DownloadFile($URI, $filename)
|
||||
$downloadhash = $(Get-FileHash $filename -Algorithm SHA256).Hash
|
||||
} catch {
|
||||
Write-Host "${filename}: failed to download"
|
||||
exit 1
|
||||
}
|
||||
if ($hash -ne $downloadhash) {
|
||||
Write-Host "${filename}: SHA256 mismatch ($downloadhash)"
|
||||
exit 1
|
||||
}
|
||||
Expand-Archive -DestinationPath $destdir $filename
|
||||
}
|
||||
|
||||
getlibrary 'https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip' 'winflexbison.zip' '8d324b62be33604b2c45ad1dd34ab93d722534448f55a16ca7292de32b6ac135' bison
|
||||
8
.github/scripts/install_deps.sh
vendored
8
.github/scripts/install_deps.sh
vendored
@@ -7,7 +7,7 @@ case "${1%-*}" in
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install -yq bison libpng-dev pkg-config
|
||||
;;
|
||||
macos)
|
||||
macos)
|
||||
# macOS bundles GNU Make 3.81, which doesn't support synced output.
|
||||
# We leave it as the default in `PATH`, to test that our Makefile works with it.
|
||||
# However, CMake automatically uses Homebrew's `gmake`, so our CI has synced output.
|
||||
@@ -20,11 +20,17 @@ case "${1%-*}" in
|
||||
freebsd)
|
||||
pkg install -y bash bison cmake git png
|
||||
;;
|
||||
windows)
|
||||
choco install -y winflexbison3
|
||||
# The below expects the base name, not the Windows-specific name.
|
||||
bison() { win_bison "$@"; } # An alias doesn't work, so we use a function instead.
|
||||
;;
|
||||
*)
|
||||
echo "WARNING: Cannot install deps for OS '$1'"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "PATH=($PATH)" | sed 's/:/\n /g'
|
||||
bison --version
|
||||
make --version
|
||||
cmake --version
|
||||
|
||||
Reference in New Issue
Block a user