mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
update CI tarballs for LLVM 18
Also makes the windows CI scripts fetch the tarballs from the network if not already on disk.
This commit is contained in:
parent
f6f0fefd8b
commit
e07ad33f1d
11 changed files with 45 additions and 12 deletions
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
|
|
@ -4,6 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- llvm18
|
||||||
concurrency:
|
concurrency:
|
||||||
# Cancels pending runs when a PR gets updated.
|
# Cancels pending runs when a PR gets updated.
|
||||||
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
|
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ set -e
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
TARGET="$ARCH-linux-musl"
|
TARGET="$ARCH-linux-musl"
|
||||||
MCPU="baseline"
|
MCPU="baseline"
|
||||||
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.203+d3bc1cfc4"
|
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
||||||
ZIG="$PREFIX/bin/zig"
|
ZIG="$PREFIX/bin/zig"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ set -e
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
TARGET="$ARCH-linux-musl"
|
TARGET="$ARCH-linux-musl"
|
||||||
MCPU="baseline"
|
MCPU="baseline"
|
||||||
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.203+d3bc1cfc4"
|
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
||||||
ZIG="$PREFIX/bin/zig"
|
ZIG="$PREFIX/bin/zig"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ set -e
|
||||||
ZIGDIR="$PWD"
|
ZIGDIR="$PWD"
|
||||||
TARGET="$ARCH-macos-none"
|
TARGET="$ARCH-macos-none"
|
||||||
MCPU="baseline"
|
MCPU="baseline"
|
||||||
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"
|
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
PREFIX="$HOME/$CACHE_BASENAME"
|
PREFIX="$HOME/$CACHE_BASENAME"
|
||||||
ZIG="$PREFIX/bin/zig"
|
ZIG="$PREFIX/bin/zig"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ set -e
|
||||||
ZIGDIR="$PWD"
|
ZIGDIR="$PWD"
|
||||||
TARGET="$ARCH-macos-none"
|
TARGET="$ARCH-macos-none"
|
||||||
MCPU="baseline"
|
MCPU="baseline"
|
||||||
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"
|
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
PREFIX="$HOME/$CACHE_BASENAME"
|
PREFIX="$HOME/$CACHE_BASENAME"
|
||||||
ZIG="$PREFIX/bin/zig"
|
ZIG="$PREFIX/bin/zig"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
$TARGET = "$($Env:ARCH)-windows-gnu"
|
$TARGET = "$($Env:ARCH)-windows-gnu"
|
||||||
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.12.0-dev.2087+e9a18010b"
|
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
$MCPU = "baseline"
|
$MCPU = "baseline"
|
||||||
$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
|
$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
|
||||||
$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
|
$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ set -e
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
TARGET="$ARCH-linux-musl"
|
TARGET="$ARCH-linux-musl"
|
||||||
MCPU="baseline"
|
MCPU="baseline"
|
||||||
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.203+d3bc1cfc4"
|
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
||||||
ZIG="$PREFIX/bin/zig"
|
ZIG="$PREFIX/bin/zig"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ set -e
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
TARGET="$ARCH-linux-musl"
|
TARGET="$ARCH-linux-musl"
|
||||||
MCPU="baseline"
|
MCPU="baseline"
|
||||||
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.203+d3bc1cfc4"
|
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
PREFIX="$HOME/deps/$CACHE_BASENAME"
|
||||||
ZIG="$PREFIX/bin/zig"
|
ZIG="$PREFIX/bin/zig"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ set -e
|
||||||
ZIGDIR="$PWD"
|
ZIGDIR="$PWD"
|
||||||
TARGET="$ARCH-macos-none"
|
TARGET="$ARCH-macos-none"
|
||||||
MCPU="baseline"
|
MCPU="baseline"
|
||||||
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"
|
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
PREFIX="$HOME/$CACHE_BASENAME"
|
PREFIX="$HOME/$CACHE_BASENAME"
|
||||||
JOBS="-j3"
|
JOBS="-j3"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,20 @@
|
||||||
$TARGET = "$($Env:ARCH)-windows-gnu"
|
$TARGET = "$($Env:ARCH)-windows-gnu"
|
||||||
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.12.0-dev.2073+402fe565a"
|
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
$MCPU = "baseline"
|
$MCPU = "baseline"
|
||||||
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
|
$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
|
||||||
|
$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
|
||||||
$ZIG = "$PREFIX_PATH\bin\zig.exe"
|
$ZIG = "$PREFIX_PATH\bin\zig.exe"
|
||||||
$ZIG_LIB_DIR = "$(Get-Location)\lib"
|
$ZIG_LIB_DIR = "$(Get-Location)\lib"
|
||||||
|
|
||||||
|
if (!(Test-Path "..\$ZIG_LLVM_CLANG_LLD_NAME.zip")) {
|
||||||
|
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
|
||||||
|
Invoke-WebRequest -Uri "$ZIG_LLVM_CLANG_LLD_URL" -OutFile "..\$ZIG_LLVM_CLANG_LLD_NAME.zip"
|
||||||
|
|
||||||
|
Write-Output "Extracting..."
|
||||||
|
Add-Type -AssemblyName System.IO.Compression.FileSystem ;
|
||||||
|
[System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD\..\$ZIG_LLVM_CLANG_LLD_NAME.zip", "$PWD\..")
|
||||||
|
}
|
||||||
|
|
||||||
function CheckLastExitCode {
|
function CheckLastExitCode {
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -25,6 +35,12 @@ Remove-Item -Path 'build-debug' -Recurse -Force -ErrorAction Ignore
|
||||||
New-Item -Path 'build-debug' -ItemType Directory
|
New-Item -Path 'build-debug' -ItemType Directory
|
||||||
Set-Location -Path 'build-debug'
|
Set-Location -Path 'build-debug'
|
||||||
|
|
||||||
|
# Override the cache directories because they won't actually help other CI runs
|
||||||
|
# which will be testing alternate versions of zig, and ultimately would just
|
||||||
|
# fill up space on the hard drive for no reason.
|
||||||
|
$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
|
||||||
|
$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
|
||||||
|
|
||||||
# CMake gives a syntax error when file paths with backward slashes are used.
|
# CMake gives a syntax error when file paths with backward slashes are used.
|
||||||
# Here, we use forward slashes only to work around this.
|
# Here, we use forward slashes only to work around this.
|
||||||
& cmake .. `
|
& cmake .. `
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,20 @@
|
||||||
$TARGET = "$($Env:ARCH)-windows-gnu"
|
$TARGET = "$($Env:ARCH)-windows-gnu"
|
||||||
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.12.0-dev.2073+402fe565a"
|
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
|
||||||
$MCPU = "baseline"
|
$MCPU = "baseline"
|
||||||
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
|
$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
|
||||||
|
$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
|
||||||
$ZIG = "$PREFIX_PATH\bin\zig.exe"
|
$ZIG = "$PREFIX_PATH\bin\zig.exe"
|
||||||
$ZIG_LIB_DIR = "$(Get-Location)\lib"
|
$ZIG_LIB_DIR = "$(Get-Location)\lib"
|
||||||
|
|
||||||
|
if (!(Test-Path "..\$ZIG_LLVM_CLANG_LLD_NAME.zip")) {
|
||||||
|
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
|
||||||
|
Invoke-WebRequest -Uri "$ZIG_LLVM_CLANG_LLD_URL" -OutFile "..\$ZIG_LLVM_CLANG_LLD_NAME.zip"
|
||||||
|
|
||||||
|
Write-Output "Extracting..."
|
||||||
|
Add-Type -AssemblyName System.IO.Compression.FileSystem ;
|
||||||
|
[System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD\..\$ZIG_LLVM_CLANG_LLD_NAME.zip", "$PWD\..")
|
||||||
|
}
|
||||||
|
|
||||||
function CheckLastExitCode {
|
function CheckLastExitCode {
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -25,6 +35,12 @@ Remove-Item -Path 'build-release' -Recurse -Force -ErrorAction Ignore
|
||||||
New-Item -Path 'build-release' -ItemType Directory
|
New-Item -Path 'build-release' -ItemType Directory
|
||||||
Set-Location -Path 'build-release'
|
Set-Location -Path 'build-release'
|
||||||
|
|
||||||
|
# Override the cache directories because they won't actually help other CI runs
|
||||||
|
# which will be testing alternate versions of zig, and ultimately would just
|
||||||
|
# fill up space on the hard drive for no reason.
|
||||||
|
$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
|
||||||
|
$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
|
||||||
|
|
||||||
# CMake gives a syntax error when file paths with backward slashes are used.
|
# CMake gives a syntax error when file paths with backward slashes are used.
|
||||||
# Here, we use forward slashes only to work around this.
|
# Here, we use forward slashes only to work around this.
|
||||||
& cmake .. `
|
& cmake .. `
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue