forked from u-root/u-root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
130 lines (120 loc) · 3.6 KB
/
config.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: 2
templates:
golang-template:
&golang-template
docker:
- image: uroottest/test-image-amd64:v5.2.0
working_directory: /home/circleci/go/src/github.com/u-root/u-root
environment:
- UROOT_SOURCE: /home/circleci/go/src/github.com/u-root/u-root
- CGO_ENABLED: 0
# x7 all timeouts for QEMU VM tests since they run without KVM.
- UROOT_QEMU_TIMEOUT_X: 7
beefy-template:
&beefy-template
<<: *golang-template
resource_class: large
workflows:
version: 2
build_and_test:
jobs:
- test-tinygo
- test-build-tamago-riscv64
- test-build-tamago-arm
- race
- compile_cmds
- check_templates
- check_licenses
jobs:
test-tinygo:
<<: *beefy-template
steps:
- checkout
- run:
name: tinygo build and test commands
command: echo sooner but not yet docker run --rm -v ~/go:/home/tinygo/go tinygo/tinygo:0.26.0 bash -c 'cd go/src/github.com/u-root/u-root/cmds/core/cmp && tinygo test .'
no_output_timeout: 15m
test-build-tamago-arm:
docker:
- image: uroottest/test-image-tamago:v4.5.0
working_directory: /home/circleci/go/src/github.com/u-root/u-root
environment:
- UROOT_SOURCE: /home/circleci/go/src/github.com/u-root/u-root
- CGO_ENABLED: 0
steps:
- checkout
- run:
name: Test u-root tamago build
command: GOOS=tamago GOARCH=arm GOARM=7 go build ./pkg/dt/...
- run:
name: build armory-boot elf target
command: |
cd /home/circleci
git clone https://github.com/usbarmory/armory-boot.git
cd armory-boot
go version
BOOT=eMMC make elf
test-build-tamago-riscv64:
docker:
- image: uroottest/test-image-tamago:v4.5.0
working_directory: /home/circleci/go/src/github.com/u-root/u-root
environment:
- UROOT_SOURCE: /home/circleci/go/src/github.com/u-root/u-root
- CGO_ENABLED: 0
steps:
- checkout
- run:
name: Test u-root tamago build
command: GOOS=tamago GOARCH=riscv64 go build ./pkg/dt/...
race:
<<: *beefy-template
environment:
- UROOT_SOURCE: /home/circleci/go/src/github.com/u-root/u-root
- CGO_ENABLED: 1
steps:
- checkout
- run:
name: Race detector
command: go test -race -timeout=15m -p=1 -failfast ./cmds/... ./pkg/...
compile_cmds:
<<: *golang-template
steps:
- checkout
- run:
name: build all tools
command: |
cd cmds
go install -a ./...
cd ../tools
go install -a ./...
check_licenses:
<<: *golang-template
steps:
- checkout
- run:
name: Check licenses
command: go run tools/checklicenses/checklicenses.go -c
tools/checklicenses/config.json
check_templates:
<<: *golang-template
steps:
- checkout
- run:
name: Ensure that every template builds for a variety of options.
command: |
go build .
goruncmd="./u-root -stats-output-path=/tmp/stats.json"
$goruncmd minimal
$goruncmd core
$goruncmd coreboot-app
$goruncmd all
$goruncmd world
# Fails because of dups. Is this supposed to work?
#$goruncmd all core
#$goruncmd all core
GOOS=plan9 $goruncmd -defaultsh=/bbin/rush plan9
cat /tmp/stats.json
- store_artifacts:
name: Store build stats
path: /tmp/stats.json
destination: stats.json