Merge branch 'woodpecker'

This commit is contained in:
era 2025-01-20 19:28:35 +03:30
commit b2fbfb17c8
No known key found for this signature in database
GPG Key ID: D09203E19A264BC3
7 changed files with 215 additions and 0 deletions

View File

@ -0,0 +1,5 @@
FROM python:3.12
COPY config/requirements.txt ballistica_requirements.txt
RUN install -m 0755 -d /etc/apt/keyrings; curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc; chmod a+r /etc/apt/keyrings/docker.asc; echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt update; apt -y --no-install-recommends install libopenal-dev libsdl2-dev libvorbis-dev cmake clang-format rsync zip docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
RUN pip install --upgrade pip; pip install -r ballistica_requirements.txt

View File

@ -0,0 +1,15 @@
when:
- event: manual
steps:
- name: build-and-publish
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: .woodpecker/ballistica_dev_dockerfile
registry: codeberg.org
repo: codeberg.org/${CI_REPO}-dev
tags:
- latest
username: ${CI_REPO_OWNER}
password:
from_secret: ACCESS_TOKEN

47
.woodpecker/ci.yaml Normal file
View File

@ -0,0 +1,47 @@
when:
- event: push
- event: pull_request
- event: cron
cron: ci
steps:
- name: parallel-prepare
image: codeberg.org/3ra/ballistica-dev:latest
pull: true
commands:
- make env
- cd ..
- cp -r -v $CI_REPO_NAME check_linux
- cp -r -v $CI_REPO_NAME build_and_test_linux
- cp -r -v $CI_REPO_NAME spinoff_test_linux
- cp -r -v $CI_REPO_NAME feature_set_copy_test_linux
- cd $CI_REPO_NAME
- name: check-linux
image: codeberg.org/3ra/ballistica-dev:latest
commands:
- cd ../check_linux
- BA_PCOMMANDBATCH_BUILD_REQUIRE=1 make check
depends_on: [parallel-prepare]
- name: build-and-test-linux
image: codeberg.org/3ra/ballistica-dev:latest
commands:
- cd ../build_and_test_linux
- make cmake-server-build
- BA_PCOMMANDBATCH_BUILD_REQUIRE=1 BA_APP_RUN_ENABLE_BUILDS=1 BA_APP_RUN_BUILD_HEADLESS=1 make test
depends_on: [parallel-prepare]
- name: spinoff-test-linux
image: codeberg.org/3ra/ballistica-dev:latest
commands:
- cd ../spinoff_test_linux
- make spinoff-test-core
- make spinoff-test-base
depends_on: [parallel-prepare]
- name: feature-set-copy-test-linux
image: codeberg.org/3ra/ballistica-dev:latest
commands:
- cd ../feature_set_copy_test_linux
- tools/spinoff fset-copy template_fs poo
- make update
- make cmake-modular-server-build
- cd build/cmake/modular-server-debug/staged/dist && PYTHONPATH=ba_data/python ./ballisticakit_headless -c "import baenv; baenv.configure(); import bapoo; print(bapoo)"
depends_on: [parallel-prepare]

View File

@ -0,0 +1,16 @@
when:
- event: push
branch: main
steps:
- name: build
image: codeberg.org/3ra/ballistica-dev:latest
pull: true
commands:
- make docs-sphinx
- name: deploy
image: codeberg.org/xfix/plugin-codeberg-pages-deploy:1
settings:
folder: build/sphinx
ssh_key:
from_secret: SSH_KEY

108
.woodpecker/release.yaml Normal file
View File

