Skip to content

Commit a11559f

Browse files
committed
chore: merge branch release/perth_narrows into release/Quebec
2 parents babb441 + 7d8e71c commit a11559f

File tree

185 files changed

+9324
-2669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+9324
-2669
lines changed

.gitlab-ci.yml

Lines changed: 83 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ stages:
3232

3333
.rules-branch-and-MR-always:
3434
rules:
35-
- if: $CI_COMMIT_BRANCH || $CI_PIPELINE_SOURCE == "merge_request_event"
35+
- if: $CI_COMMIT_BRANCH || $CI_PIPELINE_SOURCE == "merge_request_event"
3636
when: always
3737
allow_failure: false
3838
- when: never
@@ -54,6 +54,28 @@ stages:
5454
allow_failure: true
5555
- when: never
5656

57+
.rules-branch-manual-MR-and-devel-always:
58+
rules:
59+
- if: $CI_COMMIT_BRANCH == "devel" || $CI_PIPELINE_SOURCE == "merge_request_event"
60+
when: always
61+
allow_failure: false
62+
- if: $CI_COMMIT_BRANCH
63+
when: manual
64+
allow_failure: true
65+
- when: never
66+
67+
.after-script-code-coverage:
68+
after_script:
69+
- go get github.com/boumenot/gocover-cobertura
70+
- go run github.com/boumenot/gocover-cobertura < /tmp/coverage.out > coverage.xml
71+
- "go tool cover -func=/tmp/coverage.out | grep total:"
72+
coverage: '/total:.*\(statements\).*\d+\.\d+%/'
73+
artifacts:
74+
reports:
75+
coverage_report:
76+
coverage_format: cobertura
77+
path: coverage.xml
78+
5779
# Stage: TEST
5880

5981
lint:
@@ -65,46 +87,62 @@ lint:
6587
tags:
6688
- medium
6789

68-
test-linux:
90+
91+
.test-base:
6992
stage: test
70-
extends:
71-
- .rules-branch-manual-MR-always
7293
script:
7394
- make test
95+
96+
test-linux:
97+
extends:
98+
- .test-base
99+
- .rules-branch-manual-MR-and-devel-always
100+
- .after-script-code-coverage
74101
tags:
75102
- medium
76103

77104
test-linux-race:
78-
stage: test
79105
extends:
106+
- test-linux
80107
- .rules-branch-and-MR-manual
81108
script:
82109
- make test-race
83-
tags:
84-
- medium
85110

86111
test-integration:
87-
stage: test
88112
extends:
89-
- .rules-branch-manual-MR-always
113+
- test-linux
90114
script:
91115
- make test-integration
92116
tags:
93117
- large
94118

95119
test-integration-race:
96-
stage: test
97120
extends:
121+
- test-integration
98122
- .rules-branch-and-MR-manual
99123
script:
100124
- make test-integration-race
125+
126+
127+
.windows-base:
128+
before_script:
129+
- export GOROOT=/c/Go1.18
130+
- export PATH=$GOROOT/bin:$PATH
131+
- export GOARCH=amd64
132+
- export GOPATH=~/go18
133+
- export GO111MODULE=on
134+
- export PATH=$GOPATH/bin:$PATH
135+
- export MSYSTEM=
101136
tags:
102-
- large
137+
- windows-bridge
103138

104-
dependency-updates:
139+
test-windows:
140+
extends:
141+
- .rules-branch-manual-MR-always
142+
- .windows-base
105143
stage: test
106144
script:
107-
- make updates
145+
- make test
108146

109147
# Stage: BUILD
110148

