dev: fix zig version update script

This commit is contained in:
Ali Chraghi 2022-09-20 08:41:28 +04:30 committed by Stephen Gutekanst
parent f3109b365c
commit 62e00bfbd0
3 changed files with 13 additions and 13 deletions

View file

@ -64,7 +64,7 @@ jobs:
Invoke-WebRequest -Uri 'https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0.zip' -OutFile 'C:\zig.zip' Invoke-WebRequest -Uri 'https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0.zip' -OutFile 'C:\zig.zip'
cd C:\ cd C:\
7z x zig.zip 7z x zig.zip
Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\' Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0\'
- name: compile all examples - name: compile all examples
run: zig build compile-all run: zig build compile-all
- name: test - name: test

View file

@ -37,9 +37,9 @@ Mach has many libraries you can use for game development in Zig - **you don't ha
## Join the community ## Join the community
* [#hexops:matrix.org Matrix chat](https://matrix.to/#/#hexops:matrix.org) and [Discord server](https://discord.gg/XNG3NZgCqp), come discuss the future of game engines & graphics in Zig! - [#hexops:matrix.org Matrix chat](https://matrix.to/#/#hexops:matrix.org) and [Discord server](https://discord.gg/XNG3NZgCqp), come discuss the future of game engines & graphics in Zig!
* [machengine.org](https://machengine.org) - [machengine.org](https://machengine.org)
* Follow [@machengine on Twitter](https://twitter.com/machengine) for updates. - Follow [@machengine on Twitter](https://twitter.com/machengine) for updates.
Contributors are very welcome! There are lots of places you can help out with little knowledge, so feel free to join the Matrix chat and say hi! Contributors are very welcome! There are lots of places you can help out with little knowledge, so feel free to join the Matrix chat and say hi!
@ -74,12 +74,12 @@ Mach is still early stages, so far we have support for building from the followi
Mach works with the new self-hosted Zig compiler only. This means you'll need to use the latest Zig nightly version. Mach works with the new self-hosted Zig compiler only. This means you'll need to use the latest Zig nightly version.
Currently we test using `0.10.0-dev.3952+9e070b653`. Newer is generally better, but you can download this version here: Currently we test using `0.10.0-dev.4060+61aaef0b0`. Newer is generally better, but you can download this version here:
* **linux-x86_64**: https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz) - **linux-x86_64**: https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz)
* **windows-x86_64**: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0.zip - **windows-x86_64**: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0.zip
* **macos-x86_64** (Intel): https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz - **macos-x86_64** (Intel): https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz
* **macos-aarch64** (Apple Silicon): https://ziglang.org/builds/zig-macos-aarch64-0.10.0-dev.4060+61aaef0b0.tar.xz - **macos-aarch64** (Apple Silicon): https://ziglang.org/builds/zig-macos-aarch64-0.10.0-dev.4060+61aaef0b0.tar.xz
`mach/ecs` and WebAssembly examples have known issues unless using `-fstage1`, see [issue #180](https://github.com/hexops/mach/issues/180) for details. `mach/ecs` and WebAssembly examples have known issues unless using `-fstage1`, see [issue #180](https://github.com/hexops/mach/issues/180) for details.

View file

@ -11,17 +11,17 @@ else
fi fi
update_zig() { update_zig() {
$gsed -i 's|\(Currently tested with: \).*|\1'"$1"'|' $2 $gsed -i 's|\(Currently we test using\ \)`.*`|\1'"\`$1\`|" $2
$gsed -i 's|\(https://ziglang.org/builds/zig-[^/ -]*-[^/ -]*-\)[^/ ]*\(\(\.tar\.xz\)[^/ ]*\)|\1'"$1"'\2|' $2 $gsed -i 's|\(https://ziglang.org/builds/zig-[^/ -]*-[^/ -]*-\)[^/ ]*\(\(\.tar\.xz\)[^/ ]*\)|\1'"$1"'\2|' $2
$gsed -i 's|\(https://ziglang.org/builds/zig-[^/ -]*-[^/ -]*-\)[^/ ]*\(\(\.zip\)[^/ ]*\)|\1'"$1"'\2|' $2 $gsed -i 's|\(https://ziglang.org/builds/zig-[^/ -]*-[^/ -]*-\)[^/ ]*\(\(\.zip\)[^/ ]*\)|\1'"$1"'\2|' $2
$gsed -i 's|\(C:\\zig-[^/ -]*-[^/ -]*-\)[^/ \\]*\(.*"\)|\1'"$1"'\2|' $2 $gsed -i 's|\(C:\\zig-[^/ -]*-[^/ -]*-\)[^/ \\]*|\1'"$1|" $2
} }
if [ -n "${ZIG_VERSION:-}" ]; then if [ -n "${ZIG_VERSION:-}" ]; then
version="${ZIG_VERSION:-}" version="${ZIG_VERSION:-}"
update_zig "$version" README.md update_zig "$version" README.md
sources=$(find . | grep './.github/workflows' | grep -v 'third_party/' | grep -v 'DirectXShaderCompiler' | grep '\.yml') sources=$(find . | grep './.github/workflows' | grep -v 'third_party/' | grep -v 'DirectXShaderCompiler' | grep '\.yml')
echo "$sources" | while read line ; do update_zig "$version" "$line" ; done echo "$sources" | while read line ; do update_zig "$version" "$line" ; done
else else