Woodpecker CI: Add OTP develop pipeline
musl and glibc builds need to be split due to workspace polution. Workflow's steps share the same workspace, so two separate build steps can't be in the same workflow since they share the buld artifacts, deps.
This commit is contained in:
parent
fc5aea73ff
commit
5351cd4ce9
2 changed files with 172 additions and 0 deletions
85
.woodpecker/otp-develop-musl.yaml
Normal file
85
.woodpecker/otp-develop-musl.yaml
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
path: [ "*.ex", "*.eex", "*.exs", "mix.lock", ".woodpecker/**" ]
|
||||
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
# This is needed for the when clauses below.
|
||||
# When the platform clause is fixed, this might not be needed anymore
|
||||
labels:
|
||||
platform: ${platform}
|
||||
|
||||
steps:
|
||||
otp-develop-amd64-musl:
|
||||
image: docker.io/hexpm/elixir-amd64:1.17.3-erlang-27.3.4.2-alpine-3.22.1
|
||||
# when:
|
||||
# - platform: linux/amd64
|
||||
# does not work even though it should according to docs
|
||||
# https://github.com/woodpecker-ci/woodpecker/discussions/5367#discussioncomment-13901342
|
||||
when:
|
||||
- evaluate: platform == "linux/amd64"
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
||||
commands:
|
||||
- apk add git build-base cmake file-dev openssl vips-dev zip
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get --only prod
|
||||
- mkdir release
|
||||
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
|
||||
- mix release --path release
|
||||
- zip -9rq pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64-musl.zip release
|
||||
|
||||
upload-artifacts-amd64-musl:
|
||||
image: docker.io/woodpeckercommunity/plugin-gitea-package:0.5.0
|
||||
when:
|
||||
- evaluate: platform == "linux/amd64"
|
||||
settings:
|
||||
user:
|
||||
from_secret: pleroma-ci-user
|
||||
password:
|
||||
from_secret: pleroma-ci-password
|
||||
owner: 'pleroma'
|
||||
package_name: pleroma-otp-${CI_REPO_DEFAULT_BRANCH}-amd64-musl
|
||||
package_version: ${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64-musl
|
||||
file_source: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64-musl.zip
|
||||
file_name: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64-musl.zip
|
||||
|
||||
otp-develop-arm64-musl:
|
||||
image: docker.io/hexpm/elixir-arm64:1.17.3-erlang-27.3.4.2-alpine-3.22.1
|
||||
when:
|
||||
- evaluate: platform == "linux/arm64"
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
||||
commands:
|
||||
- apk add git build-base cmake file-dev openssl vips-dev zip
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get --only prod
|
||||
- mkdir release
|
||||
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
|
||||
- mix release --path release
|
||||
- zip -9rq pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64-musl.zip release
|
||||
|
||||
upload-artifacts-arm64-musl:
|
||||
image: docker.io/woodpeckercommunity/plugin-gitea-package:0.5.0
|
||||
when:
|
||||
- evaluate: platform == "linux/arm64"
|
||||
settings:
|
||||
user:
|
||||
from_secret: pleroma-ci-user
|
||||
password:
|
||||
from_secret: pleroma-ci-password
|
||||
owner: 'pleroma'
|
||||
package_name: pleroma-otp-${CI_REPO_DEFAULT_BRANCH}-arm64-musl
|
||||
package_version: ${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64-musl
|
||||
file_source: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64-musl.zip
|
||||
file_name: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64-musl.zip
|
||||
87
.woodpecker/otp-develop.yaml
Normal file
87
.woodpecker/otp-develop.yaml
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
path: [ "*.ex", "*.eex", "*.exs", "mix.lock", ".woodpecker/**" ]
|
||||
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
# This is needed for the when clauses below.
|
||||
# When the platform clause is fixed, this might not be needed anymore
|
||||
labels:
|
||||
platform: ${platform}
|
||||
|
||||
steps:
|
||||
otp-develop-amd64:
|
||||
image: docker.io/hexpm/elixir-amd64:1.17.3-erlang-27.3.4.2-ubuntu-noble-20250716
|
||||
# when:
|
||||
# - platform: linux/amd64
|
||||
# does not work even though it should according to docs
|
||||
# https://github.com/woodpecker-ci/woodpecker/discussions/5367#discussioncomment-13901342
|
||||
when:
|
||||
- evaluate: platform == "linux/amd64"
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
commands:
|
||||
- apt-get update && apt-get install -y cmake libmagic-dev libvips-dev erlang-dev git build-essential zip
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get --only prod
|
||||
- mkdir release
|
||||
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
|
||||
- mix release --path release
|
||||
- zip -9rq pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64.zip release
|
||||
|
||||
upload-artifacts-amd64:
|
||||
image: docker.io/woodpeckercommunity/plugin-gitea-package:0.5.0
|
||||
when:
|
||||
- evaluate: platform == "linux/amd64"
|
||||
settings:
|
||||
user:
|
||||
from_secret: pleroma-ci-user
|
||||
password:
|
||||
from_secret: pleroma-ci-password
|
||||
owner: 'pleroma'
|
||||
package_name: pleroma-otp-${CI_REPO_DEFAULT_BRANCH}-amd64
|
||||
package_version: ${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64
|
||||
file_source: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64.zip
|
||||
file_name: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-amd64.zip
|
||||
|
||||
otp-develop-arm64:
|
||||
image: docker.io/hexpm/elixir-arm64:1.17.3-erlang-27.3.4.2-ubuntu-noble-20250716
|
||||
when:
|
||||
- evaluate: platform == "linux/arm64"
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
commands:
|
||||
- apt-get update && apt-get install -y cmake libmagic-dev libvips-dev erlang-dev git build-essential zip
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get --only prod
|
||||
- mkdir release
|
||||
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
|
||||
- mix release --path release
|
||||
- zip -9rq pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64.zip release
|
||||
|
||||
upload-artifacts-arm64:
|
||||
image: docker.io/woodpeckercommunity/plugin-gitea-package:0.5.0
|
||||
when:
|
||||
- evaluate: platform == "linux/arm64"
|
||||
settings:
|
||||
user:
|
||||
from_secret: pleroma-ci-user
|
||||
password:
|
||||
from_secret: pleroma-ci-password
|
||||
owner: 'pleroma'
|
||||
package_name: pleroma-otp-${CI_REPO_DEFAULT_BRANCH}-arm64
|
||||
package_version: ${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64
|
||||
file_source: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64.zip
|
||||
file_name: ./pleroma-${CI_REPO_DEFAULT_BRANCH}-${CI_COMMIT_SHA}-arm64.zip
|
||||
Loading…
Add table
Add a link
Reference in a new issue