Skip to content

Commit

Permalink
test on OCaml 5.2, improve nix flake (#245)
Browse files Browse the repository at this point in the history
* test on OCaml 5.2, improve nix flake

* disable gen_static for OCaml 5.2

the Pexp_fun ast changed
  • Loading branch information
anmonteiro authored Jun 23, 2024
1 parent fe44d24 commit 4170477
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ocamlVersion: [4_14, 5_0, 5_1]
ocamlVersion: [4_14, 5_1, 5_2]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v20
- uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
extra-substituters = https://anmonteiro.nix-cache.workers.dev
Expand Down
9 changes: 5 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
pkgs = nixpkgs.legacyPackages."${system}".extend (self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_5_2;
});
in
rec {
packages = pkgs.callPackage ./nix { nix-filter = nix-filter.lib; };
in
{
packages = packages // { default = packages.h2; };
defaultPackage = packages.h2;
devShells = rec {
devShells = {
default = pkgs.callPackage ./nix/shell.nix { inherit packages; };
release = default.override { release-mode = true; };
release = self.devShells.${system}.default.override { release-mode = true; };
};
});
}
10 changes: 8 additions & 2 deletions hpack/util/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
(executables
(names gen_huffman gen_static)
(executable
(name gen_huffman)
(libraries compiler-libs.common))

(executable
(name gen_static)
(libraries compiler-libs.common)
(enabled_if
(< %{ocaml_version} 5.2)))

0 comments on commit 4170477

Please sign in to comment.