Add CI builds for linux arm and windows
This commit is contained in:
parent
2cebe3b5dc
commit
519c56ae2d
@ -1,20 +1,37 @@
|
|||||||
build:
|
default:
|
||||||
stage: build
|
before_script:
|
||||||
image: golang:alpine
|
- mkdir -p .cache
|
||||||
|
- export GOPATH="$CI_PROJECT_DIR/.cache"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .cache
|
- .cache
|
||||||
before_script:
|
|
||||||
- apk add --no-cache git build-base
|
build-linux: &build-linux
|
||||||
- mkdir -p .cache
|
stage: build
|
||||||
- export GOPATH="$CI_PROJECT_DIR/.cache"
|
|
||||||
script:
|
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
|
- go build -ldflags "-linkmode external -extldflags -static" -o gomuks
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- gomuks
|
- 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
|
||||||
|
Loading…
Reference in New Issue
Block a user