-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
64 lines (54 loc) · 1.4 KB
/
Taskfile.yaml
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
64
# https://taskfile.dev
version: '3'
vars:
GO_LDFLAGS: '-ldflags "-w"'
tasks:
init:
prompt: This will install (or reinstall) the latest version of several programs... Do you want to continue?
cmds:
- git submodule update --init --recursive
- cargo install cbindgen
- go install mvdan.cc/gofumpt@latest
- go install golang.org/x/tools/cmd/goimports@latest
- go install honnef.co/go/tools/cmd/staticcheck@latest
lbcli:
dir: lbcli
cmds:
- task: c-ffi-v2
- go generate ./...
- task: go-fmt
- go build {{.GO_LDFLAGS}}
- task: go-lint
- staticcheck ./...
lbcli-install:
- task: lbcli
- cp ./lbcli/lbcli ~/.local/bin
lbgui:
dir: lbgui
cmds:
- task: c-ffi-v2
- task: go-fmt
- go build -tags noopengl {{.GO_LDFLAGS}}
- task: go-lint
go-fmt:
- goimports -w -l .
- gofumpt -w -l .
go-lint:
- go vet ./...
c-ffi-v2:
dir: lockbook/libs/lb/c_interface_v2
vars:
C_INTERFACE_HEADER: ../../../../lockbook_core.h
cmds:
- cargo build -q --release
- cbindgen src/lib.rs --config cbindgen.toml > {{.C_INTERFACE_HEADER}}
sources:
- ../**/*
- cbindgen.toml
generates:
- ../../../target/release/libc_interface_v2.a
- ./{{.C_INTERFACE_HEADER}}
clean:
- cd lockbook && cargo clean
- rm lockbook_core.h
- go clean -cache