Hand the release build's CMake to cargo as a Windows path
This commit is contained in:
parent
705828e012
commit
8cf8ddb45c
1 changed files with 7 additions and 3 deletions
|
|
@ -27,16 +27,20 @@ jobs:
|
||||||
# build, pinned by hash, unpacked into the job's folder (nothing is installed on the runner).
|
# build, pinned by hash, unpacked into the job's folder (nothing is installed on the runner).
|
||||||
- name: CMake
|
- name: CMake
|
||||||
run: |
|
run: |
|
||||||
if command -v cmake >/dev/null; then cmake --version; exit 0; fi
|
# The path goes to Windows processes (cargo's cmake crate), so it is written as a Windows path.
|
||||||
|
use() { echo "$(cygpath -w "$1")" >> "$GITHUB_PATH"; echo "CMAKE=$(cygpath -w "$1/cmake.exe")" >> "$GITHUB_ENV"; "$1/cmake.exe" --version; }
|
||||||
|
found=$(command -v cmake || true)
|
||||||
|
if [ -n "$found" ]; then use "$(dirname "$found")"; exit 0; fi
|
||||||
vs=$(ls -d "/c/Program Files"*"/Microsoft Visual Studio/2022/"*"/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin" 2>/dev/null | head -1 || true)
|
vs=$(ls -d "/c/Program Files"*"/Microsoft Visual Studio/2022/"*"/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin" 2>/dev/null | head -1 || true)
|
||||||
if [ -n "$vs" ] && [ -x "$vs/cmake.exe" ]; then echo "$vs" >> "$GITHUB_PATH"; "$vs/cmake.exe" --version; exit 0; fi
|
if [ -n "$vs" ] && [ -x "$vs/cmake.exe" ]; then use "$vs"; exit 0; fi
|
||||||
curl -sSLfo cmake.zip https://github.com/Kitware/CMake/releases/download/v3.31.8/cmake-3.31.8-windows-x86_64.zip
|
curl -sSLfo cmake.zip https://github.com/Kitware/CMake/releases/download/v3.31.8/cmake-3.31.8-windows-x86_64.zip
|
||||||
echo "81aa9964dbabd71fe02e7ec50472fd3ad56138c49944515ece9001efbff8d719 cmake.zip" | sha256sum -c -
|
echo "81aa9964dbabd71fe02e7ec50472fd3ad56138c49944515ece9001efbff8d719 cmake.zip" | sha256sum -c -
|
||||||
unzip -q cmake.zip -d "$RUNNER_TEMP" && rm cmake.zip
|
unzip -q cmake.zip -d "$RUNNER_TEMP" && rm cmake.zip
|
||||||
echo "$(cygpath -w "$RUNNER_TEMP/cmake-3.31.8-windows-x86_64/bin")" >> "$GITHUB_PATH"
|
use "$(cygpath -u "$RUNNER_TEMP")/cmake-3.31.8-windows-x86_64/bin"
|
||||||
- name: Build the installer, path-free
|
- name: Build the installer, path-free
|
||||||
run: |
|
run: |
|
||||||
bun install
|
bun install
|
||||||
|
echo "cmake for cargo: $CMAKE"
|
||||||
bunx waybetter@0.7.0 build-env --root "$PWD" -- bun run app:build
|
bunx waybetter@0.7.0 build-env --root "$PWD" -- bun run app:build
|
||||||
ls -l target/release/bundle/nsis/
|
ls -l target/release/bundle/nsis/
|
||||||
- uses: https://code.forgejo.org/actions/upload-artifact@v3
|
- uses: https://code.forgejo.org/actions/upload-artifact@v3
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue