Merge pull request #238 from zhaofengli/srcignore

Exclude more paths from colmena.src to reduce rebuilds
This commit is contained in:
Zhaofeng Li 2024-11-07 17:39:17 -07:00 committed by GitHub
commit b02d2d6ba7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 26 additions and 13 deletions

View file

@ -1,6 +1,5 @@
name: Build name: Build
on: on:
pull_request:
push: push:
jobs: jobs:
build: build:

View file

@ -1,7 +1,6 @@
name: Linters name: Linters
on: on:
pull_request:
push: push:
jobs: jobs:
linters: linters:

View file

@ -1,6 +1,5 @@
name: Tests name: Tests
on: on:
pull_request:
push: push:
jobs: jobs:
tests: tests:

18
.srcignore Normal file
View file

@ -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:

View file

@ -1,18 +1,16 @@
{ lib, stdenv, rustPlatform, installShellFiles, nix-eval-jobs }: { lib
, stdenv
, rustPlatform
, nix-gitignore
, installShellFiles
, nix-eval-jobs
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "colmena"; pname = "colmena";
version = "0.5.0-pre"; version = "0.5.0-pre";
src = lib.cleanSourceWith { src = nix-gitignore.gitignoreSource [ ./.srcignore ] ./.;
filter = name: type: !(type == "directory" && builtins.elem (baseNameOf name) [
".github"
"target"
"manual"
"integration-tests"
]);
src = lib.cleanSource ./.;
};
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;