Skip to content

Commit

Permalink
add CI shell and install node needed by github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaykarle committed Apr 18, 2024
1 parent a8e167a commit 15129c9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
use flake
if [ -z $DEV_SHELL_NAME ]; then
use flake
else
# running in CI
use flake ".#${DEV_SHELL_NAME}"
fi
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: "Test and Build"

on: [push]

env:
DEV_SHELL_NAME: CI

jobs:
build:
runs-on: ubuntu-latest
Expand Down
15 changes: 9 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@
default = self.packages.${system}.myapp;
};

devShells.default = pkgs.mkShell {
packages = nativeBuildInputs ++ buildInputs;
LD_LIBRARY_PATH = if pkgs.stdenv.isLinux then
"${pkgs.stdenv.cc.cc.lib}/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib:${pkgs.libGL}/lib:/nix/store/2if9iy5cy0bicwafllpa2aiq30v26app-glib-2.78.1/lib"
else
"$LD_LIBRARY_PATH";
devShells = {
default = pkgs.mkShell {
packages = nativeBuildInputs ++ buildInputs;
LD_LIBRARY_PATH = if pkgs.stdenv.isLinux then
"${pkgs.stdenv.cc.cc.lib}/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib:${pkgs.libGL}/lib:/nix/store/2if9iy5cy0bicwafllpa2aiq30v26app-glib-2.78.1/lib"
else
"$LD_LIBRARY_PATH";
};
CI = pkgs.mkShell { buildInputs = [ pkgs.nodejs-16_x ]; };
};
});
}

0 comments on commit 15129c9

Please sign in to comment.