Skip to content

Commit 2ab1f3a

Browse files
Add pre-built binary targets to release pipeline (#324)
* add new pre-built binaries * add pre-built targets to (roughly) match the restic pre-built binaries * remove go generate step and move mockery to Makefile * priority tests still not working on the CI runners * fix path on WIndows * add mocks to the repository * fix checksum file name * fix install.sh generated file * remove "hardfloat" from mips* package names * add open containers labels to images * add doc & source labels * finish setting up weekly image rebuilt
1 parent 233e4b8 commit 2ab1f3a

16 files changed

+3191
-91
lines changed

.github/workflows/build.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,13 @@ jobs:
4141
with:
4242
node-version: 18
4343

44-
- name: Build
45-
run: make build
44+
- name: Test
45+
run: make test-ci
4646
env:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848

49-
- name: Test
50-
run: "go test -v -race -short -coverprofile='coverage.out' ./..."
51-
shell: bash
49+
- name: Build
50+
run: make build
5251

5352
- name: Code coverage with codecov
5453
uses: codecov/codecov-action@v4

.gitignore

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
/.idea
22
/.vscode/*log
33

4-
# legacy python version
5-
/.pytest_cache
6-
/scripts/deploy.sh
7-
*.pyc
8-
/src/resticprofile.egg-info
9-
/**/.eggs
10-
114
.DS_Store
125
/examples/private
136
/build/restic*
@@ -21,8 +14,7 @@
2114
# test output
2215
/coverage.out
2316

24-
# mocks & mock binaries
25-
mocks
17+
# mock binaries
2618
/mock
2719
/echo
2820
/lock/locktest

.godownloader.yml

+60-35
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,77 @@
11
project_name: resticprofile
22

33
builds:
4-
- id: resticprofile_targz
4+
- id: darwin_targz
55
env:
66
- CGO_ENABLED=0
77
goos:
88
- darwin
9+
goarch:
10+
- amd64
11+
- arm64
12+
- id: freebsd_targz
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
916
- freebsd
17+
goarch:
18+
- "386"
19+
- amd64
20+
- arm
21+
goarm:
22+
- "6"
23+
- "7"
24+
- id: linux_targz
25+
env:
26+
- CGO_ENABLED=0
27+
goos:
1028
- linux
11-
- windows
1229
goarch:
1330
- "386"
1431
- amd64
1532
- arm
1633
- arm64
34+
- mips
35+
- mips64
36+
- mips64le
37+
- mipsle
38+
- ppc64
39+
- ppc64le
40+
- riscv64
41+
- s390x
1742
goarm:
1843
- "6"
1944
- "7"
20-
ignore:
21-
- goos: darwin
22-
goarch: "386"
23-
- goos: darwin
24-
goarch: arm
25-
- goos: freebsd
26-
goarch: arm64
27-
- goos: windows
28-
goarch: arm
29-
- goos: windows
30-
goarch: arm64
45+
- id: netbsd_targz
46+
env:
47+
- CGO_ENABLED=0
48+
goos:
49+
- netbsd
50+
goarch:
51+
- amd64
52+
- id: openbsd_targz
53+
env:
54+
- CGO_ENABLED=0
55+
goos:
56+
- openbsd
57+
goarch:
58+
- "386"
59+
- amd64
60+
- id: solaris_targz
61+
env:
62+
- CGO_ENABLED=0
63+
goos:
64+
- solaris
65+
goarch:
66+
- amd64
67+
- id: windows_targz
68+
env:
69+
- CGO_ENABLED=0
70+
goos:
71+
- windows
72+
goarch:
73+
- "386"
74+
- amd64
3175

3276
- id: resticprofile_zip
3377
env:
@@ -42,27 +86,8 @@ builds:
4286
ignore:
4387
- goos: darwin
4488
goarch: "386"
89+
- goos: windows
90+
goarch: arm
4591

46-
archives:
47-
- id: targz
48-
builds:
49-
- resticprofile_targz
50-
format: tar.gz
51-
52-
- id: zip
53-
builds:
54-
- resticprofile_zip
55-
format: zip
56-
5792
checksum:
58-
name_template: 'checksums.txt'
59-
60-
snapshot:
61-
name_template: "{{ .Tag }}-next"
62-
63-
changelog:
64-
sort: asc
65-
filters:
66-
exclude:
67-
- '^docs:'
68-
- '^test:'
93+
name_template: 'checksums.txt'

.goreleaser-docker-only.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ dockers:
3939
- build/restic-amd64
4040
- build/rclone-amd64
4141
build_flag_templates:
42+
- "--pull"
43+
- "--label=org.opencontainers.image.created={{.Date}}"
44+
- "--label=org.opencontainers.image.title={{.ProjectName}}"
45+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
46+
- "--label=org.opencontainers.image.version={{.Version}}"
4247
- "--platform=linux/amd64"
4348
- "--build-arg=ARCH=amd64"
44-
skip_push: true # remove after Sunday
49+
4550
- image_templates:
4651
- "creativeprojects/resticprofile:latest-arm64v8"
4752
- "creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8"
@@ -55,21 +60,24 @@ dockers:
5560
- build/restic-arm64
5661
- build/rclone-arm64
5762
build_flag_templates:
63+
- "--pull"
64+
- "--label=org.opencontainers.image.created={{.Date}}"
65+
- "--label=org.opencontainers.image.title={{.ProjectName}}"
66+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
67+
- "--label=org.opencontainers.image.version={{.Version}}"
5868
- "--platform=linux/arm64/v8"
5969
- "--build-arg=ARCH=arm64"
60-
skip_push: true # remove after Sunday
6170

6271
docker_manifests:
6372
- name_template: creativeprojects/resticprofile:{{ .RawVersion }}
6473
image_templates:
6574
- creativeprojects/resticprofile:{{ .RawVersion }}-amd64
6675
- creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8
67-
skip_push: true # remove after Sunday
76+
6877
- name_template: creativeprojects/resticprofile:latest
6978
image_templates:
7079
- creativeprojects/resticprofile:latest-amd64
7180
- creativeprojects/resticprofile:latest-arm64v8
72-
skip_push: true # remove after Sunday
7381

7482
release:
7583
disable: true

.goreleaser-snapshot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ dockers:
3838
- build/restic-amd64
3939
- build/rclone-amd64
4040
build_flag_templates:
41+
- "--pull"
42+
- "--label=org.opencontainers.image.created={{.Date}}"
43+
- "--label=org.opencontainers.image.title={{.ProjectName}}"
44+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
45+
- "--label=org.opencontainers.image.version={{.Version}}"
4146
- "--platform=linux/amd64"
4247
- "--build-arg=ARCH=amd64"
4348
- image_templates:
@@ -52,5 +57,10 @@ dockers:
5257
- build/restic-arm64
5358
- build/rclone-arm64
5459
build_flag_templates:
60+
- "--pull"
61+
- "--label=org.opencontainers.image.created={{.Date}}"
62+
- "--label=org.opencontainers.image.title={{.ProjectName}}"
63+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
64+
- "--label=org.opencontainers.image.version={{.Version}}"
5565
- "--platform=linux/arm64/v8"
5666
- "--build-arg=ARCH=arm64"

.goreleaser.yml

+37-7
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,47 @@ builds:
1717
- darwin
1818
- freebsd
1919
- linux
20+
- netbsd
21+
- openbsd
22+
- solaris
2023
- windows
2124
goarch:
2225
- "386"
2326
- amd64
2427
- arm
2528
- arm64
29+
- mips
30+
- mips64
31+
- mips64le
32+
- mipsle
33+
- ppc64
34+
- ppc64le
35+
- riscv64
36+
- s390x
2637
goarm:
2738
- "6"
2839
- "7"
2940
ignore:
30-
- goos: darwin
41+
- goos: freebsd
42+
goarch: arm64
43+
- goos: freebsd
44+
goarch: riscv64
45+
- goos: netbsd
3146
goarch: "386"
32-
- goos: darwin
47+
- goos: netbsd
3348
goarch: arm
34-
- goos: freebsd
49+
- goos: netbsd
3550
goarch: arm64
3651
- goos: windows
3752
goarch: arm
3853
- goos: windows
3954
goarch: arm64
55+
- goos: openbsd
56+
goarch: arm
57+
- goos: openbsd
58+
goarch: arm64
59+
- goos: openbsd
60+
goarch: ppc64
4061

4162
- id: resticprofile_zip
4263
env:
@@ -48,9 +69,6 @@ builds:
4869
- "386"
4970
- amd64
5071
- arm64
51-
ignore:
52-
- goos: darwin
53-
goarch: "386"
5472

5573
- id: resticprofile_no_self_update
5674
env:
@@ -86,17 +104,19 @@ archives:
86104
- id: targz
87105
builds:
88106
- resticprofile_targz
107+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
89108
format: tar.gz
90109

91110
- id: targz_no_self_update
92111
builds:
93112
- resticprofile_no_self_update
94-
name_template: '{{ .ProjectName }}_no_self_update_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
113+
name_template: '{{ .ProjectName }}_no_self_update_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
95114
format: tar.gz
96115

97116
- id: zip
98117
builds:
99118
- resticprofile_zip
119+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
100120
format: zip
101121

102122
checksum:
@@ -126,6 +146,11 @@ dockers:
126146
- build/restic-amd64
127147
- build/rclone-amd64
128148
build_flag_templates:
149+
- "--pull"
150+
- "--label=org.opencontainers.image.created={{.Date}}"
151+
- "--label=org.opencontainers.image.title={{.ProjectName}}"
152+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
153+
- "--label=org.opencontainers.image.version={{.Version}}"
129154
- "--platform=linux/amd64"
130155
- "--build-arg=ARCH=amd64"
131156
- image_templates:
@@ -141,6 +166,11 @@ dockers:
141166
- build/restic-arm64
142167
- build/rclone-arm64
143168
build_flag_templates:
169+
- "--pull"
170+
- "--label=org.opencontainers.image.created={{.Date}}"
171+
- "--label=org.opencontainers.image.title={{.ProjectName}}"
172+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
173+
- "--label=org.opencontainers.image.version={{.Version}}"
144174
- "--platform=linux/arm64/v8"
145175
- "--build-arg=ARCH=arm64"
146176

0 commit comments

Comments
 (0)