-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 1.85 KB
/
Copy pathci.yml
File metadata and controls
77 lines (66 loc) · 1.85 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Vet
run: go vet ./...
- name: Test
# The concurrency in the flow tracker is where the real bugs live, so
# the race detector is not optional here.
run: go test -race ./...
- name: Build
run: CGO_ENABLED=0 go build -trimpath ./...
web:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: web/package-lock.json
- run: npm ci
- run: npx tsc --noEmit
- run: npm run build
release-build:
needs: [go, web]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: web/package-lock.json
- uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Build the UI
run: cd web && npm ci && npm run build
- name: Build the daemon
# A single static binary with the UI embedded is the whole deployment
# story; this job proves that still holds on every push.
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath \
-ldflags "-s -w -X main.version=${GITHUB_SHA::7}" -o orbisd ./cmd/orbisd
./orbisd -version
ls -lh orbisd
- uses: actions/upload-artifact@v4
with:
name: orbisd-linux-amd64
path: orbisd
retention-days: 14