stages: - frontend - build default: before_script: - mkdir -p .cache - export GOPATH="$CI_PROJECT_DIR/.cache" cache: paths: - .cache frontend: image: node:22-alpine stage: frontend cache: paths: - web/node_modules script: - cd web - npm install --legacy-peer-deps --include=dev - npm run build artifacts: paths: - web/dist expire_in: 1 hour .build-linux: &build-linux stage: build before_script: - export GO_LDFLAGS="-s -w -linkmode external -extldflags -static -X main.Tag=$CI_COMMIT_TAG -X main.Commit=$CI_COMMIT_SHA -X 'main.BuildTime=`date -Iseconds`'" script: - go build -ldflags "$GO_LDFLAGS" -o gomuks ./cmd/gomuks artifacts: paths: - gomuks dependencies: - frontend needs: - frontend linux/amd64: <<: *build-linux image: dock.mau.dev/tulir/gomuks-build-docker:linux-amd64 tags: - linux - amd64 linux/arm: <<: *build-linux image: dock.mau.dev/tulir/gomuks-build-docker:linux-arm tags: - linux - amd64 linux/arm64: <<: *build-linux image: dock.mau.dev/tulir/gomuks-build-docker:linux-arm64-native tags: - linux - arm64 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 - export GO_LDFLAGS="-X main.Tag=$CI_COMMIT_TAG -X main.Commit=$CI_COMMIT_SHA -X 'main.BuildTime=`date '-Iseconds'`'" script: - go build -ldflags "$GO_LDFLAGS" -o gomuks ./cmd/gomuks - install_name_tool -change /opt/homebrew/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3.dylib 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 dependencies: - frontend needs: - frontend