Skip to content

Commit acd7460

Browse files
committed
wip
1 parent 6addf09 commit acd7460

3 files changed

Lines changed: 74 additions & 12 deletions

File tree

npins/sources.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/installl-real-nix.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
if [ -L /nix ]; then
6+
echo "fake nix detected, removing"
7+
rm /nix
8+
echo "installing real nix"
9+
sh <(curl --proto '=https' --tlsv1.2 -sSf -L https://nixos.org/nix/install) --no-daemon
10+
elif [ -d /nix ]; then
11+
echo "real nix detected, nothing to do"
12+
elif [ -a /nix ]; then
13+
echo "/nix exists but is neither directory no symlink, unsure what is happening"
14+
exit 99
15+
else
16+
echo "installing real nix"
17+
sh <(curl --proto '=https' --tlsv1.2 -sSf -L https://nixos.org/nix/install) --no-daemon
18+
fi

scripts/todo.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
# This script must be run from within a nix shell
6+
7+
# Step 1: check npins
8+
9+
npins verify
10+
11+
# Step 2: build dataplane
12+
13+
mkdir -p results
14+
nix build -f default.nix dataplane-tar --out-link results/dataplane.tar
15+
16+
# Step 3: import dataplane
17+
18+
docker import results/dataplane.tar dataplane:debug
19+
20+
# Step 4: cargo build
21+
22+
cargo build
23+
24+
# Step 5: cargo nextest run
25+
26+
# (one test is xfail)
27+
28+
cargo nextest run || true
29+
30+
# Step 6: cargo test run
31+
32+
# (one test is xfail)
33+
34+
cargo test || true
35+
36+
# Step 7: build test archive
37+
38+
nix build -f default.nix tests.all --out-link results/tests.all
39+
40+
cargo nextest run --archive-file results/tests.all --remap-workspace "$(pwd)"
41+
42+
# Step 8: build individual tests archive
43+
44+
nix build -f default.nix tests.pkg --out-link results/tests.pkg

0 commit comments

Comments
 (0)