Add shared runner dependency setup for Linux and Windows
CI / Real Minecraft installs (manual) (push) Skipped
CI / Windows launcher (push) Failing after 13s
CI / Rust, web and container (push) Canceled after 0s
Server integrations / paper (push) Canceled after 0s
Server integrations / Fabric and Forge / 1.20.1 (push) Canceled after 0s
Server integrations / Fabric and Forge / 1.21.1 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.1.2 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.2 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.3 (push) Canceled after 0s
CI / Real Minecraft installs (manual) (push) Skipped
CI / Windows launcher (push) Failing after 13s
CI / Rust, web and container (push) Canceled after 0s
Server integrations / paper (push) Canceled after 0s
Server integrations / Fabric and Forge / 1.20.1 (push) Canceled after 0s
Server integrations / Fabric and Forge / 1.21.1 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.1.2 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.2 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.3 (push) Canceled after 0s
This commit is contained in:
1 parent
23ab34ab72
commit
a378f9904c
7 files changed
+262
-83
No files matched your search
+25
-34
@@ -19,17 +19,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Verify Linux runner
|
||||
run: |
|
||||
set -eu
|
||||
test "$(uname -s)" = Linux
|
||||
for tool in cargo rustc node npm docker; do command -v "$tool" >/dev/null || { echo "Missing $tool on ubuntu-latest runner"; exit 1; }; done
|
||||
test "$(node -p 'process.versions.node.split(".")[0]')" -ge 22
|
||||
rustup component list --installed | grep -q rustfmt
|
||||
rustup component list --installed | grep -q clippy
|
||||
pkg-config --exists webkit2gtk-4.1 ayatana-appindicator3-0.1 librsvg-2.0 || { echo 'Missing Tauri GTK/WebKit development packages'; exit 1; }
|
||||
docker info >/dev/null || { echo 'Docker daemon unavailable'; exit 1; }
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
@@ -37,6 +26,9 @@ jobs:
|
||||
cache-dependency-path: |
|
||||
panel/web/package-lock.json
|
||||
launcher/package-lock.json
|
||||
- name: Install Linux build dependencies
|
||||
run: bash scripts/ci/install-linux.sh rust
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Check Rust
|
||||
run: |
|
||||
mkdir -p launcher/dist
|
||||
@@ -49,37 +41,35 @@ jobs:
|
||||
for app in panel/web launcher; do
|
||||
(cd "$app" && npm ci --no-audit --no-fund && npm run check && npm run build)
|
||||
done
|
||||
- id: docker
|
||||
run: |
|
||||
if command -v docker >/dev/null && docker info >/dev/null 2>&1; then
|
||||
echo 'ready=true' >> "$GITEA_OUTPUT"
|
||||
else
|
||||
echo 'ready=false' >> "$GITEA_OUTPUT"
|
||||
fi
|
||||
- uses: docker/setup-docker-action@v5
|
||||
if: steps.docker.outputs.ready != 'true'
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- name: Build panel container
|
||||
run: docker build -t scopenet-panel:ci .
|
||||
run: |
|
||||
bash scripts/ci/install-linux.sh image
|
||||
docker build -t scopenet-panel:ci .
|
||||
|
||||
launcher-windows:
|
||||
name: Windows launcher
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Find PowerShell 7 on Windows runner
|
||||
shell: powershell
|
||||
run: |
|
||||
$pwsh = (Get-Command pwsh -ErrorAction SilentlyContinue | Select-Object -First 1).Source
|
||||
if (-not $pwsh) { $pwsh = Join-Path $env:ProgramFiles 'PowerShell\7\pwsh.exe' }
|
||||
if (-not (Test-Path $pwsh)) { throw "PowerShell 7 is not available to the runner at $pwsh" }
|
||||
$version = & $pwsh -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'
|
||||
Write-Host "Using PowerShell $version at $pwsh"
|
||||
Add-Content -Path $env:GITEA_PATH -Value (Split-Path $pwsh)
|
||||
- name: Verify Windows runner
|
||||
shell: pwsh
|
||||
run: |
|
||||
if (-not $IsWindows) { throw 'windows-latest must be a Windows host runner' }
|
||||
foreach ($tool in @('cargo', 'rustc', 'node', 'npm')) {
|
||||
if (-not (Get-Command $tool -ErrorAction SilentlyContinue)) { throw "Missing $tool" }
|
||||
}
|
||||
if ([int](node -p 'process.versions.node.split(".")[0]') -lt 22) { throw 'Node 22+ required' }
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: npm
|
||||
cache-dependency-path: launcher/package-lock.json
|
||||
- name: Install Windows build dependencies
|
||||
shell: powershell
|
||||
run: .\scripts\ci\install-windows.ps1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: npm ci --no-audit --no-fund
|
||||
working-directory: launcher
|
||||
- run: npm run build
|
||||
@@ -94,9 +84,10 @@ jobs:
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Verify runner
|
||||
run: |
|
||||
test "$(uname -s)" = Linux
|
||||
command -v cargo
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
- name: Install Linux build dependencies
|
||||
run: bash scripts/ci/install-linux.sh rust
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test -p scopenet-core --test online --locked -- --ignored --test-threads=2 --nocapture
|
||||
Reference in new issue
Block a user