Skip to content

Commit

Permalink
update shell.nix, add GitHub workflow exercising Nix shell
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses4ever committed Jul 8, 2024
1 parent c5171d3 commit 7ba4bb2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Test our Nix setup"
on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- uses: rrbutani/use-nix-shell-action@v1
with:
file: shell.nix
- run: cabal update
- run: cabal build exe:gibbon
- run: cabal test gibbon --test-show-details=direct
24 changes: 10 additions & 14 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
let
moz_overlay = import (builtins.fetchGit {
name = "nixpkgs-mozilla-2023-11-13";
url = "https://github.com/mozilla/nixpkgs-mozilla";
ref = "refs/heads/master";
# Most recent commit hash as of 2023-11-13
rev = "6eabade97bc28d707a8b9d82ad13ef143836736e";
});
pkgs = import (builtins.fetchGit {
url = "https://github.com/nixos/nixpkgs/";
ref = "refs/tags/23.05";
}) { overlays = [ moz_overlay ]; };
ref = "refs/tags/24.05";
}) {};
stdenv = pkgs.overrideCC pkgs.stdenv pkgs.gcc7;
ghc = pkgs.haskell.compiler.ghc94;
rust = (pkgs.rustChannelOf { rustToolchain = ./gibbon-rts/rust-toolchain; }).rust;
clang = pkgs.clang_14;
llvm = pkgs.llvm_14;
# stuck with GCC 7 because Cilk was kicked out in GCC 8,
# need OpenCilk packaged in nixpkgs, see
# https://github.com/NixOS/nixpkgs/issues/144256

ghc = pkgs.haskell.compiler.ghc910;
clang = pkgs.clang_16;
llvm = pkgs.llvm_16;
gibbon_dir = builtins.toString ./.;
in
with pkgs;
Expand All @@ -25,7 +21,7 @@ in
# C/C++
clang llvm gcc7 boehmgc uthash
# Rust
rust
rustc cargo
# Racket
racket
# Other utilities
Expand Down

0 comments on commit 7ba4bb2

Please sign in to comment.