diff --git a/.github/workflows/binary.yml b/.github/workflows/binary.yml index 5a95a58..2899779 100644 --- a/.github/workflows/binary.yml +++ b/.github/workflows/binary.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - zig-version: ["0.11.0"] + zig-version: ["master"] targets: - "x86-windows" - "x86_64-windows" @@ -43,7 +43,7 @@ jobs: run: | zig build -Dtarget=${{ matrix.targets }} -Doptimize=ReleaseSafe \ -Dgit_commit=${{ github.head_ref }}-${{ github.sha }} \ - -Dbuild_date=${{ env.BUILD_DATE }} + -Dbuild_date=${{ env.BUILD_DATE }} -Dis_ci=true # https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files tar -cvf zigcli.tar zig-out/bin/ - name: Upload @@ -58,7 +58,7 @@ jobs: strategy: fail-fast: false matrix: - zig-version: ["0.11.0"] + zig-version: ["master"] targets: - "x86_64-macos" - "aarch64-macos" diff --git a/build.zig b/build.zig index ca09165..0341a1f 100644 --- a/build.zig +++ b/build.zig @@ -170,22 +170,19 @@ fn makeCompileStep( const name = comptime source.name(); const path = comptime source.path(); if (std.mem.eql(u8, name, "night-shift") or std.mem.eql(u8, name, "dark-mode") or std.mem.eql(u8, name, "pidof")) { - if (target.getOsTag() != .macos) { + // if (target.getOsTag() != .macos) { + if (is_ci) { + // zig build -Dtarget=aarch64-macos will throw error + // error: warning(link): library not found for '-lobjc' + // warning(link): Library search paths: + // warning(link): framework not found for '-framework CoreBrightness' + // warning(link): Framework search paths: + // warning(link): /System/Library/PrivateFrameworks + // so disable this in CI environment. return null; } } - if (is_ci and std.mem.eql(u8, name, "night-shift")) { - // zig build -Dtarget=aarch64-macos will throw error - // error: warning(link): library not found for '-lobjc' - // warning(link): Library search paths: - // warning(link): framework not found for '-framework CoreBrightness' - // warning(link): Framework search paths: - // warning(link): /System/Library/PrivateFrameworks - // so disable this in CI environment. - return null; - } - const exe = b.addExecutable(.{ .name = name, .root_source_file = .{ .path = path ++ "/" ++ name ++ ".zig" },