Skip to content

Commit

Permalink
Merge pull request #238 from zhaofengli/srcignore
Browse files Browse the repository at this point in the history
Exclude more paths from colmena.src to reduce rebuilds
  • Loading branch information
zhaofengli authored Nov 8, 2024
2 parents 2c95c17 + ce1aa41 commit b02d2d6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Build
on:
pull_request:
push:
jobs:
build:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Linters

on:
pull_request:
push:
jobs:
linters:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Tests
on:
pull_request:
push:
jobs:
tests:
Expand Down
18 changes: 18 additions & 0 deletions .srcignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Exclusions from source distribution
#
# Files listed here will not be part of colmena.src

/.github
/CNAME
/renovate.json

/manual
/integration-tests

/nix
/default.nix
/flake-compat.nix
/package.nix
/shell.nix

# vim: set ft=gitignore:
18 changes: 8 additions & 10 deletions package.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{ lib, stdenv, rustPlatform, installShellFiles, nix-eval-jobs }:
{ lib
, stdenv
, rustPlatform
, nix-gitignore
, installShellFiles
, nix-eval-jobs
}:

rustPlatform.buildRustPackage rec {
pname = "colmena";
version = "0.5.0-pre";

src = lib.cleanSourceWith {
filter = name: type: !(type == "directory" && builtins.elem (baseNameOf name) [
".github"
"target"
"manual"
"integration-tests"
]);
src = lib.cleanSource ./.;
};
src = nix-gitignore.gitignoreSource [ ./.srcignore ] ./.;

cargoLock = {
lockFile = ./Cargo.lock;
Expand Down

0 comments on commit b02d2d6

Please sign in to comment.