Update to latest Zig master (0.10.0-dev.2017+a0a2ce92c) (#261)
* use `@ceil` instead of `std.math.ceil` * `ChildProcess.init` does not allocate anymore * update CI zig version * examples: temporarily switch to fork of zigimg compatible with zig-master Commands executed: ``` git submodule set-url -- examples/libs/zigimg https://github.com/slimsag/zigimg git submodule set-branch --branch zig-master -- examples/libs/zigimg git submodule update --init --remote examples/libs/zigimg ``` Signed-off-by: Stephen Gutekanst <stephen@hexops.com> Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
0e64b9608c
commit
4570838304
9 changed files with 26 additions and 25 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
sudo apt install xz-utils
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: x86_64-linux -> x86_64-macos
|
||||
run: cd ${{ matrix.project }} && zig build test -Dtarget=x86_64-macos.12...12-gnu
|
||||
env:
|
||||
|
|
@ -54,10 +54,10 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.1600+af844931b.zip" -OutFile "C:\zig.zip"
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c.zip" -OutFile "C:\zig.zip"
|
||||
cd C:\
|
||||
7z x zig.zip
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.1600+af844931b\"
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c\"
|
||||
- name: x86_64-windows -> x86_64-macos
|
||||
run: cd ${{ matrix.project }} && zig build test -Dtarget='x86_64-macos.12...12-gnu'
|
||||
env:
|
||||
|
|
@ -85,7 +85,7 @@ jobs:
|
|||
run: |
|
||||
brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
|
||||
brew install xz
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
# TODO: re-enable once we can use macos-12 reliably on GitHub actions (currently works, but
|
||||
# takes a very long time to acquire macos-12 runners.)
|
||||
# - name: test
|
||||
|
|
|
|||
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -14,7 +14,8 @@
|
|||
url = https://github.com/PiergiorgioZagaria/zmath
|
||||
[submodule "examples/libs/zigimg"]
|
||||
path = examples/libs/zigimg
|
||||
url = https://github.com/zigimg/zigimg
|
||||
url = https://github.com/slimsag/zigimg
|
||||
branch = zig-master
|
||||
[submodule "examples/assets"]
|
||||
path = examples/assets
|
||||
url = https://github.com/hexops/mach-example-assets
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ fn ensureDependencySubmodule(allocator: std.mem.Allocator, path: []const u8) !vo
|
|||
if (std.process.getEnvVarOwned(allocator, "NO_ENSURE_SUBMODULES")) |no_ensure_submodules| {
|
||||
if (std.mem.eql(u8, no_ensure_submodules, "true")) return;
|
||||
} else |_| {}
|
||||
const child = try std.ChildProcess.init(&.{ "git", "submodule", "update", "--init", path }, allocator);
|
||||
var child = std.ChildProcess.init(&.{ "git", "submodule", "update", "--init", path }, allocator);
|
||||
child.cwd = thisDir();
|
||||
child.stderr = std.io.getStdErr();
|
||||
child.stdout = std.io.getStdOut();
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ pub fn update(app: *App, engine: *mach.Engine) !bool {
|
|||
const pass_encoder = command_encoder.beginComputePass(null);
|
||||
pass_encoder.setPipeline(app.compute_pipeline);
|
||||
pass_encoder.setBindGroup(0, app.particle_bind_groups[app.frame_counter % 2], null);
|
||||
pass_encoder.dispatch(@floatToInt(u32, std.math.ceil(@as(f32, num_particle) / 64)), 1, 1);
|
||||
pass_encoder.dispatch(@floatToInt(u32, @ceil(@as(f32, num_particle) / 64)), 1, 1);
|
||||
pass_encoder.end();
|
||||
pass_encoder.release();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d480d7685d89f75c105fab7fd43af109ab072b14
|
||||
Subproject commit 1f4ff13c7425f085d44ae2130114ae9f0fc42f9e
|
||||
8
glfw/.github/workflows/ci.yml
vendored
8
glfw/.github/workflows/ci.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
sudo apt install xz-utils
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: x86_64-linux -> x86_64-macos
|
||||
run: zig build test -Dtarget=x86_64-macos
|
||||
env:
|
||||
|
|
@ -48,10 +48,10 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.1600+af844931b.zip" -OutFile "C:\zig.zip"
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c.zip" -OutFile "C:\zig.zip"
|
||||
cd C:\
|
||||
7z x zig.zip
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.1600+af844931b\"
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c\"
|
||||
- name: x86_64-windows -> x86_64-macos
|
||||
run: zig build test -Dtarget=x86_64-macos
|
||||
env:
|
||||
|
|
@ -76,7 +76,7 @@ jobs:
|
|||
run: |
|
||||
brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
|
||||
brew install xz
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: test
|
||||
run: zig build test
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ fn determineSdkRoot(allocator: std.mem.Allocator, org: []const u8, name: []const
|
|||
}
|
||||
|
||||
fn exec(allocator: std.mem.Allocator, argv: []const []const u8, cwd: []const u8) !void {
|
||||
const child = try std.ChildProcess.init(argv, allocator);
|
||||
var child = std.ChildProcess.init(argv, allocator);
|
||||
child.cwd = cwd;
|
||||
_ = try child.spawnAndWait();
|
||||
}
|
||||
|
|
|
|||
20
gpu-dawn/.github/workflows/ci.yml
vendored
20
gpu-dawn/.github/workflows/ci.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
sudo apt install xz-utils
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (debug)
|
||||
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
sudo apt install xz-utils
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (release-fast)
|
||||
|
|
@ -58,7 +58,7 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
sudo apt install xz-utils
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (debug)
|
||||
|
|
@ -79,7 +79,7 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
sudo apt install xz-utils
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (release-fast)
|
||||
|
|
@ -102,10 +102,10 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.1600+af844931b.zip" -OutFile "C:\zig.zip"
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c.zip" -OutFile "C:\zig.zip"
|
||||
cd C:\
|
||||
7z x zig.zip
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.1600+af844931b\"
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c\"
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (debug)
|
||||
|
|
@ -130,10 +130,10 @@ jobs:
|
|||
- name: Setup Zig
|
||||
run: |
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.1600+af844931b.zip" -OutFile "C:\zig.zip"
|
||||
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c.zip" -OutFile "C:\zig.zip"
|
||||
cd C:\
|
||||
7z x zig.zip
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.1600+af844931b\"
|
||||
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.2017+a0a2ce92c\"
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (release-fast)
|
||||
|
|
@ -157,7 +157,7 @@ jobs:
|
|||
run: |
|
||||
brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
|
||||
brew install xz
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (debug)
|
||||
|
|
@ -181,7 +181,7 @@ jobs:
|
|||
run: |
|
||||
brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
|
||||
brew install xz
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.1600+af844931b.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.2017+a0a2ce92c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
|
||||
- name: Clone mach-glfw
|
||||
run: rm libs/mach-glfw && git clone https://github.com/hexops/mach-glfw libs/mach-glfw
|
||||
- name: install (release-fast)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ fn ensureSubmodules(allocator: std.mem.Allocator) !void {
|
|||
if (std.process.getEnvVarOwned(allocator, "NO_ENSURE_SUBMODULES")) |no_ensure_submodules| {
|
||||
if (std.mem.eql(u8, no_ensure_submodules, "true")) return;
|
||||
} else |_| {}
|
||||
const child = try std.ChildProcess.init(&.{ "git", "submodule", "update", "--init", "--recursive" }, allocator);
|
||||
var child = std.ChildProcess.init(&.{ "git", "submodule", "update", "--init", "--recursive" }, allocator);
|
||||
child.cwd = thisDir();
|
||||
child.stderr = std.io.getStdErr();
|
||||
child.stdout = std.io.getStdOut();
|
||||
|
|
@ -442,7 +442,7 @@ fn gitClone(allocator: std.mem.Allocator, repository: []const u8, dir: []const u
|
|||
|
||||
fn downloadFile(allocator: std.mem.Allocator, target_file: []const u8, url: []const u8) !void {
|
||||
std.debug.print("downloading {s}..\n", .{url});
|
||||
const child = try std.ChildProcess.init(&.{ "curl", "-L", "-o", target_file, url }, allocator);
|
||||
var child = std.ChildProcess.init(&.{ "curl", "-L", "-o", target_file, url }, allocator);
|
||||
child.cwd = thisDir();
|
||||
child.stderr = std.io.getStdErr();
|
||||
child.stdout = std.io.getStdOut();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue