aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-05-10 19:58:27 +0300
committerTulir Asokan <tulir@maunium.net>2020-05-10 19:59:05 +0300
commit519c56ae2d95779d6c38349f9d0a66bd65a0546a (patch)
treece79427d3e2ebfecf70e8be04ebe69db78a01088
parent2cebe3b5dc0a17f46cb5e4122a16ed73e9e90d97 (diff)
Add CI builds for linux arm and windows
-rw-r--r--.gitlab-ci.yml41
1 files changed, 29 insertions, 12 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0d681d7..3db4c16 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,20 +1,37 @@
-build:
- stage: build
- image: golang:alpine
- cache:
- paths:
- - .cache
+default:
before_script:
- - apk add --no-cache git build-base
- mkdir -p .cache
- export GOPATH="$CI_PROJECT_DIR/.cache"
+
+cache:
+ paths:
+ - .cache
+
+build-linux: &build-linux
+ stage: build
script:
- - 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
+
+build linux/amd64:
+ <<: *build-linux
+ image: dock.mau.dev/tulir/gomuks-build-docker:linux-amd64
+
+build linux/arm:
+ <<: *build-linux
+ image: dock.mau.dev/tulir/gomuks-build-docker:linux-arm
+
+build linux/arm64:
+ <<: *build-linux
+ image: dock.mau.dev/tulir/gomuks-build-docker:linux-arm64
+
+build windows/amd64:
+ image: dock.mau.dev/tulir/gomuks-build-docker:windows-amd64
+ stage: build
+ script:
+ - go build -ldflags "-linkmode external -extldflags -static" -o gomuks.exe
+ artifacts:
+ paths:
+ - gomuks.exe