From af0f4bf34d9a80551d53cfd8d1a3c284e7c2d1e7 Mon Sep 17 00:00:00 2001 From: Gapodo Date: Mon, 5 Dec 2022 02:21:57 +0100 Subject: [PATCH] speed build :D --- .woodpecker/compliance-and-tests.yml | 70 +++++++++++++++------------- .woodpecker/release-version.yml | 11 ++++- Dockerfile.ci | 4 +- Makefile | 2 +- 4 files changed, 49 insertions(+), 38 deletions(-) diff --git a/.woodpecker/compliance-and-tests.yml b/.woodpecker/compliance-and-tests.yml index b58e937627..8fb8e903ea 100644 --- a/.woodpecker/compliance-and-tests.yml +++ b/.woodpecker/compliance-and-tests.yml @@ -9,44 +9,48 @@ variables: - &gitea_test_env_image 'gitea/test_env:linux-amd64' pipeline: - deps-backend: + dummy: image: *golang_image - pull: true - secrets: - - goproxy_override commands: - - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" - - make deps-backend + - exit 0 + # deps-backend: + # image: *golang_image + # pull: true + # secrets: + # - goproxy_override + # commands: + # - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + # - make deps-backend - security-check: - image: *golang_image - pull: true - secrets: - - goproxy_override - commands: - - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" - - make security-check + # security-check: + # image: *golang_image + # pull: true + # secrets: + # - goproxy_override + # commands: + # - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + # - make security-check - lint-backend: - image: *gitea_test_env_image - pull: true - secrets: - - goproxy_override - environment: - - TAGS=bindata sqlite sqlite_unlock_notify - - GOSUMDB=sum.golang.org - commands: - - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" - - make lint-backend + # lint-backend: + # image: *gitea_test_env_image + # pull: true + # secrets: + # - goproxy_override + # environment: + # - TAGS=bindata sqlite sqlite_unlock_notify + # - GOSUMDB=sum.golang.org + # commands: + # - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + # - make lint-backend - checks-backend: - image: *golang_image - pull: true - secrets: - - goproxy_override - commands: - - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" - - make --always-make checks-backend + # checks-backend: + # image: *golang_image + # pull: true + # secrets: + # - goproxy_override + # commands: + # - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + # - make --always-make checks-backend # fetch-tags: # image: docker:git diff --git a/.woodpecker/release-version.yml b/.woodpecker/release-version.yml index b7e156a2ca..4f0e149fdb 100644 --- a/.woodpecker/release-version.yml +++ b/.woodpecker/release-version.yml @@ -13,6 +13,13 @@ variables: - &xgo_image 'techknowlogick/xgo:go-1.19.x' - &buildx_plugin_image 'woodpeckerci/plugin-docker-buildx' - &gpgsign_plugin_image 'plugins/gpgsign:1' + # Docker and XGO platforms may vary in name (arm/v6/v7,...), please make sure, + # that all platforms listed in docker_platforms are also in make_platforms + # for the mapping look at docker/map-binaries.sh + #- &make_platforms 'linux/amd64,linux/arm64' + #- &docker_platforms 'linux/amd64,linux/arm64' + - &make_platforms 'linux/amd64' + - &docker_platforms 'linux/amd64' pipeline: fetch-tags: @@ -62,7 +69,7 @@ pipeline: TAGS: bindata sqlite sqlite_unlock_notify DEBIAN_FRONTEND: noninteractive UPXVERSION: 4.0.1 - LINUX_ARCHS: 'linux/amd64,linux/arm64' + LINUX_ARCHS: *make_platforms secrets: - goproxy_override @@ -85,7 +92,7 @@ pipeline: defaulttagname: main settings: dockerfile: Dockerfile.ci - platforms: linux/amd64,linux/arm64 + platforms: *docker_platforms registry: from_secret: domain tag: ${CI_COMMIT_TAG##v} diff --git a/Dockerfile.ci b/Dockerfile.ci index 55fd9cd248..9b40ef142e 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -22,8 +22,8 @@ ARG DEFAULTTAGNAME ARG CI_COMMIT_TAG ENV DEFAULTTAGNAME=${DEFAULTTAGNAME:-main} -COPY ./docker /docker -COPY ./dist /dist +COPY docker /docker/ +COPY dist /dist/ RUN /docker/map-binaries.sh /dist/binaries "true" forgejo ${CI_COMMIT_TAG##v} && \ /docker/map-binaries.sh /dist/contrib "false" environment-to-ini ${CI_COMMIT_TAG##v} diff --git a/Makefile b/Makefile index eef11bb534..28efb7cdca 100644 --- a/Makefile +++ b/Makefile @@ -790,7 +790,7 @@ release-check: | $(DIST_DIRS) .PHONY: release-compress release-compress: | $(DIST_DIRS) - cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && $(GO) run $(GXZ_PAGAGE) -k -9 $${file}; done; +# cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && $(GO) run $(GXZ_PAGAGE) -k -9 $${file}; done; .PHONY: release-sources release-sources: | $(DIST_DIRS)