Install Windows Node from ZIP to avoid runner 7z failure
CI / Real Minecraft installs (manual) (push) Skipped
CI / Windows launcher (push) Failing after 3m12s
CI / Rust, web and container (push) Canceled after 0s

This commit is contained in:
SCOPEDD committed 2026-10-01 01:06:28 -04:00
1 parent a378f9904c
commit 78bd14318d
5 files changed
+18 -16

No files matched your search

-5
View File
@@ -61,11 +61,6 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: launcher/package-lock.json
- name: Install Windows build dependencies - name: Install Windows build dependencies
shell: powershell shell: powershell
run: .\scripts\ci\install-windows.ps1 run: .\scripts\ci\install-windows.ps1
-5
View File
@@ -53,11 +53,6 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: launcher/package-lock.json
- name: Install Windows build dependencies - name: Install Windows build dependencies
shell: powershell shell: powershell
run: .\scripts\ci\install-windows.ps1 run: .\scripts\ci\install-windows.ps1
-3
View File
@@ -40,9 +40,6 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install PowerShell, Rust and MSVC - name: Install PowerShell, Rust and MSVC
shell: powershell shell: powershell
run: .\scripts\ci\install-windows.ps1 run: .\scripts\ci\install-windows.ps1
+1 -1
View File
@@ -82,7 +82,7 @@ The workflow builds the **Windows installer**, pushes the **panel image to Gitea
### Gitea runner setup ### Gitea runner setup
Register a Linux host runner with the `ubuntu-latest` label and a Windows host runner with `windows-latest`. Linux builds the panel Docker image and server JARs; Windows builds the NSIS installer. The workflows use [the Linux setup tool](scripts/ci/install-linux.sh) and [the Windows setup tool](scripts/ci/install-windows.ps1) to install or check job dependencies. Node 22 and Java 21/25 are downloaded by `setup-node` and `setup-java`; the Linux tool installs Rust, Tauri system packages, and release utilities, while the Windows tool installs Rust and downloads PowerShell 7.6.6 if the runner cannot find it. Docker and Buildx are set up by Docker's Actions. The Linux runner must allow a Docker daemon to start or provide one, and system package installation needs root or passwordless sudo. Enable Actions for the repository and allow its job token to write releases and packages. See [Gitea's runner labels](https://docs.gitea.com/runner/labels/) and [token permissions](https://docs.gitea.com/usage/actions/token-permissions/). Register a Linux host runner with the `ubuntu-latest` label and a Windows host runner with `windows-latest`. Linux builds the panel Docker image and server JARs; Windows builds the NSIS installer. The workflows use [the Linux setup tool](scripts/ci/install-linux.sh) and [the Windows setup tool](scripts/ci/install-windows.ps1) to install or check job dependencies. Linux Node 22 and Java 21/25 are downloaded by `setup-node` and `setup-java`; the Linux tool installs Rust, Tauri system packages, and release utilities. The Windows tool downloads PowerShell 7.6.6 and Node 22 if unavailable, then installs Rust and Microsoft C++ Build Tools. Docker and Buildx are set up by Docker's Actions. The Linux runner must allow a Docker daemon to start or provide one, and system package installation needs root or passwordless sudo. Enable Actions for the repository and allow its job token to write releases and packages. See [Gitea's runner labels](https://docs.gitea.com/runner/labels/) and [token permissions](https://docs.gitea.com/usage/actions/token-permissions/).
The setup tools also run directly on matching hosts: `bash scripts/ci/install-linux.sh rust` prepares Rust and Tauri builds, `bash scripts/ci/install-linux.sh image` checks Docker, `bash scripts/ci/install-linux.sh java 21` checks a Java integration runner, and `powershell -File scripts/ci/install-windows.ps1` prepares the Windows installer runner. Gitea uses them in CI and release jobs; GitHub provides a manual **Runner setup** workflow for both platforms. Run the Linux `rust` mode as root or with passwordless sudo; the Windows script may need administrator rights to install Microsoft C++ Build Tools. The setup tools also run directly on matching hosts: `bash scripts/ci/install-linux.sh rust` prepares Rust and Tauri builds, `bash scripts/ci/install-linux.sh image` checks Docker, `bash scripts/ci/install-linux.sh java 21` checks a Java integration runner, and `powershell -File scripts/ci/install-windows.ps1` prepares the Windows installer runner. Gitea uses them in CI and release jobs; GitHub provides a manual **Runner setup** workflow for both platforms. Run the Linux `rust` mode as root or with passwordless sudo; the Windows script may need administrator rights to install Microsoft C++ Build Tools.
+17 -2
View File
@@ -34,6 +34,22 @@ if (-not $pwsh) {
Add-RunnerPath (Split-Path $pwsh) Add-RunnerPath (Split-Path $pwsh)
Write-Host "PowerShell $(& $pwsh -NoProfile -Command '$PSVersionTable.PSVersion.ToString()') is ready." Write-Host "PowerShell $(& $pwsh -NoProfile -Command '$PSVersionTable.PSVersion.ToString()') is ready."
$node = Get-Command node.exe -ErrorAction SilentlyContinue
$nodeMajor = if ($node) { [int](& node -p 'process.versions.node.split(".")[0]') } else { 0 }
if ($nodeMajor -lt 22) {
$nodeVersion = '22.23.3'
$nodeArchive = Join-Path $env:RUNNER_TEMP "node-v$nodeVersion-win-x64.zip"
$nodeRoot = Join-Path $env:RUNNER_TEMP 'scopenet-node'
$nodeBin = Join-Path $nodeRoot "node-v$nodeVersion-win-x64"
if (-not (Test-Path (Join-Path $nodeBin 'node.exe'))) {
Invoke-WebRequest -UseBasicParsing -Uri "https://nodejs.org/dist/v$nodeVersion/node-v$nodeVersion-win-x64.zip" -OutFile $nodeArchive
Expand-Archive -Path $nodeArchive -DestinationPath $nodeRoot -Force
Remove-Item $nodeArchive
}
Add-RunnerPath $nodeBin
}
Write-Host "Node $(& node --version) is ready."
$cargoBin = Join-Path $env:USERPROFILE '.cargo\bin' $cargoBin = Join-Path $env:USERPROFILE '.cargo\bin'
Add-RunnerPath $cargoBin Add-RunnerPath $cargoBin
if (-not (Get-Command rustup.exe -ErrorAction SilentlyContinue)) { if (-not (Get-Command rustup.exe -ErrorAction SilentlyContinue)) {
@@ -65,6 +81,5 @@ Write-Host "Microsoft C++ Build Tools are ready at $vsPath."
foreach ($tool in @('cargo.exe', 'rustc.exe', 'node.exe', 'npm.cmd')) { foreach ($tool in @('cargo.exe', 'rustc.exe', 'node.exe', 'npm.cmd')) {
if (-not (Get-Command $tool -ErrorAction SilentlyContinue)) { throw "Missing $tool after dependency setup." } if (-not (Get-Command $tool -ErrorAction SilentlyContinue)) { throw "Missing $tool after dependency setup." }
} }
$nodeMajor = [int](& node -p 'process.versions.node.split(".")[0]') if ([int](& node -p 'process.versions.node.split(".")[0]') -lt 22) { throw 'Node 22+ is required.' }
if ($nodeMajor -lt 22) { throw 'Node 22+ is required.' }
Write-Host "Windows $Mode dependencies are ready." Write-Host "Windows $Mode dependencies are ready."