Skip to content

Commit

Permalink
chore: maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
UndiedGamer committed Dec 25, 2024
1 parent ccf6b4c commit 7c17799
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,25 @@ jobs:
- os: ubuntu-latest
arch: x64
target: x86_64-unknown-linux-gnu
zig-target: x86_64-linux-gnu
- os: ubuntu-latest
arch: arm64
target: aarch64-unknown-linux-gnu
zig-target: aarch64-linux-gnu
# Windows builds
- os: windows-latest
arch: x64
target: x86_64-pc-windows-msvc
zig-target: x86_64-windows-msvc
- os: windows-latest
arch: arm64
target: aarch64-pc-windows-msvc
zig-target: aarch64-windows-msvc
# macOS builds
- os: macos-latest
arch: x64
arch: arm64
target: x86_64-apple-darwin
- os: macos-latest
arch: x86
target: i686-apple-darwin
zig-target: macos

steps:
- uses: actions/checkout@v4
Expand All @@ -62,7 +64,7 @@ jobs:
key: zig-${{ matrix.os }}-${{ matrix.arch }}-${{ env.ZIG_VERSION }}

- name: Build Zig Project
run: zig build -Doptimize=ReleaseFast -Dtarget=${{ matrix.target }} -freference-trac
run: zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.target }} -freference-trac

- name: Build Rust Project
run: cargo build --verbose --release --target ${{ matrix.target }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,25 @@ jobs:
- os: ubuntu-latest
arch: x64
target: x86_64-unknown-linux-gnu
zig-target: x86_64-linux-gnu
- os: ubuntu-latest
arch: arm64
target: aarch64-unknown-linux-gnu
zig-target: aarch64-linux-gnu
# Windows builds
- os: windows-latest
arch: x64
target: x86_64-pc-windows-msvc
zig-target: x86_64-windows-msvc
- os: windows-latest
arch: arm64
target: aarch64-pc-windows-msvc
zig-target: aarch64-windows-msvc
# macOS builds
- os: macos-latest
arch: x64
arch: arm64
target: x86_64-apple-darwin
- os: macos-latest
arch: x86
target: i686-apple-darwin
zig-target: macos

steps:
- uses: actions/checkout@v4
Expand All @@ -94,7 +96,7 @@ jobs:
key: zig-${{ matrix.os }}-${{ matrix.arch }}-${{ env.ZIG_VERSION }}

- name: Build Zig Project
run: zig build -Doptimize=ReleaseFast -Dtarget=${{ matrix.target }} -freference-trace
run: zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.zig-target }} -freference-trace

- name: Build Rust Project
run: cargo build --verbose --release --target ${{ matrix.target }}
1 change: 0 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pub fn build(b: *std.Build) void {
// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default
// step when running `zig build`).
exe.root_module.addImport("clipboard", b.dependency("clipboard", .{}).module("clipboard"));
b.installArtifact(exe);

// This *creates* a Run step in the build graph, to be executed when another
Expand Down
7 changes: 1 addition & 6 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
.clipboard = .{
.url = "https://github.com/dgv/clipboard/archive/refs/heads/main.zip",
.hash = "1220a91ef68f63a58a45d307795ee8629d1d6e93aa021cb1c869ecebe579f24393b6",
},
},
.dependencies = .{},
.paths = .{
"build.zig",
"build.zig.zon",
Expand Down
5 changes: 4 additions & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const FEntry = struct {
pub fn main() !void {
// Get command line arguments
const allocator = std.heap.page_allocator;
var args_it = std.process.args();
var args_it = std.process.argsWithAllocator(allocator) catch {
std.debug.print("Failed to get command line arguments\n", .{});
std.process.exit(1);
};
defer args_it.deinit();

// Skip the program name
Expand Down

0 comments on commit 7c17799

Please sign in to comment.