@@ -120,31 +158,20 @@ dependency-updates:
120158
when: manual
121159
allow_failure: true
122160
- when: never
123-
before_script:
124-
- mkdir -p .cache/bin
125-
- export PATH=$(pwd)/.cache/bin:$PATH
126-
- export GOPATH="$CI_PROJECT_DIR/.cache"
127-
- export PATH=$PATH:$QT6DIR/bin
128-
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
129-
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
130161
script:
131162
- make build
132163
- git diff && git diff-index --quiet HEAD
133164
- make vault-editor
134165
artifacts:
135-
# Note: The latest artifacts for refs are locked against deletion, and kept
136-
# regardless of the expiry time. Introduced in GitLab 13.0 behind a
137-
# disabled feature flag, and made the default behavior in GitLab 13.4.
138166
expire_in: 1 day
139167
when: always
168+
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
140169
paths:
141170
- bridge_*.tgz
142171
- vault-editor
143-
tags:
144-
- large
145172

146-
build-linux:
147-
extends: .build-base
173+
174+
.linux-build-setup:
148175
image: gitlab.protontech.ch:4567/go/bridge-internal:qt6
149176
variables:
150177
VCPKG_DEFAULT_BINARY_CACHE: ${CI_PROJECT_DIR}/.cache
@@ -153,19 +180,29 @@ build-linux:
153180
paths:
154181
- .cache
155182
when: 'always'
156-
artifacts:
157-
name: "bridge-linux-$CI_COMMIT_SHORT_SHA"
183+
before_script:
184+
- mkdir -p .cache/bin
185+
- export PATH=$(pwd)/.cache/bin:$PATH
186+
- export GOPATH="$CI_PROJECT_DIR/.cache"
187+
- export PATH=$PATH:$QT6DIR/bin
188+
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
189+
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
190+
tags:
191+
- large
192+
193+
build-linux:
194+
extends:
195+
- .build-base
196+
- .linux-build-setup
158197

159198
build-linux-qa:
160-
extends: build-linux
199+
extends:
200+
- build-linux
161201
variables:
162202
BUILD_TAGS: "build_qa"
163-
artifacts:
164-
name: "bridge-linux-qa-$CI_COMMIT_SHORT_SHA"
165203

166204

167-
.build-darwin-base:
168-
extends: .build-base
205+
.darwin-build-setup:
169206
before_script:
170207
- export PATH=/usr/local/bin:$PATH
171208
- export PATH=/usr/local/opt/git/bin:$PATH
@@ -177,30 +214,22 @@ build-linux-qa:
177214
- export CGO_CPPFLAGS='-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-builtin-requires-header'
178215
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
179216
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
180-
script:
181-
- go version
182-
- make build-nogui
183-
- git diff && git diff-index --quiet HEAD
184-
- make vault-editor
185217
cache: {}
186218
tags:
187219
- macOS
188220

189221
build-darwin:
190-
extends: .build-darwin-base
191-
artifacts:
192-
name: "bridge-darwin-$CI_COMMIT_SHORT_SHA"
222+
extends:
223+
- .build-base
224+
- .darwin-build-setup
193225

194226
build-darwin-qa:
195-
extends: .build-darwin-base
227+
extends:
228+
- build-darwin
196229
variables:
197230
BUILD_TAGS: "build_qa"
198-
artifacts:
199-
name: "bridge-darwin-qa-$CI_COMMIT_SHORT_SHA"
200-
201231

202-
.build-windows-base:
203-
extends: .build-base
232+
.windows-build-setup:
204233
before_script:
205234
- export GOROOT=/c/Go1.18/
206235
- export PATH=$GOROOT/bin:$PATH
@@ -214,23 +243,19 @@ build-darwin-qa:
214243
- export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:$PATH"
215244
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
216245
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
217-
script:
218-
- make build-nogui
219-
- git diff && git diff-index --quiet HEAD
220-
- make vault-editor
246+
cache: {}
221247
tags:
222248
- windows-bridge
223249

224250
build-windows:
225-
extends: .build-windows-base
226-
artifacts:
227-
name: "bridge-windows-$CI_COMMIT_SHORT_SHA"
251+
extends:
252+
- .build-base
253+
- .windows-build-setup
228254

229255
build-windows-qa:
230-
extends: .build-windows-base
256+
extends:
257+
- build-windows
231258
variables:
232259
BUILD_TAGS: "build_qa"
233-
artifacts:
234-
name: "bridge-windows-qa-$CI_COMMIT_SHORT_SHA"
235260

