-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
61 lines (51 loc) · 1.46 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
set positional-arguments
set shell := ["bash", "-cue"]
image := "ghcr.io/sdsc-ordes/fuzon"
root := justfile_directory()
## Build
# Build all packages.
build *args:
cargo build \
--manifest-path fuzon/Cargo.toml \
--release
# fix for openssl regression, see: https://github.com/openssl/openssl/pull/25367#issuecomment-2336747983
cargo update openssl-src --precise 300.3.1+3.3.1
maturin build \
--manifest-path pyfuzon/Cargo.toml \
--release \
{{args}}
# Install editable python package.
maturin-dev *args:
maturin develop \
--manifest-path pyfuzon/Cargo.toml \
--uv \
{{args}}
package-nix *args:
cd {{root}} && \
nix build "./tools/nix#fuzon" -o "package/fuzon" {{args}}
## Development
# Enter nix devshell.
develop-nix *args:
cd {{root}} \
&& cmd=("$@") \
&& { [ -n "${cmd:-}" ] || cmd=("zsh"); } \
&& nix develop ./tools/nix#default --command "${cmd[@]}"
# Enter development container
develop-docker:
docker run \
--user 1000:1000 \
-it \
-w "/workspace" \
--mount type=bind,source="$(pwd)",target=/workspace \
{{image}}:dev
## Maintenance
# Build images.
docker-build:
nix build -L "./tools/nix#images.dev" --out-link "target/image.dev" \
&& docker load < "target/image.dev"
nix build -L "./tools/nix#images.fuzon" --out-link "target/image.fuzon" \
&& docker load < "target/image.fuzon"
# Push images.
docker-push: docker-build
docker push {{image}}:dev
docker push {{image}}:fuzon