mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-26 09:08:57 +03:00
ci: also use fast-flake-check for examples (#433)
This commit is contained in:
parent
f2b70c85d5
commit
ff6e2c1f24
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@ -45,7 +45,7 @@ jobs:
|
||||
name: crane
|
||||
authToken: ${{ github.ref == 'refs/heads/master' && secrets.CACHIX_AUTH_TOKEN || '' }}
|
||||
- name: flake checks
|
||||
run: nix develop --accept-flake-config --command ./ci/fast-flake-check.sh ${{ matrix.nixpkgs-override }} -- --keep-going
|
||||
run: nix develop --accept-flake-config --command ./ci/fast-flake-check.sh ${{ matrix.nixpkgs-override }}
|
||||
- name: extra tests
|
||||
run: nix develop --accept-flake-config ${{ matrix.nixpkgs-override }} --command ./extra-tests/test.sh
|
||||
|
||||
@ -87,8 +87,9 @@ jobs:
|
||||
for f in $(find examples -maxdepth 1 -mindepth 1 -type d ${{ matrix.filter }} | sort -u); do
|
||||
pushd "${f}"
|
||||
echo "validating ${f}"
|
||||
# NB: check the entire flake here, not just `.#checks`
|
||||
nix flake check --accept-flake-config --print-build-logs --override-input crane ../.. ${{ matrix.nixpkgs-override }}
|
||||
nix develop ../..# --accept-flake-config --command ../../ci/fast-flake-check.sh --override-input crane ../.. ${{ matrix.nixpkgs-override }}
|
||||
# NB: evaluate the rest flake here, but don't build anything
|
||||
nix flake check --no-build --accept-flake-config --print-build-logs --override-input crane ../.. ${{ matrix.nixpkgs-override }}
|
||||
popd
|
||||
done
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
curSystem=$(nix eval --raw --impure --expr builtins.currentSystem)
|
||||
|
||||
nixEvalJobsArgs=()
|
||||
while [[ $# -ge 0 ]]; do
|
||||
while [[ $# -gt 0 ]]; do
|
||||
arg="$1"
|
||||
shift 1
|
||||
|
||||
|
@ -32,9 +32,8 @@
|
||||
];
|
||||
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
|
||||
in
|
||||
{
|
||||
packages.default = craneLib.buildPackage {
|
||||
|
||||
my-crate = craneLib.buildPackage {
|
||||
src = craneLib.cleanCargoSource (craneLib.path ./.);
|
||||
|
||||
strictDeps = true;
|
||||
@ -47,6 +46,16 @@
|
||||
pkgsCross.mingwW64.windows.pthreads
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
inherit my-crate;
|
||||
default = my-crate;
|
||||
};
|
||||
|
||||
checks = {
|
||||
inherit my-crate;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user