Skip to content

Commit

Permalink
ci: is macOS gh action still broken?
Browse files Browse the repository at this point in the history
  • Loading branch information
giann committed Jan 23, 2025
1 parent a37d04d commit 86c9824
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 49 deletions.
80 changes: 39 additions & 41 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,48 @@ on:
branches: [main]

jobs:
# test-macos:
# runs-on: macos-latest
# steps:
# - name: Install homebrew
# run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# - name: Install pcre
# run: brew install pcre
# - name: Checkout project
# uses: actions/[email protected]
# - name: Checkout submodules
# run: git submodule update --init --recursive
# - name: Setup nightly Zig
# uses: mlugg/setup-zig@v1
# with:
# version: master
# - name: Build test ffi lib
# run: zig build-lib -dynamic tests/utils/foreign.zig && mv libforeign.* tests/utils/
test-macos:
runs-on: macos-latest
steps:
- name: Install homebrew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Checkout project
uses: actions/[email protected]
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup nightly Zig
uses: mlugg/setup-zig@v1
with:
version: master
- name: Build test ffi lib
run: zig build-lib -dynamic tests/utils/foreign.zig && mv libforeign.* tests/utils/

# - name: Run tests Debug
# run: zig build test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests Debug with JIT always on
# run: zig build -Djit_always_on test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
- name: Run tests Debug
run: zig build test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests Debug with JIT always on
run: zig build -Djit_always_on test
- name: Cleanup
run: rm -rf zig-out zig-cache

# - name: Run tests ReleaseSafe
# run: zig build -Doptimize=ReleaseSafe test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests ReleaseSafe with JIT always on
# run: zig build -Doptimize=ReleaseSafe -Djit_always_on test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
- name: Run tests ReleaseSafe
run: zig build -Doptimize=ReleaseSafe test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests ReleaseSafe with JIT always on
run: zig build -Doptimize=ReleaseSafe -Djit_always_on test
- name: Cleanup
run: rm -rf zig-out zig-cache

# - name: Run tests ReleaseFast
# run: zig build -Doptimize=ReleaseFast test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
# - name: Run tests ReleaseFast with JIT always on
# run: zig build -Doptimize=ReleaseFast -Djit_always_on test
# - name: Cleanup
# run: rm -rf zig-out zig-cache
- name: Run tests ReleaseFast
run: zig build -Doptimize=ReleaseFast test
- name: Cleanup
run: rm -rf zig-out zig-cache
- name: Run tests ReleaseFast with JIT always on
run: zig build -Doptimize=ReleaseFast -Djit_always_on test
- name: Cleanup
run: rm -rf zig-out zig-cache
test-linux:
runs-on: ubuntu-latest
steps:
Expand Down
23 changes: 15 additions & 8 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,19 @@ pub fn buildPcre2(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin
"vendors/pcre2/src/pcre2_chartables.c",
);

const flags: []const []const u8 = &.{
"-std=c99",
"-DHAVE_CONFIG_H",
"-DPCRE2_CODE_UNIT_WIDTH=8",
"-DPCRE2_STATIC",
};
const lib = b.addStaticLibrary(.{
.name = "pcre2",
.target = target,
.optimize = optimize,
});
lib.addIncludePath(b.path("src"));
lib.addIncludePath(b.path("vendors/pcre2/src"));
lib.addIncludePath(copyFiles.getDirectory().path(b, "vendors/pcre2/src"));
lib.addCSourceFiles(
.{
.files = &.{
Expand Down Expand Up @@ -598,14 +605,14 @@ pub fn buildPcre2(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin
"vendors/pcre2/src/pcre2_ucd.c",
"vendors/pcre2/src/pcre2_valid_utf.c",
"vendors/pcre2/src/pcre2_xclass.c",
"vendors/pcre2/src/pcre2_chartables.c",
},
.flags = &.{
"-std=c99",
"-DHAVE_CONFIG_H",
"-DPCRE2_CODE_UNIT_WIDTH=8",
"-DPCRE2_STATIC",
},
.flags = flags,
},
);
lib.addCSourceFile(
.{
.file = copyFiles.getDirectory().path(b, "vendors/pcre2/src/pcre2_chartables.c"),
.flags = flags,
},
);
lib.step.dependOn(&copyFiles.step);
Expand Down

0 comments on commit 86c9824

Please sign in to comment.