Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
934c2f34
Commit
934c2f34
authored
Feb 12, 2019
by
Tomas
Browse files
chore: Add .gitlab-ci.yml
parent
2c9ff51c
Pipeline
#18753
passed with stages
in 7 minutes and 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
934c2f34
image
:
privacybydesign/golang-dep:latest
cache
:
key
:
$CI_COMMIT_REF_SLUG
paths
:
-
vendor/
stages
:
-
test
-
build
variables
:
PACKAGE_NAME
:
github.com/privacybydesign/irmago
PLATFORMS
:
linux/amd64 darwin/amd64 windows/amd64 linux/arm linux/arm64
before_script
:
-
set -euxo pipefail
-
mkdir -p "$GOPATH/src/$(dirname "$PACKAGE_NAME")"
-
ln -s "$CI_PROJECT_DIR" "$GOPATH/src/$PACKAGE_NAME"
-
cd "$GOPATH/src/$PACKAGE_NAME"
-
dep ensure
unit_tests
:
stage
:
test
script
:
-
go test -tags=local_tests -p 1 ./...
binaries
:
stage
:
build
artifacts
:
paths
:
-
artifacts/*
script
:
-
mkdir -p artifacts
-
for PLATFORM in $PLATFORMS; do
export GOOS=${PLATFORM%/*};
export GOARCH=${PLATFORM#*/};
export CGO_ENABLED=0;
export GOARM=7;
OUTPUT_NAME="irma-${CI_COMMIT_REF_SLUG}-${GOOS}-${GOARCH}";
if [[ "$GOOS" == "windows" ]]; then
OUTPUT_NAME="${OUTPUT_NAME}.exe";
fi;
go build -a -ldflags '-extldflags "-static"' -o "artifacts/$OUTPUT_NAME" ./irma;
done;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment