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

Github action for nightly build and to make release #701

Merged
merged 14 commits into from
Jun 12, 2024
36 changes: 0 additions & 36 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,39 +185,3 @@ jobs:
with:
name: windows_x86_server_(debug)
path: build/prefab/full/windows_x86_server

make_sphinx_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make docs-sphinx
- name: Upload the build
uses: actions/upload-artifact@v4
with:
name: sphinx_html_docs
path: build/sphinx

make_docker_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make docker-save
- name: Upload the build
uses: actions/upload-artifact@v4
with:
name: docker_server(release)
path: build/docker/bombsquad_server_docker.tar
42 changes: 42 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Nightly Build
on:
# Run everyday at 5:30 UTC
schedule:
- cron: '30 5 * * *'

jobs:
make_docker_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make docker-save
- name: Upload the build
uses: actions/upload-artifact@v4
with:
name: docker_server(release)
path: build/docker/bombsquad_server_docker.tar

make_sphinx_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make docs-sphinx
- name: Upload the build
uses: actions/upload-artifact@v4
with:
name: sphinx_html_docs
path: build/sphinx
247 changes: 247 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release_linux_x86_64_gui_debug_build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-gui-debug-build
- name: Compress the build
run: tar -cf "linux_x86_64_gui_debug.tar" build/prefab/full/linux_x86_64_gui/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: linux_x86_64_gui_debug.tar

release_linux_x86_64_server_debug_build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-server-debug-build
- name: Compress the build
run: tar -cf "linux_x86_64_server_debug.tar" build/prefab/full/linux_x86_64_server/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: linux_x86_64_server_debug.tar

release_linux_arm64_gui_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-linux-arm64-gui-debug-build
- name: Compress the build
run: tar -cf "linux_arm64_gui_debug.tar" build/prefab/full/linux_arm64_gui/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: linux_arm64_gui_debug.tar

release_linux_arm64_server_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-linux-arm64-server-debug-build
- name: Compress the build
run: tar -cf "linux_arm64_server_debug.tar" build/prefab/full/linux_arm64_server/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: linux_arm64_server_debug.tar

release_mac_x86_64_gui_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-mac-x86-64-gui-debug-build
- name: Compress the build
run: tar -cf "mac_x86_64_gui_debug.tar" build/prefab/full/mac_x86_64_gui/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: mac_x86_64_gui_debug.tar

release_mac_x86_64_server_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-mac-x86-64-server-debug-build
- name: Compress the build
run: tar -cf "mac_x86_64_server_debug.tar" build/prefab/full/mac_x86_64_server/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: mac_x86_64_server_debug.tar

release_mac_arm64_gui_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-mac-arm64-gui-debug-build
- name: Compress the build
run: tar -cf "mac_arm64_gui_debug.tar" build/prefab/full/mac_arm64_gui/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: mac_arm64_gui_debug.tar

release_mac_arm64_server_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-mac-arm64-server-debug-build
- name: Compress the build
run: tar -cf "mac_arm64_server_debug.tar" build/prefab/full/mac_arm64_server/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: mac_arm64_server_debug.tar

release_windows_x86_gui_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-windows-x86-gui-debug-build
- name: Compress the build
run: tar -cf "windows_x86_gui_debug.tar" build/prefab/full/windows_x86_gui/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: windows_x86_gui_debug.tar

release_windows_x86_server_debug_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make prefab-windows-x86-server-debug-build
- name: Compress the build
run: tar -cf "windows_x86_server_debug.tar" build/prefab/full/windows_x86_server/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: windows_x86_server_debug.tar

release_docker_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make docker-save
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: build/docker/bombsquad_server_docker.tar

release_sphinx_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup project environment
run: make env
- name: Make the build
run: make docs-sphinx
- name: Compress the build
run: tar -cf "sphinx_html_docs.tar" build/sphinx/
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: sphinx_html_docs.tar
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
efrocache when anything in the cache-map changed (which is the case for most
commits). Please holler if you are still seeing lots more 'Extracting:' lines
when running builds after pulling small updates from git.
- Added github workflow for making docker image and sphinx docs nightly
- Added github workflow for making build release on tag creation

### 1.7.34 (build 21823, api 8, 2024-04-26)
- Bumped Python version from 3.11 to 3.12 for all builds and project tools. One
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1183,16 +1183,20 @@ clion-staging: assets-cmake resources meta
# #
################################################################################

# Build the docker image named bombsquad_server
docker-build: assets-cmake
$(PCOMMAND) build_docker

# Run the bombsquad_server image
docker-run:
docker run -it bombsquad_server

# Save the bombsquad_server docker image to build/docker/bombsquad_server_docker.tar
docker-save: docker-build
mkdir -p build/docker/
docker save bombsquad_server -o build/docker/bombsquad_server_docker.tar

# Cleanup docker files
docker-clean:
rm build/docker/bombsquad_server_docker.tar
docker rmi bombsquad_server --force
Expand Down
2 changes: 2 additions & 0 deletions config/spinoffconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
'ci.yml',
'cd.yml',
'deploy_docs.yml',
'nightly.yml',
'release.yml',
'LICENSE',
'cloudtool',
'bacloud',
Expand Down