aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-05-08 17:29:29 +0300
committerTulir Asokan <tulir@maunium.net>2020-05-08 17:29:29 +0300
commitba4efc6411df758c28b6f5564a61d00675c6da51 (patch)
tree32db4b2cd167ed697973af71544fb08141d815a2 /.gitlab-ci.yml
parente1b38bb20268a755ce63efb3e8894f983eedc02e (diff)
Add static build with e2ee
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml37
1 files changed, 8 insertions, 29 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 05097b8..0d681d7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,41 +1,20 @@
build:
stage: build
- image: debian:bullseye
- cache:
- paths:
- - .cache
- before_script:
- - apt-get update
- - apt-get install -y git libolm-dev golang-go
- - mkdir -p .cache
- - export GOPATH="$CI_PROJECT_DIR/.cache"
- script:
- - go build -o gomuks_linux_amd64
- artifacts:
- paths:
- - gomuks_linux_amd64
-
-build_static:
- stage: build
image: golang:alpine
cache:
paths:
- .cache
before_script:
+ - apk add --no-cache git build-base
- mkdir -p .cache
- export GOPATH="$CI_PROJECT_DIR/.cache"
- variables:
- CGO_ENABLED: "0"
script:
- - GOOS=linux GOARCH=amd64 go build -o gomuks_linux_amd64
- - GOOS=linux GOARCH=386 go build -o gomuks_linux_386
- - GOOS=linux GOARCH=arm go build -o gomuks_linux_arm
- - GOOS=linux GOARCH=arm64 go build -o gomuks_linux_arm64
- - GOOS=darwin GOARCH=amd64 go build -o gomuks_darwin_amd64
+ - git clone https://gitlab.matrix.org/matrix-org/olm.git
+ - cd olm
+ - CFLAGS=-static-libgcc CPPFLAGS="-static-libgcc -static-libstdc++" make static
+ - cp build/libolm.a /usr/lib/ && cp -a include/olm/ /usr/include/
+ - cd ..
+ - go build -ldflags "-linkmode external -extldflags -static" -o gomuks
artifacts:
paths:
- - gomuks_linux_amd64
- - gomuks_linux_386
- - gomuks_linux_arm
- - gomuks_linux_arm64
- - gomuks_darwin_amd64
+ - gomuks