Commit b39a5f88 authored by Millian Poquet's avatar Millian Poquet

[ci] "nix-env -q" -> "nix-store --query --ref..."

parent cae760fa
......@@ -4,7 +4,7 @@ variables:
GIT_SUBMODULE_STRATEGY: none
stages:
- dependencies
- update_binary_cache
- build
- test
- deploy
......@@ -12,10 +12,9 @@ stages:
###############################################################################
# Dependencies stage
###############################################################################
update_batsim_dependencies:
stage: dependencies
update_binary_cache:
stage: update_binary_cache
script:
- ./ci/generate-dependencies-paths.bash
- ./ci/update-dependencies-cache.bash
###############################################################################
......@@ -29,7 +28,7 @@ build:
paths:
- /builds/batsim/batsim/build
dependencies:
- update_batsim_dependencies
- update_binary_cache
###############################################################################
# Test stage
......
#!/usr/bin/env nix-shell
#! nix-shell --pure -i bash ./default.nix
set -eu
# Remove previously generated dependencies
rm -f .nixdeps
# Retrieve the paths of the dependencies of the current shell
nix-env --query --out-path \
| sed -n -E 'sW^.*(/nix/store/[a-zA-Z0-9]{32}-[^ ]+).*$W\1Wp' \
> .nixdeps
# Print info
printf "Generated dependencies in .nixdeps:\n$(cat .nixdeps)\n"
......@@ -2,10 +2,8 @@
#! nix-shell -i bash ./default.nix
set -eu
# Avoid pushing everything on the binary cache
excluder='texlive|biber|pdftk|qpdf|pdfdiff|gitflow|cachix|nox|nix-2|dia|asymptote|direnv|yamldiff'
deps=$(cat .nixdeps | grep -E -v ${excluder})
printf "About to push paths:\n${deps}\n\n"
# (re)build up-to-date CI batsim package, push it on binary cache
nix-build ci/default.nix | cachix push batsim
# Push non-excluded paths to the remote cache
cachix push batsim $(echo ${deps} | tr '\n' ' ')
# Build up-to-date batsim_dev package, push it on binary cache
nix-build ${DATAMOVEPKGS:-~/datamovepkgs} -A batsim_dev | cachix push batsim
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment