Repository navigation
140 lines (113 loc) · 4.33 KB
/
Copy pathrelease.yml
File metadata and controls
140 lines (113 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
bundle:
strategy:
fail-fast: false
matrix:
include:
- name: macos-aarch64
runner: blacksmith-6vcpu-macos-15
shell: bash
command: ./scripts/bundle-mac aarch64-apple-darwin
- name: macos-x86_64
runner: blacksmith-6vcpu-macos-15
shell: bash
command: ./scripts/bundle-mac x86_64-apple-darwin
- name: linux-x86_64
runner: blacksmith-4vcpu-ubuntu-2404
shell: bash
command: ./scripts/bundle-linux x86_64-unknown-linux-gnu
- name: windows-x86_64
runner: blacksmith-4vcpu-windows-2025
shell: pwsh
command: ./scripts/bundle-windows.ps1 -Architecture x86_64
- name: windows-aarch64
runner: blacksmith-4vcpu-windows-2025
shell: pwsh
command: ./scripts/bundle-windows.ps1 -Architecture aarch64
- name: linux-aarch64
runner: blacksmith-4vcpu-ubuntu-2404-arm
shell: bash
command: ./scripts/bundle-linux aarch64-unknown-linux-gnu
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install ARM64 MSVC tools
if: matrix.name == 'windows-aarch64'
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
if (-not (Test-Path $installer)) {
Write-Host "vs_installer.exe not found at $installer"
Write-Host "Searching for it..."
$installer = Get-ChildItem -Path "C:\" -Recurse -Filter "vs_installer.exe" -ErrorAction SilentlyContinue |
Select-Object -First 1 -ExpandProperty FullName
if (-not $installer) {
throw "Could not find vs_installer.exe"
}
}
$installPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
-property installationPath -format value 2>$null
if (-not $installPath) {
$installPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools"
}
Write-Host "Installer: $installer"
Write-Host "Install path: $installPath"
$proc = Start-Process -FilePath $installer -ArgumentList @(
"modify",
"--installPath", "`"$installPath`"",
"--quiet", "--norestart", "--nocache",
"--add", "Microsoft.VisualStudio.Workload.VCTools",
"--add", "Microsoft.VisualStudio.Component.VC.14.44.17.14.ARM64",
"--add", "Microsoft.VisualStudio.Component.Windows11SDK.26100"
) -Wait -PassThru -NoNewWindow
Write-Host "Installer exit code: $($proc.ExitCode)"
if ($proc.ExitCode -ne 0 -and $proc.ExitCode -ne 3010) {
throw "VS Installer failed with exit code $($proc.ExitCode)"
}
- name: Install LLVM for ARM64 assembly
if: matrix.name == 'windows-aarch64'
shell: pwsh
run: |
choco install llvm -y
"C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
& "C:\Program Files\LLVM\bin\clang.exe" --version
- name: Add Rust ARM64 target
if: matrix.name == 'windows-aarch64'
shell: pwsh
run: rustup target add aarch64-pc-windows-msvc
- name: Bundle
if: matrix.shell == 'bash'
shell: bash
run: ${{ matrix.command }}
- name: Bundle
if: matrix.shell == 'pwsh'
shell: pwsh
run: ${{ matrix.command }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: target/dist/*
if-no-files-found: error
release:
needs: bundle
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/download-artifact@v4
with:
path: release-assets
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
files: release-assets/*
generate_release_notes: true