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

Update Github CI & switch to nix based CI for macos #155

Merged
merged 4 commits into from
Jul 20, 2024
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
17 changes: 8 additions & 9 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 @@ -157,9 +155,10 @@ jobs:
run: |
mkdir -p priv/plts
mix deps.get
mix dialyzer --plt
# 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
Loading