CI on push to master/main: cargo test, native arm64 build on the Pi5 runner, cross-compiled x64 build, rolling 'latest' release with both binaries and checksums. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
74 lines
5.0 KiB
JSON
74 lines
5.0 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Build alla (Linux + Windows)",
|
|
"type": "shell",
|
|
"command": "cargo build --release && cargo build --release --target x86_64-pc-windows-gnu && mkdir -p builds/linux/panels builds/win/panels && cp target/release/tui-wm builds/linux/tui-wm && cp target/x86_64-pc-windows-gnu/release/tui-wm.exe builds/win/tui-wm.exe && cp dist/linux/config.toml builds/linux/config.toml && cp dist/linux/panels/topbar.toml builds/linux/panels/topbar.toml && cp dist/win/config.toml builds/win/config.toml && cp dist/win/panels/topbar.toml builds/win/panels/topbar.toml && echo 'Done: builds/linux/tui-wm + builds/win/tui-wm.exe'",
|
|
"options": { "shell": { "executable": "bash", "args": ["-c"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"],
|
|
"detail": "Bygger båda binärerna: Linux (native) + Windows (kräver mingw-w64)"
|
|
},
|
|
{
|
|
"label": "Build (native)",
|
|
"type": "shell",
|
|
"linux": {
|
|
"command": "cargo build --release && mkdir -p builds/linux/panels && cp target/release/tui-wm builds/linux/tui-wm && cp dist/linux/config.toml builds/linux/config.toml && cp dist/linux/panels/topbar.toml builds/linux/panels/topbar.toml && echo 'Done: builds/linux/tui-wm'"
|
|
},
|
|
"windows": {
|
|
"command": "& \"$env:USERPROFILE\\.cargo\\bin\\cargo.exe\" build --release; if ($LASTEXITCODE -eq 0) { New-Item -Force -ItemType Directory builds\\win\\panels | Out-Null; Copy-Item target\\release\\tui-wm.exe builds\\win\\tui-wm.exe -Force; Copy-Item dist\\win\\config.toml builds\\win\\config.toml -Force; Copy-Item dist\\win\\panels\\topbar.toml builds\\win\\panels\\topbar.toml -Force; Write-Host 'Done: builds\\win\\tui-wm.exe' }",
|
|
"options": { "shell": { "executable": "powershell.exe", "args": ["-NoProfile", "-Command"] } }
|
|
},
|
|
"group": { "kind": "build", "isDefault": true },
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Linux",
|
|
"type": "shell",
|
|
"command": "cargo build --release --target x86_64-unknown-linux-gnu && mkdir -p builds/linux/panels && cp target/x86_64-unknown-linux-gnu/release/tui-wm builds/linux/tui-wm && cp dist/linux/config.toml builds/linux/config.toml && cp dist/linux/panels/topbar.toml builds/linux/panels/topbar.toml && echo 'Done: builds/linux/tui-wm'",
|
|
"options": { "shell": { "executable": "bash", "args": ["-c"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Windows cross (GNU, från Linux)",
|
|
"type": "shell",
|
|
"command": "cargo build --release --target x86_64-pc-windows-gnu && mkdir -p builds/win/panels && cp target/x86_64-pc-windows-gnu/release/tui-wm.exe builds/win/tui-wm.exe && cp dist/win/config.toml builds/win/config.toml && cp dist/win/panels/topbar.toml builds/win/panels/topbar.toml && echo 'Done: builds/win/tui-wm.exe'",
|
|
"options": { "shell": { "executable": "bash", "args": ["-c"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Windows (MSVC — kräver VS Build Tools)",
|
|
"type": "shell",
|
|
"command": "& \"$env:USERPROFILE\\.cargo\\bin\\cargo.exe\" build --release --target x86_64-pc-windows-msvc; if ($LASTEXITCODE -eq 0) { New-Item -Force -ItemType Directory builds\\win\\panels | Out-Null; Copy-Item target\\x86_64-pc-windows-msvc\\release\\tui-wm.exe builds\\win\\tui-wm.exe -Force; Copy-Item dist\\win\\config.toml builds\\win\\config.toml -Force; Copy-Item dist\\win\\panels\\topbar.toml builds\\win\\panels\\topbar.toml -Force; Write-Host 'Done: builds\\win\\tui-wm.exe' }",
|
|
"options": { "shell": { "executable": "powershell.exe", "args": ["-NoProfile", "-Command"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Build Windows (GNU — kräver msys2 + mingw-w64)",
|
|
"type": "shell",
|
|
"command": "& \"$env:USERPROFILE\\.cargo\\bin\\cargo.exe\" build --release --target x86_64-pc-windows-gnu; if ($LASTEXITCODE -eq 0) { New-Item -Force -ItemType Directory builds\\win\\panels | Out-Null; Copy-Item target\\x86_64-pc-windows-gnu\\release\\tui-wm.exe builds\\win\\tui-wm.exe -Force; Copy-Item dist\\win\\config.toml builds\\win\\config.toml -Force; Copy-Item dist\\win\\panels\\topbar.toml builds\\win\\panels\\topbar.toml -Force; Write-Host 'Done: builds\\win\\tui-wm.exe' }",
|
|
"options": { "shell": { "executable": "powershell.exe", "args": ["-NoProfile", "-Command"] } },
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
},
|
|
{
|
|
"label": "Run",
|
|
"type": "shell",
|
|
"command": "cargo run",
|
|
"group": "build",
|
|
"presentation": { "reveal": "always", "panel": "shared" },
|
|
"problemMatcher": ["$rustc"]
|
|
}
|
|
]
|
|
}
|