Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it possible to run pipeline on arm64 #2232

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions .woodpecker/binaries.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
depends_on:
- test
- web

# TODO: upload build artifacts for pushes to ${CI_REPO_DEFAULT_BRANCH}
when:
event: tag
# enforce arm run
# # TODO: upload build artifacts for pushes to ${CI_REPO_DEFAULT_BRANCH}
# when:
# event: tag

variables:
- &golang_image 'golang:1.20.2'
Expand All @@ -28,19 +28,24 @@ steps:
commands:
- go mod vendor

cross-compile-server:
group: build
image: *xgo_image
pull: true
# cross-compile-server:
# group: build
# image: *xgo_image
# pull: true
# commands:
# - apt update
# - apt install -y tree
# - make cross-compile-server
# environment:
# PLATFORMS: linux|arm64/v8;linux|amd64;windows|amd64
# TAGS: bindata sqlite sqlite_unlock_notify netgo
# XGO_VERSION: *xgo_version
# TARGZ: '1'
dummy-compile-server:
image: bash
commands:
- apt update
- apt install -y tree
- make cross-compile-server
environment:
PLATFORMS: linux|arm64/v8;linux|amd64;windows|amd64
TAGS: bindata sqlite sqlite_unlock_notify netgo
XGO_VERSION: *xgo_version
TARGZ: '1'
- mkdir -p dist/server/linux/amd64 dist/server/linux/arm64 dist/server/windows/amd64 dist/agent/linux/amd64 dist/agent/linux/arm dist/agent/linux/arm64 dist/cli/linux/amd64 dist/cli/linux/arm dist/cli/linux/arm64
- touch dist/server/linux/amd64/woodpecker-server dist/server/linux/arm64/woodpecker-server dist/server/windows/amd64/woodpecker-server.exe dist/cli/linux/amd64/woodpecker-cli dist/cli/linux/arm/woodpecker-cli dist/cli/linux/arm64/woodpecker-cli dist/agent/linux/amd64/woodpecker-agent dist/agent/linux/arm/woodpecker-agent dist/agent/linux/arm64/woodpecker-agent dist/woodpecker-server_linux_amd64.tar.gz dist/woodpecker-server_linux_arm64.tar.gz dist/woodpecker-server_windows_amd64.tar.gz

build-agent:
group: build
Expand Down Expand Up @@ -71,15 +76,15 @@ steps:
- ls -la dist/*.*
- cat dist/checksums.txt

release:
image: plugins/github-release
secrets:
- source: github_token
target: github_release_api_key
settings:
files:
- dist/*.tar.gz
- dist/*.deb
- dist/*.rpm
- dist/checksums.txt
title: ${CI_COMMIT_TAG##v}
# release:
# image: plugins/github-release
# secrets:
# - source: github_token
# target: github_release_api_key
# settings:
# files:
# - dist/*.tar.gz
# - dist/*.deb
# - dist/*.rpm
# - dist/checksums.txt
# title: ${CI_COMMIT_TAG##v}
32 changes: 19 additions & 13 deletions .woodpecker/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ when:
- release/*

depends_on:
- test
- web

variables:
Expand Down Expand Up @@ -56,19 +55,26 @@ steps:
- pnpm install --frozen-lockfile
- pnpm build

cross-compile-server-preview:
image: *xgo_image
pull: true
# TODO: have an xgo arm image
# cross-compile-server-preview:
# image: *xgo_image
# pull: true
# commands:
# - apt update
# - apt install -y tree
# - make cross-compile-server
# environment:
# PLATFORMS: linux|amd64
# TAGS: bindata sqlite sqlite_unlock_notify netgo
# XGO_VERSION: *xgo_version
# when:
# event: pull_request
dummy-compile-server:
image: bash
commands:
- apt update
- apt install -y tree
- make cross-compile-server
environment:
PLATFORMS: linux|amd64
TAGS: bindata sqlite sqlite_unlock_notify netgo
XGO_VERSION: *xgo_version
when:
event: pull_request
- mkdir -p dist/server/linux/amd64
- echo 'echo binary' > dist/server/linux/amd64/woodpecker-server
- chmod +x dist/server/linux/amd64/woodpecker-server

publish-server-preview:
image: woodpeckerci/plugin-docker-buildx
Expand Down
32 changes: 17 additions & 15 deletions .woodpecker/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ steps:
when: *when

lint-editorconfig:
image: mstruebing/editorconfig-checker
image: codeberg.org/6543/docker-images/editorconfig-checker
group: test

lint-license-header:
Expand Down Expand Up @@ -111,20 +111,20 @@ steps:
- make test-server-datastore
when: *when

codecov:
pull: true
image: woodpeckerci/plugin-codecov:next-alpine
settings:
files:
- agent-coverage.out
- cli-coverage.out
- coverage.out
- server-coverage.out
- datastore-coverage.out
token:
from_secret: codecov_token
when: *when
failure: ignore
# codecov:
# pull: true
# image: woodpeckerci/plugin-codecov:next-alpine
# settings:
# files:
# - agent-coverage.out
# - cli-coverage.out
# - coverage.out
# - server-coverage.out
# - datastore-coverage.out
# token:
# from_secret: codecov_token
# when: *when
# failure: ignore

services:
service-postgres:
Expand All @@ -142,3 +142,5 @@ services:
- MYSQL_DATABASE=test
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
when: *when

# enforce arm run