forked from input-output-hk/purescript-bridge
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
63 lines (46 loc) · 1.7 KB
/
Makefile
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
62
63
.PHONY: test develop test-all build-all build-test-all fix-files \
check-files ci clean
current-system := $(shell nix eval --impure --expr builtins.currentSystem)
NIX_BUILD:= nix -L --show-trace build
NIX_RUN:= nix -L --show-trace run
NIX_DEV:= nix -L --show-trace develop .\#default
develop:
$(NIX_DEV)
# Tests
test:
$(NIX_BUILD) .#test-all.${current-system}
test-rt:
$(NIX_BUILD) .#checks.${current-system}.purescript-bridge:test:roundtrip-test
test-all: test
# Build all
build-all:
$(NIX_BUILD) .#build-all.${current-system}
build-plutus-ledger-api-typelib:
$(NIX_BUILD) .#packages.${current-system}.plutus-ledger-api-typelib
build-sample-plutus-ledger-api-typelib:
$(NIX_BUILD) .#packages.${current-system}.sample-plutus-ledger-api-typelib
build-test-all: build-all test-all
# Fix files
fix-files: clean
$(NIX_RUN) .#$@.${current-system} $$PWD
# Check files
check-files:
$(NIX_BUILD) .#$@.${current-system}
update-all:
nix -L flake lock --update-input cardano-transaction-lib
nix -L --show-trace develop .#typelibNix -c make
nix -L --show-trace develop .#default -c make
# Run what CI would
ci: check-files build-all test-rt
# Clean local folder.
clean:
@ rm -rf dist-newstyle || true
@ rm -rf .psc-ide-port || true
@ rm -rf .spago || true
@ make -C ./roundtrip/RoundTripPurs clean || true
@ make -C ./nix/purescript-bridge-nix-spago clean || true
generate-plutus-ledger-api-typelib:
@ if [ -d plutus-ledger-api-typelib ]; then git rm -r --cached plutus-ledger-api-typelib; else echo "skip"; fi
@ if [ -d plutus-ledger-api-typelib ]; then rm -rf plutus-ledger-api-typelib; else echo "skip 1"; fi
@ cabal run cli -- generate-types
@ git add generated