Skip to content

Commit

Permalink
Switch to nix based CI
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Jul 20, 2024
1 parent 2848876 commit e0a5ab4
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,12 @@ jobs:
macos-precompiled:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- name: Install erlang and elixir
run: |
brew install erlang elixir
mix local.hex --force
mix local.rebar --force
- run: mix deps.get
- run: mix test --trace
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- run: nix develop --command mix deps.get
- run: nix develop --command mix test --trace

lint:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -160,6 +158,7 @@ jobs:
# mix dialyzer --plt
- run: mix deps.get
- run: mix clean && mix deep_clean
- run: mix compile --force --warnings-as-errors
- run: mix deps.unlock --check-unused
- run: mix format --check-formatted
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
description = "Elixir Development Environment";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
};

outputs = { self, nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
elixir
];
};
});
};
}
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ defmodule Vix.MixProject do
end

defp maybe_kino do
if Version.compare(System.version(), "1.13.0") in [:gt, :eq] do
if Version.compare(System.version(), "1.14.0") in [:gt, :eq] do
[{:kino, "~> 0.7", optional: true}]
else
[]
Expand Down

0 comments on commit e0a5ab4

Please sign in to comment.