Skip to content
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
41 changes: 13 additions & 28 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,24 @@ name: Nix CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
configure:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: echo "matrix=$(nixci gh-matrix --systems=x86_64-linux,aarch64-darwin | jq -c .)" >> $GITHUB_OUTPUT

nix:
runs-on: ${{ matrix.system }}
permissions:
contents: read
needs: configure
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
fail-fast: false
matrix:
os: [ubuntu-latest]
system: [x86_64-linux, aarch64-darwin]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: |
nixci \
nix build \
--extra-access-tokens "github.com=${{ secrets.GITHUB_TOKEN }}" \
build \
--systems "${{ matrix.system }}" \
.#default.${{ matrix.subflake}}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: numscript-wasm-${{ matrix.system }}
path: build/numscript.wasm
.#default
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
(with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);

in with pkgs; {
devShells.default = mkShell {
packages.default = mkShell {
name = "numscript-wasm";
packages = inputs;

Expand Down
Loading