236261
# TODO: PUT BACK ALL THE JOBS! JUST DID THIS FOR NOW TO GET CI WORKING AGAIN...

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ issues:
2323
- path: _test\.go
2424
linters:
2525
- dupl
26-
- funlen
2726
- gochecknoglobals
2827
- gochecknoinits
2928
- gosec
@@ -32,7 +31,6 @@ issues:
3231
- path: test
3332
linters:
3433
- dupl
35-
- funlen
3634
- gochecknoglobals
3735
- gochecknoinits
3836
- gosec
@@ -64,7 +62,6 @@ linters:
6462
- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false]
6563
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false]
6664
- dupl # Tool for code clone detection [fast: true, auto-fix: false]
67-
- funlen # Tool for detection of long functions [fast: true, auto-fix: false]
6865
- gochecknoglobals # Checks that no globals are present in Go code [fast: true, auto-fix: false]
6966
- gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false]
7067
- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]

COPYING_NOTES.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Proton Mail Bridge includes the following 3rd party software:
2626
* [gluon](https://github.com/ProtonMail/gluon) available under [license](https://github.com/ProtonMail/gluon/blob/master/LICENSE)
2727
* [go-autostart](https://github.com/ProtonMail/go-autostart) available under [license](https://github.com/ProtonMail/go-autostart/blob/master/LICENSE)
2828
* [go-proton-api](https://github.com/ProtonMail/go-proton-api) available under [license](https://github.com/ProtonMail/go-proton-api/blob/master/LICENSE)
29-
* [go-rfc5322](https://github.com/ProtonMail/go-rfc5322) available under [license](https://github.com/ProtonMail/go-rfc5322/blob/master/LICENSE)
3029
* [gopenpgp](https://github.com/ProtonMail/gopenpgp/v2) available under [license](https://github.com/ProtonMail/gopenpgp/v2/blob/master/LICENSE)
3130
* [goquery](https://github.com/PuerkitoBio/goquery) available under [license](https://github.com/PuerkitoBio/goquery/blob/master/LICENSE)
3231
* [ishell](https://github.com/abiosoft/ishell) available under [license](https://github.com/abiosoft/ishell/blob/master/LICENSE)
@@ -53,6 +52,7 @@ Proton Mail Bridge includes the following 3rd party software:
5352
* [html2text](https://github.com/jaytaylor/html2text) available under [license](https://github.com/jaytaylor/html2text/blob/master/LICENSE)
5453
* [go-keychain](https://github.com/keybase/go-keychain) available under [license](https://github.com/keybase/go-keychain/blob/master/LICENSE)
5554
* [dns](https://github.com/miekg/dns) available under [license](https://github.com/miekg/dns/blob/master/LICENSE)
55+
* [memory](https://github.com/pbnjay/memory) available under [license](https://github.com/pbnjay/memory/blob/master/LICENSE)
5656
* [errors](https://github.com/pkg/errors) available under [license](https://github.com/pkg/errors/blob/master/LICENSE)
5757
* [profile](https://github.com/pkg/profile) available under [license](https://github.com/pkg/profile/blob/master/LICENSE)
5858
* [logrus](https://github.com/sirupsen/logrus) available under [license](https://github.com/sirupsen/logrus/blob/master/LICENSE)
@@ -76,8 +76,9 @@ Proton Mail Bridge includes the following 3rd party software:
7676
* [readline](https://github.com/abiosoft/readline) available under [license](https://github.com/abiosoft/readline/blob/master/LICENSE)
7777
* [levenshtein](https://github.com/agext/levenshtein) available under [license](https://github.com/agext/levenshtein/blob/master/LICENSE)
7878
* [cascadia](https://github.com/andybalholm/cascadia) available under [license](https://github.com/andybalholm/cascadia/blob/master/LICENSE)
79-
* [antlr](https://github.com/antlr/antlr4/runtime/Go/antlr) available under [license](https://github.com/antlr/antlr4/runtime/Go/antlr/blob/master/LICENSE)
8079
* [go-textseg](https://github.com/apparentlymart/go-textseg/v13) available under [license](https://github.com/apparentlymart/go-textseg/v13/blob/master/LICENSE)
80+
* [sonic](https://github.com/bytedance/sonic) available under [license](https://github.com/bytedance/sonic/blob/master/LICENSE)
81+
* [base64x](https://github.com/chenzhuoyu/base64x) available under [license](https://github.com/chenzhuoyu/base64x/blob/master/LICENSE)
8182
* [test](https://github.com/chzyer/test) available under [license](https://github.com/chzyer/test/blob/master/LICENSE)
8283
* [circl](https://github.com/cloudflare/circl) available under [license](https://github.com/cloudflare/circl/blob/master/LICENSE)
8384
* [go-md2man](https://github.com/cpuguy83/go-md2man/v2) available under [license](https://github.com/cpuguy83/go-md2man/v2/blob/master/LICENSE)
@@ -88,6 +89,7 @@ Proton Mail Bridge includes the following 3rd party software:
8889
* [go-windows](https://github.com/elastic/go-windows) available under [license](https://github.com/elastic/go-windows/blob/master/LICENSE)
8990
* [go-textwrapper](https://github.com/emersion/go-textwrapper) available under [license](https://github.com/emersion/go-textwrapper/blob/master/LICENSE)
9091
* [go-vcard](https://github.com/emersion/go-vcard) available under [license](https://github.com/emersion/go-vcard/blob/master/LICENSE)
92+
* [fgprof](https://github.com/felixge/fgprof) available under [license](https://github.com/felixge/fgprof/blob/master/LICENSE)
9193
* [go-shlex](https://github.com/flynn-archive/go-shlex) available under [license](https://github.com/flynn-archive/go-shlex/blob/master/LICENSE)
9294
* [sse](https://github.com/gin-contrib/sse) available under [license](https://github.com/gin-contrib/sse/blob/master/LICENSE)
9395
* [gin](https://github.com/gin-gonic/gin) available under [license](https://github.com/gin-gonic/gin/blob/master/LICENSE)
@@ -97,13 +99,15 @@ Proton Mail Bridge includes the following 3rd party software:
9799
* [validator](https://github.com/go-playground/validator/v10) available under [license](https://github.com/go-playground/validator/v10/blob/master/LICENSE)
98100
* [uuid](https://github.com/gofrs/uuid) available under [license](https://github.com/gofrs/uuid/blob/master/LICENSE)
99101
* [protobuf](https://github.com/golang/protobuf) available under [license](https://github.com/golang/protobuf/blob/master/LICENSE)
102+
* [pprof](https://github.com/google/pprof) available under [license](https://github.com/google/pprof/blob/master/LICENSE)
100103
* [errwrap](https://github.com/hashicorp/errwrap) available under [license](https://github.com/hashicorp/errwrap/blob/master/LICENSE)
101104
* [go-immutable-radix](https://github.com/hashicorp/go-immutable-radix) available under [license](https://github.com/hashicorp/go-immutable-radix/blob/master/LICENSE)
102105
* [go-memdb](https://github.com/hashicorp/go-memdb) available under [license](https://github.com/hashicorp/go-memdb/blob/master/LICENSE)
103106
* [golang-lru](https://github.com/hashicorp/golang-lru) available under [license](https://github.com/hashicorp/golang-lru/blob/master/LICENSE)
104107
* [hcl](https://github.com/hashicorp/hcl/v2) available under [license](https://github.com/hashicorp/hcl/v2/blob/master/LICENSE)
105108
* [multierror](https://github.com/joeshaw/multierror) available under [license](https://github.com/joeshaw/multierror/blob/master/LICENSE)
106109
* [go](https://github.com/json-iterator/go) available under [license](https://github.com/json-iterator/go/blob/master/LICENSE)
110+
* [cpuid](https://github.com/klauspost/cpuid/v2) available under [license](https://github.com/klauspost/cpuid/v2/blob/master/LICENSE)
107111
* [go-urn](https://github.com/leodido/go-urn) available under [license](https://github.com/leodido/go-urn/blob/master/LICENSE)
108112
* [go-colorable](https://github.com/mattn/go-colorable) available under [license](https://github.com/mattn/go-colorable/blob/master/LICENSE)
109113
* [go-isatty](https://github.com/mattn/go-isatty) available under [license](https://github.com/mattn/go-isatty/blob/master/LICENSE)
@@ -114,22 +118,24 @@ Proton Mail Bridge includes the following 3rd party software:
114118
* [reflect2](https://github.com/modern-go/reflect2) available under [license](https://github.com/modern-go/reflect2/blob/master/LICENSE)
115119
* [tablewriter](https://github.com/olekukonko/tablewriter) available under [license](https://github.com/olekukonko/tablewriter/blob/master/LICENSE)
116120
* [go-toml](https://github.com/pelletier/go-toml/v2) available under [license](https://github.com/pelletier/go-toml/v2/blob/master/LICENSE)
121+
* [lz4](https://github.com/pierrec/lz4/v4) available under [license](https://github.com/pierrec/lz4/v4/blob/master/LICENSE)
117122
* [go-difflib](https://github.com/pmezard/go-difflib) available under [license](https://github.com/pmezard/go-difflib/blob/master/LICENSE)
118123
* [procfs](https://github.com/prometheus/procfs) available under [license](https://github.com/prometheus/procfs/blob/master/LICENSE)
119124
* [uniseg](https://github.com/rivo/uniseg) available under [license](https://github.com/rivo/uniseg/blob/master/LICENSE)
120125
* [blackfriday](https://github.com/russross/blackfriday/v2) available under [license](https://github.com/russross/blackfriday/v2/blob/master/LICENSE)
121126
* [pflag](https://github.com/spf13/pflag) available under [license](https://github.com/spf13/pflag/blob/master/LICENSE)
122127
* [bom](https://github.com/ssor/bom) available under [license](https://github.com/ssor/bom/blob/master/LICENSE)
128+
* [golang-asm](https://github.com/twitchyliquid64/golang-asm) available under [license](https://github.com/twitchyliquid64/golang-asm/blob/master/LICENSE)
123129
* [codec](https://github.com/ugorji/go/codec) available under [license](https://github.com/ugorji/go/codec/blob/master/LICENSE)
124130
* [tagparser](https://github.com/vmihailenco/tagparser/v2) available under [license](https://github.com/vmihailenco/tagparser/v2/blob/master/LICENSE)
125131
* [smetrics](https://github.com/xrash/smetrics) available under [license](https://github.com/xrash/smetrics/blob/master/LICENSE)
126132
* [go-cty](https://github.com/zclconf/go-cty) available under [license](https://github.com/zclconf/go-cty/blob/master/LICENSE)
133+
* [arch](https://golang.org/x/arch) available under [license](https://cs.opensource.google/go/x/arch/+/master:LICENSE)
127134
* [crypto](https://golang.org/x/crypto) available under [license](https://cs.opensource.google/go/x/crypto/+/master:LICENSE)
128135
* [mod](https://golang.org/x/mod) available under [license](https://cs.opensource.google/go/x/mod/+/master:LICENSE)
129136
* [sync](https://golang.org/x/sync) available under [license](https://cs.opensource.google/go/x/sync/+/master:LICENSE)
130137
* [tools](https://golang.org/x/tools) available under [license](https://cs.opensource.google/go/x/tools/+/master:LICENSE)
131138
* [genproto](https://google.golang.org/genproto)
132-
gopkg.in/yaml.v2
133139
gopkg.in/yaml.v3
134140
* [docker-credential-helpers](https://github.com/ProtonMail/docker-credential-helpers) available under [license](https://github.com/ProtonMail/docker-credential-helpers/blob/master/LICENSE)
135141
* [go-message](https://github.com/ProtonMail/go-message) available under [license](https://github.com/ProtonMail/go-message/blob/master/LICENSE)

0 commit comments

Comments
 (0)