Skip to content

Commit

Permalink
updated to zig 0.12.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Oct 28, 2023
1 parent c6ba67e commit c7810c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: CI
name: CI Build

on: [push, pull_request]
on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target/
zig-out/
zig-cache/
zig-cache/
Cargo.lock
7 changes: 0 additions & 7 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
const std = @import("std");

pub fn build(b: *std.Build) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});

// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const optimize = b.standardOptimizeOption(.{});

const exe = b.addExecutable(.{
Expand Down
4 changes: 2 additions & 2 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn main() !void {
.mipsel, .mips => "MIPS",
else => @compileError("Unsupported CPU Architecture"),
};
try stdout.print("\nLet's have a look at your shiny {s} - {s} system! :)\n\n", .{arch, builtin.cpu.model.name});
try stdout.print("\nLet's have a look at your shiny {s} - {s} system! :)\n\n", .{ arch, builtin.cpu.model.name });

// Read HW linux info

Expand Down Expand Up @@ -53,6 +53,6 @@ pub fn main() !void {
try stdout.print("cmdline:\n", .{});
try stdoutFile.writeFileAll(cmdline, .{});

const uname = try std.ChildProcess.exec(.{ .allocator = allocator, .argv = &[_][]const u8{ "uname", "-a" } });
const uname = try std.ChildProcess.run(.{ .allocator = allocator, .argv = &[_][]const u8{ "uname", "-a" } });
try stdout.print("\nkernel:\n{s}", .{uname.stdout});
}

0 comments on commit c7810c3

Please sign in to comment.