Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nix build on darwin #2

Merged
merged 2 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,43 @@ jobs:
with:
name: unblob
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Nix Flake checks
run: nix flake check --keep-going --print-build-logs
- name: Check Nix formatting
run: nix fmt -- --check .
- name: Check Python formatting
run: nix develop -c -- black --check --diff --color .
- name: Ruff
run: nix develop -c -- ruff .

build-nix:
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64-linux
- os: ubuntu-latest
arch: aarch64-linux
- os: macos-latest
arch: x86_64-darwin
name: Build Nix - ${{ matrix.arch }}.${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: unblob
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Setup emulation
if: ${{ matrix.arch == 'aarch64-linux' }}
run: |
sudo apt update
sudo apt install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
mkdir -p ~/.config/nix
echo "system-features = aarch64-linux arm-linux" | sudo tee -a /etc/nix/nix.conf
- name: Nix Flake checks
run: |
nix flake check --keep-going --print-build-logs --option system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }}

pytest:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -154,7 +182,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [wheel-linux, wheel-macos, sdist]
needs: [build-nix, wheel-linux, wheel-macos, sdist]
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
];
};

buildInputs = [ pkgs.maturin ];
buildInputs = commonArgs.buildInputs ++ [ pkgs.maturin ];

strictDeps = true;
doCheck = false;
Expand Down