@ -0,0 +1,108 @@
when:
- event: tag
ref: refs/tags/v*
steps:
- name: parallel-prepare
image: codeberg.org/3ra/ballistica-dev:latest
pull: true
commands:
- make env
- cd ..
- cp -r -v $CI_REPO_NAME build_prefabs
- cp -r -v $CI_REPO_NAME build_sphinx_docs
- cd $CI_REPO_NAME
- name: build-prefabs
image: codeberg.org/3ra/ballistica-dev:latest
commands:
- cd ../build_prefabs
- make prefab-linux-arm64-gui-debug-build
- make prefab-linux-x86-64-gui-debug-build
- make prefab-mac-arm64-gui-debug-build
- make prefab-windows-x86-gui-debug-build
- make prefab-linux-arm64-server-debug-build
- make prefab-linux-x86-64-server-debug-build
- make prefab-mac-arm64-server-debug-build
- make prefab-windows-x86-server-debug-build
- mv -v build/prefab/full/linux_arm64_gui/debug build/prefab/full/linux_arm64_gui/ballisticakit_linux_arm64
- tar cvzfC ballisticakit_linux_arm64.tar.gz build/prefab/full/linux_arm64_gui ballisticakit_linux_arm64
- mv -v build/prefab/full/linux_x86_64_gui/debug build/prefab/full/linux_x86_64_gui/ballisticakit_linux_x86_64
- tar cvzfC ballisticakit_linux_x86_64.tar.gz build/prefab/full/linux_x86_64_gui ballisticakit_linux_x86_64
- mv -v build/prefab/full/mac_arm64_gui/debug build/prefab/full/mac_arm64_gui/ballisticakit_mac
- tar cvzfC ballisticakit_mac.tar.gz build/prefab/full/mac_arm64_gui ballisticakit_mac
- mv -v build/prefab/full/windows_x86_gui/debug build/prefab/full/windows_x86_gui/ballisticakit_windows
- cd build/prefab/full/windows_x86_gui
- zip -rv ../../../../ballisticakit_windows.zip ballisticakit_windows
- cd ../../../..
- mv -v build/prefab/full/linux_arm64_server/debug build/prefab/full/linux_arm64_server/ballisticakit_linux_arm64_server
- tar cvzfC ballisticakit_linux_arm64_server.tar.gz build/prefab/full/linux_arm64_server ballisticakit_linux_arm64_server
- mv -v build/prefab/full/linux_x86_64_server/debug build/prefab/full/linux_x86_64_server/ballisticakit_linux_x86_64_server
- tar cvzfC ballisticakit_linux_x86_64_server.tar.gz build/prefab/full/linux_x86_64_server ballisticakit_linux_x86_64_server
- mv -v build/prefab/full/mac_arm64_server/debug build/prefab/full/mac_arm64_server/ballisticakit_mac_server
- tar cvzfC ballisticakit_mac_server.tar.gz build/prefab/full/mac_arm64_server ballisticakit_mac_server
- mv -v build/prefab/full/windows_x86_server/debug build/prefab/full/windows_x86_server/ballisticakit_windows_server
- cd build/prefab/full/windows_x86_server
- zip -rv ../../../../ballisticakit_windows_server.zip ballisticakit_windows_server
- cd ../../../..
depends_on: [parallel-prepare]
- name: build-and-publish-gui-docker
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: config/docker/Dockerfile
build_args:
- cmake_build_type=Debug
- headless_build=0
platforms:
- linux/amd64
registry: codeberg.org
repo: codeberg.org/${CI_REPO}
tags:
- ${CI_COMMIT_TAG##v}-debug
- ${CI_COMMIT_TAG##v}-gui-debug
username: ${CI_REPO_OWNER}
password:
from_secret: ACCESS_TOKEN
depends_on: [parallel-prepare]
- name: build-and-publish-server-docker
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: config/docker/Dockerfile
build_args:
- cmake_build_type=Debug
- headless_build=1
platforms:
- linux/amd64
registry: codeberg.org
repo: codeberg.org/${CI_REPO}
tags:
- ${CI_COMMIT_TAG##v}-server-debug
username: ${CI_REPO_OWNER}
password:
from_secret: ACCESS_TOKEN
depends_on: [parallel-prepare]
- name: build-sphinx-docs
image: codeberg.org/3ra/ballistica-dev:latest
commands:
- cd ../build_sphinx_docs
- make docs-sphinx
- mv -v build/sphinx build/ballistica_sphinx_docs
- tar cvfC ballistica_sphinx_docs.tar build ballistica_sphinx_docs
depends_on: [parallel-prepare]
- name: release
image: woodpeckerci/plugin-release
settings:
api_key:
from_secret: ACCESS_TOKEN
files:
- '../build_prefabs/ballisticakit_linux_arm64.tar.gz'
- '../build_prefabs/ballisticakit_linux_x86_64.tar.gz'
- '../build_prefabs/ballisticakit_mac.tar.gz'
- '../build_prefabs/ballisticakit_windows.zip'
- '../build_prefabs/ballisticakit_linux_arm64_server.tar.gz'
- '../build_prefabs/ballisticakit_linux_x86_64_server.tar.gz'
- '../build_prefabs/ballisticakit_mac_server.tar.gz'
- '../build_prefabs/ballisticakit_windows_server.zip'
- '../build_sphinx_docs/ballistica_sphinx_docs.tar'
note: 'These are debug prefab builds; use them for testing purposes only. Docker versions of this release also exist at https://codeberg.org/3ra/-/packages/container/ballistica. Check out https://ballistica.net/downloads for official/blessed release builds.'
title: ${CI_COMMIT_TAG}
depends_on: [build-prefabs, build-sphinx-docs]

View File

@ -0,0 +1,17 @@
when:
- event: push
- event: pull_request
- event: cron
cron: ci
steps:
- name: build-and-test
image: python:3.12-windowsservercore
commands:
- $env:PYTHONPATH = "tools"
- python -m efrotools.genwrapper pcommand batools.pcommandmain tools/pcommand
- python -m pip install --upgrade pip
- pip install pytest typing_extensions
- python tools/pcommand win_ci_install_prereqs
- python tools/pcommand win_ci_binary_build
- python tools/pcommand pytest -v tests

View File

@ -198,6 +198,13 @@ ctx.filter_file_names = {
'deploy_docs.yml', 'deploy_docs.yml',
'nightly.yml', 'nightly.yml',
'release.yml', 'release.yml',
'ballistica_dev_dockerfile',
'ballistica_dev_image.yaml',
'ci.yaml',
'ci_build_and_test_windows.yaml',
'cd.yaml',
'deploy_docs.yaml',
'release.yaml',
'LICENSE', 'LICENSE',
'cloudtool', 'cloudtool',
'bacloud', 'bacloud',