Fix Windows CI for MSVC 195 on windows-latest
Some checks failed
Windows Release / windows-x86_64 (push) Has been cancelled
Some checks failed
Windows Release / windows-x86_64 (push) Has been cancelled
Generate a win-ci Conan host profile from the runner-detected MSVC version instead of pinning 194 (VS 17), which is missing on current GitHub-hosted images.
This commit is contained in:
parent
c33392db5b
commit
97b136de3b
3 changed files with 59 additions and 7 deletions
28
.github/workflows/windows_release.yml
vendored
28
.github/workflows/windows_release.yml
vendored
|
|
@ -37,10 +37,26 @@ jobs:
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install "conan>=2,<3"
|
python -m pip install "conan>=2,<3"
|
||||||
conan --version
|
conan --version
|
||||||
# Fresh runners have no default profile; host==build for MSVC.
|
# Fresh runners: detect MSVC (windows-latest is currently 195 / VS 18).
|
||||||
if (-not (Test-Path "$env:USERPROFILE\.conan2\profiles\default")) {
|
conan profile detect --force
|
||||||
conan profile detect --force
|
$default = Join-Path $env:USERPROFILE ".conan2\profiles\default"
|
||||||
}
|
$verLine = Select-String -Path $default -Pattern 'compiler.version=' | Select-Object -First 1
|
||||||
|
$msvcVer = ($verLine.Line -split '=')[1].Trim()
|
||||||
|
if (-not $msvcVer) { throw "could not read compiler.version from default profile" }
|
||||||
|
# Host profile matching the runner (repo win-x86_64 still pins 194 for local Tower).
|
||||||
|
$p = Join-Path $env:USERPROFILE ".conan2\profiles\win-ci"
|
||||||
|
@"
|
||||||
|
[settings]
|
||||||
|
arch=x86_64
|
||||||
|
build_type=Release
|
||||||
|
compiler=msvc
|
||||||
|
compiler.cppstd=23
|
||||||
|
compiler.runtime=dynamic
|
||||||
|
compiler.version=$msvcVer
|
||||||
|
os=Windows
|
||||||
|
"@.Trim() | Set-Content -Path $p -Encoding ascii
|
||||||
|
Write-Host "win-ci MSVC version=$msvcVer"
|
||||||
|
Get-Content $p
|
||||||
|
|
||||||
- name: Resolve version
|
- name: Resolve version
|
||||||
id: ver
|
id: ver
|
||||||
|
|
@ -61,7 +77,9 @@ jobs:
|
||||||
- name: Build Windows x86_64
|
- name: Build Windows x86_64
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
call windowsinstall\conan_init_x86_64.bat
|
call .\conan\export_libs.bat
|
||||||
|
if errorlevel 1 exit /b 1
|
||||||
|
conan install . -of=build-x86_64 --build=missing -pr:h=win-ci -pr:b=default
|
||||||
if errorlevel 1 exit /b 1
|
if errorlevel 1 exit /b 1
|
||||||
call windowsinstall\build_x86_64.bat
|
call windowsinstall\build_x86_64.bat
|
||||||
if errorlevel 1 exit /b 1
|
if errorlevel 1 exit /b 1
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,14 @@ File: `.github/workflows/windows_release.yml`
|
||||||
| | |
|
| | |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Trigger | every push to `main`, plus `workflow_dispatch` |
|
| Trigger | every push to `main`, plus `workflow_dispatch` |
|
||||||
| Runner | `windows-latest` (GitHub-hosted) |
|
| Runner | `windows-latest` (GitHub-hosted, MSVC ~195) |
|
||||||
| Build | `windowsinstall/conan_init_x86_64.bat` + `build_x86_64.bat` |
|
| Build | Conan profile `win-ci` (detected) + `windowsinstall/build_x86_64.bat` |
|
||||||
| Output | prerelease tag **`windows-continuous`** with a portable zip |
|
| Output | prerelease tag **`windows-continuous`** with a portable zip |
|
||||||
|
|
||||||
|
Local Tower Windows can keep using `windowsinstall/conan_init_x86_64.bat`
|
||||||
|
(`conan/profiles/win-x86_64`, MSVC 194). CI generates a `win-ci` profile for
|
||||||
|
whatever MSVC `windows-latest` ships.
|
||||||
|
|
||||||
## GitHub remote
|
## GitHub remote
|
||||||
|
|
||||||
Recommended remote name: `github`
|
Recommended remote name: `github`
|
||||||
|
|
|
||||||
30
linuxinstall/install-local.sh
Normal file
30
linuxinstall/install-local.sh
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install a built InfiniPaint binary from this repo into ~/.local
|
||||||
|
set -euo pipefail
|
||||||
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
BIN="${1:-$ROOT/build/Release/infinipaint}"
|
||||||
|
PREFIX="${HOME}/.local"
|
||||||
|
APPDIR="${PREFIX}/share/infinipaint"
|
||||||
|
|
||||||
|
[[ -x "$BIN" ]] || { echo "missing binary: $BIN" >&2; exit 1; }
|
||||||
|
|
||||||
|
mkdir -p "$APPDIR" "${PREFIX}/bin" "${PREFIX}/share/applications"
|
||||||
|
install -m755 "$BIN" "${APPDIR}/infinipaint"
|
||||||
|
rm -rf "${APPDIR}/data"
|
||||||
|
cp -a "${ROOT}/assets/data" "${APPDIR}/data"
|
||||||
|
ln -sfn "${APPDIR}/infinipaint" "${PREFIX}/bin/infinipaint"
|
||||||
|
|
||||||
|
cat > "${PREFIX}/share/applications/com.infinipaint.infinipaint-fork.desktop" <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=InfiniPaint (fork)
|
||||||
|
Comment=Infinite collaborative canvas (copilot fork)
|
||||||
|
Exec=${PREFIX}/bin/infinipaint
|
||||||
|
Icon=com.infinipaint.infinipaint
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Graphics;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Installed: ${PREFIX}/bin/infinipaint"
|
||||||
|
# GUI binary may abort without a working GL context; do not fail install.
|
||||||
|
"${PREFIX}/bin/infinipaint" --version >/dev/null 2>&1 || true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue