Skip to content

Commit 46ff535

Browse files
committed
chore: add Taskfile to easily run FWCI related tasks
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
1 parent eacaa9e commit 46ff535

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

Taskfile.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
version: '3'
3+
4+
includes:
5+
fwci:
6+
taskfile: .firmwareci/Taskfile.yml
7+
dir: .firmwareci
8+
optional: true
9+
10+
tasks:
11+
#==========================
12+
# Compilation and building
13+
#==========================
14+
15+
goreleaser:build:
16+
desc: Use goreleaser to build the project
17+
cmds:
18+
- goreleaser build --auto-snapshot --clean
19+
20+
goreleaser:check:
21+
desc: Checks if goreleaser configuration is valid
22+
cmds:
23+
- goreleaser check
24+
25+
goreleaser:release-test:
26+
desc: Use goreleaser to test release the project
27+
cmds:
28+
- goreleaser release --draft --snapshot --clean
29+
sources:
30+
- .goreleaser.yaml
31+
- cmds/**/*.go
32+
- go.mod
33+
- go.sum
34+
- internal/**/*.go
35+
- pkg/**/*.go
36+
- protobuf/**/*.go
37+
- protobuf/**/*.proto
38+
- scripts/*
39+
env:
40+
GITHUB_TOKEN: 'dummy'
41+
42+
#=========
43+
# Testing
44+
#=========
45+
46+
fwci:validate:
47+
desc: Validate FWCI files
48+
cmds:
49+
- fwci validate
50+
51+
fwci:sync:
52+
desc: Synchronize the repository with the CI
53+
cmds:
54+
- yes | fwci sync --force
55+
sources:
56+
- ./.firmwareci/**/*.yaml
57+
- ./.firmwareci/**/Taskfile.yml
58+
- ./Taskfile.yml
59+
60+
fwci:job:
61+
desc: Submit a job
62+
deps:
63+
- fwci:sync
64+
vars:
65+
DUTCTL_PATH:
66+
sh: ls ./bin/dutctl_linux_amd64_*/dutctl
67+
FTI_PKG_PATH:
68+
sh: ls ./bin/dutctl_*_arm64.deb
69+
CONFIG: ./contrib/dutagent-cfg-example.yaml
70+
cmds:
71+
- fwci job --workflow="test-dutctl" "DUTCTL={{.DUTCTL_PATH}}" "REMOTE_PKG={{.FTI_PKG_PATH}}" "CONFIG={{.CONFIG}}"

0 commit comments

Comments
 (0)