forked from Silverfish/proton-bridge
feat(GODT-2487): add windows test job and worker.
This commit is contained in:
122
.gitlab-ci.yml
122
.gitlab-ci.yml
@ -87,49 +87,62 @@ lint:
|
|||||||
tags:
|
tags:
|
||||||
- medium
|
- medium
|
||||||
|
|
||||||
test-linux:
|
|
||||||
|
.test-base:
|
||||||
stage: test
|
stage: test
|
||||||
extends:
|
|
||||||
- .rules-branch-manual-MR-and-devel-always
|
|
||||||
- .after-script-code-coverage
|
|
||||||
script:
|
script:
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
|
test-linux:
|
||||||
|
extends:
|
||||||
|
- .test-base
|
||||||
|
- .rules-branch-manual-MR-and-devel-always
|
||||||
|
- .after-script-code-coverage
|
||||||
tags:
|
tags:
|
||||||
- medium
|
- medium
|
||||||
|
|
||||||
test-linux-race:
|
test-linux-race:
|
||||||
stage: test
|
|
||||||
extends:
|
extends:
|
||||||
|
- test-linux
|
||||||
- .rules-branch-and-MR-manual
|
- .rules-branch-and-MR-manual
|
||||||
script:
|
script:
|
||||||
- make test-race
|
- make test-race
|
||||||
tags:
|
|
||||||
- medium
|
|
||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
stage: test
|
|
||||||
extends:
|
extends:
|
||||||
- .rules-branch-manual-MR-always
|
- test-linux
|
||||||
script:
|
script:
|
||||||
- make test-integration
|
- make test-integration
|
||||||
tags:
|
tags:
|
||||||
- large
|
- large
|
||||||
|
|
||||||
test-integration-race:
|
test-integration-race:
|
||||||
stage: test
|
|
||||||
extends:
|
extends:
|
||||||
|
- test-integration
|
||||||
- .rules-branch-and-MR-manual
|
- .rules-branch-and-MR-manual
|
||||||
script:
|
script:
|
||||||
- make test-integration-race
|
- make test-integration-race
|
||||||
tags:
|
|
||||||
- large
|
|
||||||
|
|
||||||
dependency-updates:
|
|
||||||
|
.windows-base:
|
||||||
|
before_script:
|
||||||
|
- export GOROOT=/c/Go1.18
|
||||||
|
- export PATH=$GOROOT/bin:$PATH
|
||||||
|
- export GOARCH=amd64
|
||||||
|
- export GOPATH=~/go18
|
||||||
|
- export GO111MODULE=on
|
||||||
|
- export PATH=$GOPATH/bin:$PATH
|
||||||
|
- export MSYSTEM=
|
||||||
|
tags:
|
||||||
|
- windows-bridge
|
||||||
|
|
||||||
|
test-windows:
|
||||||
|
extends:
|
||||||
|
- .rules-branch-manual-MR-always
|
||||||
|
- .windows-base
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- make updates
|
- make test
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Stage: BUILD
|
# Stage: BUILD
|
||||||
|
|
||||||
@ -145,31 +158,20 @@ dependency-updates:
|
|||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
- when: never
|
- when: never
|
||||||
before_script:
|
|
||||||
- mkdir -p .cache/bin
|
|
||||||
- export PATH=$(pwd)/.cache/bin:$PATH
|
|
||||||
- export GOPATH="$CI_PROJECT_DIR/.cache"
|
|
||||||
- export PATH=$PATH:$QT6DIR/bin
|
|
||||||
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
|
|
||||||
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
|
|
||||||
script:
|
script:
|
||||||
- make build
|
- make build
|
||||||
- git diff && git diff-index --quiet HEAD
|
- git diff && git diff-index --quiet HEAD
|
||||||
- make vault-editor
|
- make vault-editor
|
||||||
artifacts:
|
artifacts:
|
||||||
# Note: The latest artifacts for refs are locked against deletion, and kept
|
|
||||||
# regardless of the expiry time. Introduced in GitLab 13.0 behind a
|
|
||||||
# disabled feature flag, and made the default behavior in GitLab 13.4.
|
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
when: always
|
when: always
|
||||||
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||||
paths:
|
paths:
|
||||||
- bridge_*.tgz
|
- bridge_*.tgz
|
||||||
- vault-editor
|
- vault-editor
|
||||||
tags:
|
|
||||||
- large
|
|
||||||
|
|
||||||
build-linux:
|
|
||||||
extends: .build-base
|
.linux-build-setup:
|
||||||
image: gitlab.protontech.ch:4567/go/bridge-internal:qt6
|
image: gitlab.protontech.ch:4567/go/bridge-internal:qt6
|
||||||
variables:
|
variables:
|
||||||
VCPKG_DEFAULT_BINARY_CACHE: ${CI_PROJECT_DIR}/.cache
|
VCPKG_DEFAULT_BINARY_CACHE: ${CI_PROJECT_DIR}/.cache
|
||||||
@ -178,19 +180,29 @@ build-linux:
|
|||||||
paths:
|
paths:
|
||||||
- .cache
|
- .cache
|
||||||
when: 'always'
|
when: 'always'
|
||||||
artifacts:
|
before_script:
|
||||||
name: "bridge-linux-$CI_COMMIT_SHORT_SHA"
|
- mkdir -p .cache/bin
|
||||||
|
- export PATH=$(pwd)/.cache/bin:$PATH
|
||||||
|
- export GOPATH="$CI_PROJECT_DIR/.cache"
|
||||||
|
- export PATH=$PATH:$QT6DIR/bin
|
||||||
|
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
|
||||||
|
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
|
||||||
|
tags:
|
||||||
|
- large
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
extends:
|
||||||
|
- .build-base
|
||||||
|
- .linux-build-setup
|
||||||
|
|
||||||
build-linux-qa:
|
build-linux-qa:
|
||||||
extends: build-linux
|
extends:
|
||||||
|
- build-linux
|
||||||
variables:
|
variables:
|
||||||
BUILD_TAGS: "build_qa"
|
BUILD_TAGS: "build_qa"
|
||||||
artifacts:
|
|
||||||
name: "bridge-linux-qa-$CI_COMMIT_SHORT_SHA"
|
|
||||||
|
|
||||||
|
|
||||||
.build-darwin-base:
|
.darwin-build-setup:
|
||||||
extends: .build-base
|
|
||||||
before_script:
|
before_script:
|
||||||
- export PATH=/usr/local/bin:$PATH
|
- export PATH=/usr/local/bin:$PATH
|
||||||
- export PATH=/usr/local/opt/git/bin:$PATH
|
- export PATH=/usr/local/opt/git/bin:$PATH
|
||||||
@ -202,30 +214,22 @@ build-linux-qa:
|
|||||||
- export CGO_CPPFLAGS='-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-builtin-requires-header'
|
- export CGO_CPPFLAGS='-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-builtin-requires-header'
|
||||||
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
|
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
|
||||||
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
|
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
|
||||||
script:
|
|
||||||
- go version
|
|
||||||
- make build-nogui
|
|
||||||
- git diff && git diff-index --quiet HEAD
|
|
||||||
- make vault-editor
|
|
||||||
cache: {}
|
cache: {}
|
||||||
tags:
|
tags:
|
||||||
- macOS
|
- macOS
|
||||||
|
|
||||||
build-darwin:
|
build-darwin:
|
||||||
extends: .build-darwin-base
|
extends:
|
||||||
artifacts:
|
- .build-base
|
||||||
name: "bridge-darwin-$CI_COMMIT_SHORT_SHA"
|
- .darwin-build-setup
|
||||||
|
|
||||||
build-darwin-qa:
|
build-darwin-qa:
|
||||||
extends: .build-darwin-base
|
extends:
|
||||||
|
- build-darwin
|
||||||
variables:
|
variables:
|
||||||
BUILD_TAGS: "build_qa"
|
BUILD_TAGS: "build_qa"
|
||||||
artifacts:
|
|
||||||
name: "bridge-darwin-qa-$CI_COMMIT_SHORT_SHA"
|
|
||||||
|
|
||||||
|
.windows-build-setup:
|
||||||
.build-windows-base:
|
|
||||||
extends: .build-base
|
|
||||||
before_script:
|
before_script:
|
||||||
- export GOROOT=/c/Go1.18/
|
- export GOROOT=/c/Go1.18/
|
||||||
- export PATH=$GOROOT/bin:$PATH
|
- export PATH=$GOROOT/bin:$PATH
|
||||||
@ -239,23 +243,19 @@ build-darwin-qa:
|
|||||||
- export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:$PATH"
|
- export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:$PATH"
|
||||||
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
|
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
|
||||||
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
|
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
|
||||||
script:
|
cache: {}
|
||||||
- make build-nogui
|
|
||||||
- git diff && git diff-index --quiet HEAD
|
|
||||||
- make vault-editor
|
|
||||||
tags:
|
tags:
|
||||||
- windows-bridge
|
- windows-bridge
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
extends: .build-windows-base
|
extends:
|
||||||
artifacts:
|
- .build-base
|
||||||
name: "bridge-windows-$CI_COMMIT_SHORT_SHA"
|
- .windows-build-setup
|
||||||
|
|
||||||
build-windows-qa:
|
build-windows-qa:
|
||||||
extends: .build-windows-base
|
extends:
|
||||||
|
- build-windows
|
||||||
variables:
|
variables:
|
||||||
BUILD_TAGS: "build_qa"
|
BUILD_TAGS: "build_qa"
|
||||||
artifacts:
|
|
||||||
name: "bridge-windows-qa-$CI_COMMIT_SHORT_SHA"
|
|
||||||
|
|
||||||
# TODO: PUT BACK ALL THE JOBS! JUST DID THIS FOR NOW TO GET CI WORKING AGAIN...
|
# TODO: PUT BACK ALL THE JOBS! JUST DID THIS FOR NOW TO GET CI WORKING AGAIN...
|
||||||
|
|||||||
@ -109,6 +109,8 @@ func createSignedFiles(t *testing.T, root string, paths ...string) *crypto.KeyRi
|
|||||||
|
|
||||||
signFile(t, sumFile.Name(), kr)
|
signFile(t, sumFile.Name(), kr)
|
||||||
|
|
||||||
|
require.NoError(t, sumFile.Close())
|
||||||
|
|
||||||
return kr
|
return kr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user