stages: - build - package default: before_script: - mkdir -p .cache - export GOPATH="$CI_PROJECT_DIR/.cache" cache: paths: - .cache .build-linux: &build-linux stage: build script: - go build -ldflags "-linkmode external -extldflags -static" -o gomuks artifacts: paths: - gomuks linux/amd64: <<: *build-linux image: dock.mau.dev/tulir/gomuks-build-docker:linux-amd64 linux/arm: <<: *build-linux image: dock.mau.dev/tulir/gomuks-build-docker:linux-arm linux/arm64: <<: *build-linux image: dock.mau.dev/tulir/gomuks-build-docker:linux-arm64 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 macos/amd64: stage: build tags: - macos - amd64 before_script: [] script: - go build -o gomuks - install_name_tool -change /usr/local/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3 gomuks - install_name_tool -add_rpath @executable_path gomuks - install_name_tool -add_rpath /usr/local/opt/libolm/lib gomuks - cp /usr/local/opt/libolm/lib/libolm.3.dylib . artifacts: paths: - gomuks - libolm.3.dylib macos/arm64: stage: build tags: - macos - arm64 before_script: - export LIBRARY_PATH=/opt/homebrew/lib - export CPATH=/opt/homebrew/include - export PATH=/opt/homebrew/bin:$PATH script: - go build -o gomuks - install_name_tool -change /opt/homebrew/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3 gomuks - install_name_tool -add_rpath @executable_path gomuks - install_name_tool -add_rpath /opt/homebrew/opt/libolm/lib gomuks - install_name_tool -add_rpath /usr/local/opt/libolm/lib gomuks - cp /opt/homebrew/opt/libolm/lib/libolm.3.dylib . artifacts: paths: - gomuks - libolm.3.dylib debian: image: debian stage: package dependencies: - linux/amd64 only: - tags script: - mkdir -p deb/usr/bin - cp gomuks deb/usr/bin/gomuks - chmod -R -s deb/DEBIAN && chmod -R 0755 deb/DEBIAN - dpkg-deb --build deb gomuks.deb artifacts: paths: - gomuks.deb