Skip to content

Commit

Permalink
ci: add darwin-nix
Browse files Browse the repository at this point in the history
  • Loading branch information
joshheinrichs-shopify committed Nov 25, 2024
1 parent e8df649 commit e8f5a4a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,36 @@ jobs:
- run: bundle exec rake compile -- --${{matrix.sys}}-system-libraries
- run: bundle exec rake test

darwin-nix:
needs: ["basic"]
strategy:
fail-fast: false
matrix:
sys: ["enable", "disable"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: cachix/install-nix-action@v30
- run: nix-shell --packages ruby bundler --run 'bundle install'
- if: matrix.sys == 'disable'
run: nix-shell --packages ruby bundler --run 'bundle exec rake compile -- --disable-system-libraries --disable-xml2-legacy'
- if: matrix.sys == 'disable'
run: nix-shell --packages ruby bundler --run 'bundle exec rake test'
# libxml2 headers are in a subdirectory for some reason so we need to add it to NIX_CFLAGS_COMPILE manually.
# there are a bunch of examples of other packages doing this in nixpkgs so this seems to be expected.
- if: matrix.sys == 'enable'
run: |
nix-shell \
--expr 'with import <nixpkgs> {}; mkShell { buildInputs = [ ruby bundler libxml2 libxslt ]; env.NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2"; }' \
--run 'bundle exec rake compile -- --enable-system-libraries --disable-xml2-legacy'
- if: matrix.sys == 'enable'
run: |
nix-shell \
--expr 'with import <nixpkgs> {}; mkShell { buildInputs = [ ruby bundler libxml2 libxslt ]; env.NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2"; }' \
--run 'bundle exec rake test'
windows:
needs: ["basic"]
strategy:
Expand Down

0 comments on commit e8f5a4a

Please sign in to comment.