From 2e2a1ef018784ecd95dff2fcd709c6c11452d715 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 18:01:54 +0530 Subject: [PATCH 01/26] added docker images and sphinx docs to build nightly --- .github/workflows/cd.yml | 36 ------------------------------ .github/workflows/nightly.yml | 41 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7ddd733d..707c3e8e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 00000000..1e6362e0 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,41 @@ +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 \ No newline at end of file From 33904e039f73e216b59f6bc7704ce8fd83cc4128 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 18:07:37 +0530 Subject: [PATCH 02/26] action file(nightly.yml) filter rule for spinoff --- config/spinoffconfig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config/spinoffconfig.py b/config/spinoffconfig.py index 4da1e2ee..2ff58ff9 100644 --- a/config/spinoffconfig.py +++ b/config/spinoffconfig.py @@ -196,6 +196,7 @@ ctx.filter_file_names = { 'ci.yml', 'cd.yml', 'deploy_docs.yml', + 'nightly.yml', 'LICENSE', 'cloudtool', 'bacloud', From 7705a5605f01955c766506c2e708c25c7c945837 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 18:10:42 +0530 Subject: [PATCH 03/26] Added name to nightly.yml action --- .github/workflows/nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1e6362e0..d64062a5 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,3 +1,4 @@ +name: Nightly Build on: # Run everyday at 5:30 UTC schedule: From f59dcf2595521a19e4c9ac2bd94b0ab591a995b5 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 20:10:13 +0530 Subject: [PATCH 04/26] created release action on tag push --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ config/spinoffconfig.py | 1 + 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..58cacb99 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + 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: Upload the build + uses: ncipollo/release-action@v1 + with: + artifacts: build/prefab/full/linux_x86_64_gui + + - name: Make the build + run: make prefab-server-debug-build + - name: Upload the build + uses: ncipollo/release-action@v1 + with: + artifacts: build/prefab/full/linux_x86_64_server \ No newline at end of file diff --git a/config/spinoffconfig.py b/config/spinoffconfig.py index 2ff58ff9..51da5f16 100644 --- a/config/spinoffconfig.py +++ b/config/spinoffconfig.py @@ -197,6 +197,7 @@ ctx.filter_file_names = { 'cd.yml', 'deploy_docs.yml', 'nightly.yml', + 'release.yml', 'LICENSE', 'cloudtool', 'bacloud', From fb0202868e2e66544c8e12678d362751e1f30945 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 20:21:33 +0530 Subject: [PATCH 05/26] test fix --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58cacb99..e08bc16f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,11 +23,11 @@ jobs: - name: Upload the build uses: ncipollo/release-action@v1 with: - artifacts: build/prefab/full/linux_x86_64_gui + artifacts: build/prefab/full/linux_x86_64_gui/* - name: Make the build run: make prefab-server-debug-build - name: Upload the build uses: ncipollo/release-action@v1 with: - artifacts: build/prefab/full/linux_x86_64_server \ No newline at end of file + artifacts: build/prefab/full/linux_x86_64_server/* \ No newline at end of file From 1ad85896e938795ac4d4c89ba5357d593a071a7b Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 20:42:27 +0530 Subject: [PATCH 06/26] test 2 --- .github/workflows/release.yml | 7 ++++++- Makefile | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e08bc16f..65d28b59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,8 @@ jobs: - 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: @@ -27,7 +29,10 @@ jobs: - 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: - artifacts: build/prefab/full/linux_x86_64_server/* \ No newline at end of file + artifacts: build/prefab/full/linux_x86_64_server/* +a \ No newline at end of file diff --git a/Makefile b/Makefile index 17f3c708..cfe969d9 100644 --- a/Makefile +++ b/Makefile @@ -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 From 798dab8e9015b7aafe501958ee491f36aa5b1b96 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 20:45:33 +0530 Subject: [PATCH 07/26] oopsies --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65d28b59..cf87b3cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,5 +34,4 @@ jobs: - name: Upload the build uses: ncipollo/release-action@v1 with: - artifacts: build/prefab/full/linux_x86_64_server/* -a \ No newline at end of file + artifacts: build/prefab/full/linux_x86_64_server/* \ No newline at end of file From a18d4c0370fd230703cebd776897eba7fce803ae Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 20:53:03 +0530 Subject: [PATCH 08/26] test 3 --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf87b3cb..2b033b28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - 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/ + 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: @@ -30,7 +30,7 @@ jobs: - 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/ + 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: From b308008676665d5d186134393948d139c5753cb1 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 20:58:53 +0530 Subject: [PATCH 09/26] test 4 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b033b28..9b9c2f28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,4 +34,4 @@ jobs: - name: Upload the build uses: ncipollo/release-action@v1 with: - artifacts: build/prefab/full/linux_x86_64_server/* \ No newline at end of file + artifacts: linux_x86_64_server(debug).tar \ No newline at end of file From f8a704d193532a8ea4dcec33f0b154be31f8b24c Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 21:06:27 +0530 Subject: [PATCH 10/26] test 5 --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b9c2f28..add1b484 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: - name: Upload the build uses: ncipollo/release-action@v1 with: + allowUpdates: true artifacts: build/prefab/full/linux_x86_64_gui/* - name: Make the build @@ -34,4 +35,5 @@ jobs: - name: Upload the build uses: ncipollo/release-action@v1 with: + allowUpdates: true artifacts: linux_x86_64_server(debug).tar \ No newline at end of file From 7a93faac763f8d3c618b9a277a314f5b84e1e033 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 21:13:49 +0530 Subject: [PATCH 11/26] final test hopefully --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index add1b484..892dce55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: uses: ncipollo/release-action@v1 with: allowUpdates: true - artifacts: build/prefab/full/linux_x86_64_gui/* + artifacts: linux_x86_64_gui(debug).tar - name: Make the build run: make prefab-server-debug-build From 1be7102c591f8fa72cae77a798753c1bb4b625ea Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 22:47:01 +0530 Subject: [PATCH 12/26] added all builds --- .github/workflows/release.yml | 228 ++++++++++++++++++++++++++++++++-- 1 file changed, 218 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 892dce55..15b4314b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - 'v*' jobs: - build: + release_linux_x86_64_gui_debug_build: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -17,7 +17,6 @@ jobs: 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 @@ -28,12 +27,221 @@ jobs: allowUpdates: true artifacts: linux_x86_64_gui(debug).tar - - 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: + 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 \ No newline at end of file + 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 \ No newline at end of file From 8ce9b77c4f456787e9bccb429f59d30d53657918 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 20 May 2024 23:05:02 +0530 Subject: [PATCH 13/26] cleanup --- .github/workflows/release.yml | 54 +++++++++++++++++------------------ CHANGELOG.md | 2 ++ 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15b4314b..050ce036 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - 'v*' jobs: - release_linux_x86_64_gui_debug_build: + release_linux_x86_64_gui_debug_build: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -20,14 +20,14 @@ jobs: - 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/ + 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 + artifacts: linux_x86_64_gui_debug.tar - release_linux_x86_64_server_debug_build: + release_linux_x86_64_server_debug_build: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -41,14 +41,14 @@ jobs: - 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/ + 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 + artifacts: linux_x86_64_server_debug.tar - release_linux_arm64_gui_debug_build: + release_linux_arm64_gui_debug_build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -61,14 +61,14 @@ jobs: - 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/ + 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 + artifacts: linux_arm64_gui_debug.tar - release_linux_arm64_server_debug_build: + release_linux_arm64_server_debug_build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -81,14 +81,14 @@ jobs: - 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/ + 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 + artifacts: linux_arm64_server_debug.tar - release_mac_x86_64_gui_debug_build: + release_mac_x86_64_gui_debug_build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -101,14 +101,14 @@ jobs: - 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/ + 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 + artifacts: mac_x86_64_gui_debug.tar - release_mac_x86_64_server_debug_build: + release_mac_x86_64_server_debug_build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -121,14 +121,14 @@ jobs: - 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/ + 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 + artifacts: mac_x86_64_server_debug.tar - release_mac_arm64_gui_debug_build: + release_mac_arm64_gui_debug_build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -141,12 +141,12 @@ jobs: - 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/ + 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 + artifacts: mac_arm64_gui_debug.tar release_mac_arm64_server_debug_build: runs-on: ubuntu-latest @@ -161,12 +161,12 @@ jobs: - 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/ + 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 + artifacts: mac_arm64_server_debug.tar release_windows_x86_gui_debug_build: runs-on: ubuntu-latest @@ -181,12 +181,12 @@ jobs: - 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/ + 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 + artifacts: windows_x86_gui_debug.tar release_windows_x86_server_debug_build: runs-on: ubuntu-latest @@ -201,12 +201,12 @@ jobs: - 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/ + 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 + artifacts: windows_x86_server_debug.tar release_docker_image: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index b48f8f45..779ee850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 From 90335236c1af273aa9eae64b31afa1c6cb5a3fce Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 12 Jun 2024 14:03:51 -0700 Subject: [PATCH 14/26] latest tidying and langs --- .efrocachemap | 88 +++++++++---------- CHANGELOG.md | 2 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/base/platform/base_platform.cc | 4 +- src/ballistica/shared/ballistica.cc | 2 +- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 0de71c38..25ba089b 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4038,50 +4038,50 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "bfd2a477d0322f6fb74656f9a0dedae0", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "0d2f166f927785c9abbd7911b1940f4b", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "b0fb1c006ebf24c74084e94308f4dd0a", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "a5d29314d5853e1a904f4b3ae48d6f21", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "d7182ecdcb53449fe67d54af9c088888", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "7bb195668fa054394d03abf4b3ed2952", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "22e16d10a41b36c5db277ec717488596", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "baa648fe7e976df9155b5e0994d334b6", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "8c9b4d2626ce4674efa4a37d8cff6857", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "121545e12decb46689681cda8721f708", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "c72adfcd1ccc8bfc412e62efa98a8e14", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "90ad3bc819d90bcfeb5563692a9606db", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "3ef248a8d70eaaedc6783898651bb668", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "2cdfa98b7b372ee3d19446cf95ebb8ef", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "715854042fe4f2470d67593bbad571d1", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "675ec134554280a37aaa2951adf48dac", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "c5b6443b911d21f020a8ff9c7bf23e98", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3ce98ab785f8c7656f3d7b2ee4491975", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "80c142f30aa63759bbe4d017f83d5977", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "029360ae2dba2279d41022647afd0c52", - "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "9162b53189b80d4e5938cd142acd2a1a", - "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "2226d0e2d34051d962320c86464f3a2d", - "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "9162b53189b80d4e5938cd142acd2a1a", - "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "2226d0e2d34051d962320c86464f3a2d", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "c2d287b53bdac7e5302fe833ac052d2c", - "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "b3942d4e7c940d86fc039ae149756d3f", - "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "c2d287b53bdac7e5302fe833ac052d2c", - "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "b3942d4e7c940d86fc039ae149756d3f", - "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "6c3d9a42b9cdc7af45f7273f76010dd5", - "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "404e2e994a58d2e930f189ab835ada45", - "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "6c3d9a42b9cdc7af45f7273f76010dd5", - "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "404e2e994a58d2e930f189ab835ada45", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "848cfd50cf15726e3acefd60204a85c5", - "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "299b6c4b83966040618b27563b700c2a", - "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "08c2f91d086e6f3fa73ebc299112358a", - "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "299b6c4b83966040618b27563b700c2a", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "ec11bac6a42f25e02cd218928625c9b7", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "4dc943a3a551a0615fe33c56ac8b5bd7", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "457df093184e56955a1170340e57cf43", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "108e96eeda885404682b0762552e0f61", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "11691eb6e947ee36f315c979a305533a", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "bdfa516a57bd798e482d20ebd074488c", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "f25bf000209c0d97a852c71afa186c3a", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "d2aae5f895446cd23f2c5bb0656c79a3", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "0c51eee4af632ca8e9132edfea6c5ef5", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "d086ea46307e571d6278a1ac00e7199f", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "4119ef59158a5572098c997a01988d42", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "6f59df95b4c858986852123b779ea70c", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "62505635f81cb7ed9804ec5b0eb43c5a", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "8e493b1b5c987401daa7cda81e7faeb9", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "bb97152641a4ce2c41722ef4da314086", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "843f0dfcd9bdc2b6886cdd1ac6ba0fc2", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "76fff737c7e5e513aa0c55d6dbe179a4", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "4e81fe4c953d35f96c81ec19f93525d3", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "33d430a5730d2c226765a11f86dd0599", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "6cd4a729aacbb3838ea020bdfc7d67d2", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "2b5f1112f0328d69f3863fb2e06a730d", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "b051c7642dfcf446dcd1657c121eac21", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "dc8e5d62bcfc1a645c028a7df7ecb738", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "4548c17cdfe8998aa8ecb31ad973ae74", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "333d8035d9233fee2e2b09c158c720e6", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3f4453380fd5d175c8fb18d8ca3ece4f", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8d19f198e01491a98bede19987b8cc8f", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2270da9585ffdca2c0eab77196c3f7d4", + "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "bb11ac758712a51791340d19121b9791", + "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "c47ac1d2e839e4e3b701a7c59080dd09", + "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "bb11ac758712a51791340d19121b9791", + "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "c47ac1d2e839e4e3b701a7c59080dd09", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "9cb1b5b345dd00b58992913677a4ad7e", + "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "8a961e945aeb0120d924ec06a162fb55", + "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "9cb1b5b345dd00b58992913677a4ad7e", + "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "8a961e945aeb0120d924ec06a162fb55", + "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "5fcc0e89141d36e5b152095bfcc21fa1", + "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "1b63b3daeff198825740a426fe5f7a9f", + "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "5fcc0e89141d36e5b152095bfcc21fa1", + "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "1b63b3daeff198825740a426fe5f7a9f", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "e86e8adff4bf043e2c3796ed499ca134", + "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "2fddab497b60617bcaa467a458e5534c", + "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "b21ff6427895bcd8628ea55a3c2d8609", + "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "2fddab497b60617bcaa467a458e5534c", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "4594d3bdd6f0d5103da725b67c442ca5", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "37f0e4fef1e9106835c572a12f8a0354", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "660139dfa55cdbc071bf43526504823b", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "a1961b9730c58599ef326b6af9da7f93", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f534609cbfc3b2743a07c0aafb380f4b", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "fd05e46d0f3acbf9dfa6a6d3b7f75926", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "db3a41fe7b3b22c90229b3ecdeb2e5ec", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "9b21b94333a5f61d45c40bcb94a53a53", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "5548f407d97e380069f6c596c4e36cd7", "src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d", diff --git a/CHANGELOG.md b/CHANGELOG.md index b84cf353..13260c7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.35 (build 21882, api 8, 2024-05-29) +### 1.7.35 (build 21884, api 8, 2024-06-12) - Fixed an issue where the engine would block at exit on some version of Linux until Ctrl-D was pressed in the calling terminal. - V2 accounts have been around for a while now, so the old V1 device login diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index e97c447a..0958e534 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21882 +TARGET_BALLISTICA_BUILD = 21884 TARGET_BALLISTICA_VERSION = '1.7.35' diff --git a/src/ballistica/base/platform/base_platform.cc b/src/ballistica/base/platform/base_platform.cc index d07e2ab0..4fb91846 100644 --- a/src/ballistica/base/platform/base_platform.cc +++ b/src/ballistica/base/platform/base_platform.cc @@ -64,8 +64,8 @@ auto BasePlatform::GetPublicDeviceUUID() -> std::string { // We used to plug version in directly here, but that caused uuids to // shuffle too rapidly during periods of rapid development. This // keeps it more constant. - // __last_rand_uuid_component_shuffle_date__ 2023 12 13 - auto rand_uuid_component{"7YM96RZHN6ZCPZGTQONULZO1JU5NMMC7"}; + // __last_rand_uuid_component_shuffle_date__ 2024 6 12 + auto rand_uuid_component{"WI5XDVM7QQBD4G6O0GS2DW6IPJ4VQT9X"}; inputs.emplace_back(rand_uuid_component); auto gil{Python::ScopedInterpreterLock()}; diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 1819455f..395a3093 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21882; +const int kEngineBuildNumber = 21884; const char* kEngineVersion = "1.7.35"; const int kEngineApiVersion = 8; From ca710b04bcd3cee39966c049d30f82f3aba9fdb3 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Thu, 6 Jun 2024 21:41:03 +0530 Subject: [PATCH 15/26] one beautiful commit for docker --- .efrocachemap | 100 +++++----- .github/workflows/nightly.yml | 30 ++- .github/workflows/release.yml | 32 +++- CHANGELOG.md | 2 +- Makefile | 32 +++- config/docker/Dockerfile | 68 ++++--- config/requirements.txt | 10 +- src/assets/.asset_manifest_public.json | 4 + src/assets/Makefile | 4 + src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/base/platform/base_platform.cc | 4 +- src/ballistica/shared/ballistica.cc | 2 +- tools/bacommon/workspace/__init__.py | 3 + tools/bacommon/workspace/assetsv1.py | 34 ++++ tools/batools/build.py | 56 ------ tools/batools/docker.py | 173 ++++++++++++++++++ tools/batools/pcommandmain.py | 9 +- tools/batools/pcommands.py | 58 +++++- tools/efro/dataclassio/_api.py | 18 +- tools/efro/dataclassio/_base.py | 23 +++ tools/efro/dataclassio/_inputter.py | 23 +++ tools/efro/dataclassio/_outputter.py | 31 ++-- tools/efrotools/efrocache.py | 4 +- 23 files changed, 539 insertions(+), 183 deletions(-) create mode 100644 tools/bacommon/workspace/__init__.py create mode 100644 tools/bacommon/workspace/assetsv1.py create mode 100644 tools/batools/docker.py diff --git a/.efrocachemap b/.efrocachemap index 856e00b0..25ba089b 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -421,9 +421,9 @@ "build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26", "build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8", "build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55", - "build/assets/ba_data/data/langdata.json": "faffc0854bc4c34f4ef427404ec75c4d", - "build/assets/ba_data/data/languages/arabic.json": "5c27239be3d4f8daefd9f3bd7e99ff8d", - "build/assets/ba_data/data/languages/belarussian.json": "260d190aae3282a726b4a27019972d58", + "build/assets/ba_data/data/langdata.json": "7e73466677344c1722aebe94003360d5", + "build/assets/ba_data/data/languages/arabic.json": "05040616cb7585e3cce2e9acba96aa75", + "build/assets/ba_data/data/languages/belarussian.json": "3d5523d0004293aa2df02f3f6f3b84f8", "build/assets/ba_data/data/languages/chinese.json": "2f67c6b127ae85492ac552af1a91e95a", "build/assets/ba_data/data/languages/chinesetraditional.json": "319565f8a15667488f48dbce59278e39", "build/assets/ba_data/data/languages/croatian.json": "e671b9d0c012be1a30f9c15eb1b81860", @@ -432,7 +432,7 @@ "build/assets/ba_data/data/languages/dutch.json": "b0900d572c9141897d53d6574c471343", "build/assets/ba_data/data/languages/english.json": "9754e816d3bc3214b7e809950d642309", "build/assets/ba_data/data/languages/esperanto.json": "0e397cfa5f3fb8cef5f4a64f21cda880", - "build/assets/ba_data/data/languages/filipino.json": "920fc429ec9b587edc2c6294fffada71", + "build/assets/ba_data/data/languages/filipino.json": "9c04219ceeb065b3bc751e6ab3731def", "build/assets/ba_data/data/languages/french.json": "ee2a81129519d7030a617308da8c9195", "build/assets/ba_data/data/languages/german.json": "198b9860c5b9df7b8e3e30b03d8755cb", "build/assets/ba_data/data/languages/gibberish.json": "3e68d809bd6ede3b9e2c57c147737e42", @@ -443,8 +443,8 @@ "build/assets/ba_data/data/languages/italian.json": "e1d69eb1eec31442bf981121c7cfaf17", "build/assets/ba_data/data/languages/korean.json": "4e3524327a0174250aff5e1ef4c0c597", "build/assets/ba_data/data/languages/malay.json": "f6ce0426d03a62612e3e436ed5d1be1f", - "build/assets/ba_data/data/languages/persian.json": "8bd6251e46c8ca7fcd075d989e79f0d9", - "build/assets/ba_data/data/languages/polish.json": "82ad9f88c7d0499a049d2008c85aa6f1", + "build/assets/ba_data/data/languages/persian.json": "c209f8f6d3b3dd40d5ca9d36fe0721fe", + "build/assets/ba_data/data/languages/polish.json": "59ff98adfb4f515f00769d1ec229c232", "build/assets/ba_data/data/languages/portuguese.json": "615a59bd03f84659158d9f2608a4ab21", "build/assets/ba_data/data/languages/romanian.json": "b3e46efd6f869dbd78014570e037c290", "build/assets/ba_data/data/languages/russian.json": "41e06eda170fb5960393dd6b58d046e1", @@ -4038,50 +4038,50 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "9ac7439035bfc6e58c09fd333be7bf32", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "0a6c29a617a2a7f75b5ea74ae31c00ba", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "090c580f73c18253ad03fa7bdb5410c6", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "fb8aa86a244b28b683ea8148f63800e2", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "a6fb7f0164a400a8bce7c7cb2327f41b", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c6e86f716993e4db6d40b387c1887bf9", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "fdb8c01b631d5475740f0101b301ff03", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "8c58b1dff5c711bf8dfe6bcc0c033e02", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "68b0c339ca50a9d498f044d1b9c25665", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "4bd338604cf6288636422ef3b62e5d44", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "d585e0b8f0a2a1edefd52b9d9fb2fd40", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "316e826a593499760060c1c2c09fe278", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "7070657c31c247dac4d1b14607a8435f", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "606f7ed5a63fad5acbdba62b8f2e953f", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "ccfa7d16a67a8b5e28b832861433b536", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "f98f149307ee2096aa5c82fb666d96b2", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "b3d826dae3e8105e5507a50d53142b56", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "ffc3963828ad90d6da6237aa374909b9", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "21b69244af53ac854f513dbe574e9281", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "92edda56e8cc74c3552f87d766a83a8c", - "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "9162b53189b80d4e5938cd142acd2a1a", - "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "2226d0e2d34051d962320c86464f3a2d", - "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "9162b53189b80d4e5938cd142acd2a1a", - "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "2226d0e2d34051d962320c86464f3a2d", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "c2d287b53bdac7e5302fe833ac052d2c", - "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "b3942d4e7c940d86fc039ae149756d3f", - "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "c2d287b53bdac7e5302fe833ac052d2c", - "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "b3942d4e7c940d86fc039ae149756d3f", - "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "6c3d9a42b9cdc7af45f7273f76010dd5", - "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "404e2e994a58d2e930f189ab835ada45", - "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "6c3d9a42b9cdc7af45f7273f76010dd5", - "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "404e2e994a58d2e930f189ab835ada45", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "848cfd50cf15726e3acefd60204a85c5", - "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "299b6c4b83966040618b27563b700c2a", - "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "08c2f91d086e6f3fa73ebc299112358a", - "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "299b6c4b83966040618b27563b700c2a", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "50245294e53c993dd3a25db2868f22e0", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "84d98c5f0dbab599afd67a0fcf8e28d8", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "08f5b3b61056a65d7f39009426d08c48", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "3e4073e334438027320f3fcc2268357f", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "51ac5f179b08a8892580ba915452b40a", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "a61545d3d93c89c5298536c133745c5d", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "1a0c96f28a75527e975af1c023716f0f", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "0725628caf7f5baa9a59d1022f62a441", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "0c51eee4af632ca8e9132edfea6c5ef5", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "d086ea46307e571d6278a1ac00e7199f", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "4119ef59158a5572098c997a01988d42", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "6f59df95b4c858986852123b779ea70c", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "62505635f81cb7ed9804ec5b0eb43c5a", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "8e493b1b5c987401daa7cda81e7faeb9", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "bb97152641a4ce2c41722ef4da314086", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "843f0dfcd9bdc2b6886cdd1ac6ba0fc2", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "76fff737c7e5e513aa0c55d6dbe179a4", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "4e81fe4c953d35f96c81ec19f93525d3", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "33d430a5730d2c226765a11f86dd0599", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "6cd4a729aacbb3838ea020bdfc7d67d2", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "2b5f1112f0328d69f3863fb2e06a730d", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "b051c7642dfcf446dcd1657c121eac21", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "dc8e5d62bcfc1a645c028a7df7ecb738", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "4548c17cdfe8998aa8ecb31ad973ae74", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "333d8035d9233fee2e2b09c158c720e6", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3f4453380fd5d175c8fb18d8ca3ece4f", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8d19f198e01491a98bede19987b8cc8f", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2270da9585ffdca2c0eab77196c3f7d4", + "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "bb11ac758712a51791340d19121b9791", + "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "c47ac1d2e839e4e3b701a7c59080dd09", + "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "bb11ac758712a51791340d19121b9791", + "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "c47ac1d2e839e4e3b701a7c59080dd09", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "9cb1b5b345dd00b58992913677a4ad7e", + "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "8a961e945aeb0120d924ec06a162fb55", + "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "9cb1b5b345dd00b58992913677a4ad7e", + "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "8a961e945aeb0120d924ec06a162fb55", + "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "5fcc0e89141d36e5b152095bfcc21fa1", + "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "1b63b3daeff198825740a426fe5f7a9f", + "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "5fcc0e89141d36e5b152095bfcc21fa1", + "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "1b63b3daeff198825740a426fe5f7a9f", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "e86e8adff4bf043e2c3796ed499ca134", + "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "2fddab497b60617bcaa467a458e5534c", + "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "b21ff6427895bcd8628ea55a3c2d8609", + "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "2fddab497b60617bcaa467a458e5534c", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "4594d3bdd6f0d5103da725b67c442ca5", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "37f0e4fef1e9106835c572a12f8a0354", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "660139dfa55cdbc071bf43526504823b", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "a1961b9730c58599ef326b6af9da7f93", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f534609cbfc3b2743a07c0aafb380f4b", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "fd05e46d0f3acbf9dfa6a6d3b7f75926", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "db3a41fe7b3b22c90229b3ecdeb2e5ec", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "9b21b94333a5f61d45c40bcb94a53a53", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "5548f407d97e380069f6c596c4e36cd7", "src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d", diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d64062a5..c92f6428 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,7 +5,7 @@ on: - cron: '30 5 * * *' jobs: - make_docker_image: + make_docker_gui_debug_image: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,13 +16,35 @@ jobs: - name: Setup project environment run: make env - name: Make the build - run: make docker-save + run: | + make docker-gui-debug + make docker-save - name: Upload the build uses: actions/upload-artifact@v4 with: - name: docker_server(release) - path: build/docker/bombsquad_server_docker.tar + name: docker_gui(debug) + path: build/docker/bombsquad_gui_debug_docker.tar + make_docker_server_debug_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-server-debug + make docker-save + - name: Upload the build + uses: actions/upload-artifact@v4 + with: + name: docker_server(debug) + path: build/docker/bombsquad_server_debug_docker.tar + make_sphinx_docs: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 050ce036..356a19f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -208,7 +208,7 @@ jobs: allowUpdates: true artifacts: windows_x86_server_debug.tar - release_docker_image: + release_docker_gui_image: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -219,12 +219,38 @@ jobs: - name: Setup project environment run: make env - name: Make the build - run: make docker-save + run: | + make docker-gui-release + make docker-save + - name: Rename the build + run: mv build/docker/bombsquad_gui_release_docker.tar build/docker/bombsquad_docker_gui.tar - name: Upload the build uses: ncipollo/release-action@v1 with: allowUpdates: true - artifacts: build/docker/bombsquad_server_docker.tar + artifacts: build/docker/bombsquad_docker_gui.tar + + release_docker_server_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-server-release + make docker-save + - name: Rename the build + run: mv build/docker/bombsquad_server_release_docker.tar build/docker/bombsquad_docker_server.tar + - name: Upload the build + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifacts: build/docker/bombsquad_docker_server.tar release_sphinx_docs: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 779ee850..88c3c78c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.35 (build 21880, api 8, 2024-05-19) +### 1.7.35 (build 21884, api 8, 2024-06-12) - Fixed an issue where the engine would block at exit on some version of Linux until Ctrl-D was pressed in the calling terminal. - V2 accounts have been around for a while now, so the old V1 device login diff --git a/Makefile b/Makefile index cfe969d9..79fba828 100644 --- a/Makefile +++ b/Makefile @@ -1183,23 +1183,35 @@ clion-staging: assets-cmake resources meta # # ################################################################################ -# Build the docker image named bombsquad_server -docker-build: assets-cmake - $(PCOMMAND) build_docker +# Build the docker image +docker-gui-release: assets-cmake + $(PCOMMAND) build_docker_gui_release -# Run the bombsquad_server image -docker-run: - docker run -it bombsquad_server +# Build the docker image +docker-gui-debug: assets-cmake + $(PCOMMAND) build_docker_gui_debug + +# Build the docker image +docker-server-release: assets-cmake + $(PCOMMAND) build_docker_server_release, + +# Build the docker image +docker-server-debug: assets-cmake + $(PCOMMAND) build_docker_server_debug + +# Build the docker image for arm64 +docker-arm64-gui-release: assets-cmake + $(PCOMMAND) build_docker_arm64 # Save the bombsquad_server docker image to build/docker/bombsquad_server_docker.tar -docker-save: docker-build +docker-save: mkdir -p build/docker/ - docker save bombsquad_server -o build/docker/bombsquad_server_docker.tar + $(PCOMMAND) save_docker_images # Cleanup docker files docker-clean: - rm build/docker/bombsquad_server_docker.tar - docker rmi bombsquad_server --force + rm -rf build/docker/ + $(PCOMMAND) remove_docker_images docker system prune diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index 957ad891..f6d54d7c 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -1,21 +1,24 @@ # if provided it will make debug build ARG cmake_build_type=Release - -# system to start with the build with -# currently will break for non ubuntu system -ARG base_image=ubuntu:24.04 +# whether to make GUI or headless build (defaults to headless) +ARG headless_build=1 +# system to start with the build with +# currently will break for other images +ARG base_image=ubuntu:latest #-------------------------------BUILDER-------------------------------- # Start with the base image FROM ${base_image} AS builder # Renew the arg +ARG headless_build ARG cmake_build_type ENV LANG en_US.utf8 ENV LANGUAGE=en_US ENV DEBIAN_FRONTEND=noninteractive ENV CMAKE_BUILD_TYPE=${cmake_build_type} +ENV HEADLESS_BUILD=${headless_build} # Install build dependencies RUN apt-get update -y && \ @@ -24,25 +27,31 @@ RUN apt-get update -y && \ python3.12-venv \ python3-pip \ libsdl2-dev \ - libvorbisfile3 \ - freeglut3-dev \ + libglut-dev \ libopenal-dev \ + libvorbis-dev \ make \ curl \ rsync \ clang-format \ - cmake \ - libvorbis-dev + cmake # Copy source code -COPY ./ /home/ubuntu/ballistica +COPY ./ /ballistica -WORKDIR /home/ubuntu/ballistica +WORKDIR /ballistica # Compile the application -RUN make cmake-server-build \ - && mkdir ./../ballistica_cmake_server \ - && mv build/cmake/* ./../ballistica_cmake_server +RUN mkdir /ballistica_cmake && \ + if [ "$HEADLESS_BUILD" != "0" ]; then \ + make cmake-server-build && \ + mv build/cmake/*/ballisticakit_headless build/cmake/*/staged/dist; \ + else \ + make cmake-build && \ + mv build/cmake/*/ballisticakit build/cmake/*/staged/; \ + fi && \ + mv build/cmake/*/staged/* /ballistica_cmake + #-------------------------------RUNNER-------------------------------- # Create a new stage for the runtime environment @@ -53,33 +62,36 @@ ENV LANGUAGE=en_US ENV DEBIAN_FRONTEND=noninteractive # Renew the arg +ARG headless_build +ENV HEADLESS_BUILD=${headless_build} ARG cmake_build_type -LABEL BUILD_TYPE=${cmake_build_type} -ARG bombsquad_build=N/A -LABEL BOMBSQUAD_BUILD=${bombsquad_build} - -ARG bombsquad_version=N/A -LABEL BOMBSQUAD_VERSION=${bombsquad_version} +LABEL BOMBSQUAD_BUILD_TYPE=${cmake_build_type} # Install runtime dependencies RUN apt-get update -y && \ apt-get install -y \ - python3.12-dev \ - && rm -rf /var/lib/apt/lists/* \ - && python3.12 -c "import uuid;print(uuid.uuid4())">/etc/machine-id + python3.12-dev && \ + if [ "$HEADLESS_BUILD" = "0" ]; then \ + apt-get install -y \ + libsdl2-dev \ + libvorbis-dev \ + libglut-dev \ + libopenal-dev; \ + fi && \ + rm -rf /var/lib/apt/lists/* && \ + dbus-uuidgen > /etc/machine-id # Copy the compiled application from the builder stage -COPY --from=builder /home/ubuntu/ballistica_cmake_server/*/staged \ +COPY --from=builder /ballistica_cmake \ /home/ubuntu/ballistica -# ballisticakit_headless in staged is a symlink -COPY --from=builder /home/ubuntu/ballistica_cmake_server/*/ballisticakit_headless \ - /home/ubuntu/ballistica/dist WORKDIR /home/ubuntu/ballistica +RUN ln -s ballisticakit* run + # Expose the necessary port -EXPOSE 43210/udp +EXPOSE 43210/udp # Set the default command to run the application -CMD [ "./ballisticakit_server" ] \ No newline at end of file +CMD [ "./run" ] \ No newline at end of file diff --git a/config/requirements.txt b/config/requirements.txt index 4988589f..f0c0d8b6 100644 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -6,16 +6,16 @@ mypy==1.10.0 pbxproj==4.1.0 pdoc==14.5.0 pur==7.3.1 -pylint==3.2.1 +pylint==3.2.2 pylsp-mypy==0.6.8 -pytest==8.2.0 +pytest==8.2.1 python-daemon==3.0.1 python-lsp-black==2.0.0 python-lsp-server==1.11.0 -requests==2.31.0 +requests==2.32.3 Sphinx==7.3.7 tomlkit==0.12.5 types-certifi==2021.10.8.3 types-filelock==3.2.7 -types-requests==2.31.0.20240406 -typing_extensions==4.11.0 +types-requests==2.32.0.20240523 +typing_extensions==4.12.0 diff --git a/src/assets/.asset_manifest_public.json b/src/assets/.asset_manifest_public.json index 38cfd626..e7346f00 100644 --- a/src/assets/.asset_manifest_public.json +++ b/src/assets/.asset_manifest_public.json @@ -116,6 +116,10 @@ "ba_data/python/bacommon/net.py", "ba_data/python/bacommon/servermanager.py", "ba_data/python/bacommon/transfer.py", + "ba_data/python/bacommon/workspace/__init__.py", + "ba_data/python/bacommon/workspace/__pycache__/__init__.cpython-312.opt-1.pyc", + "ba_data/python/bacommon/workspace/__pycache__/assetsv1.cpython-312.opt-1.pyc", + "ba_data/python/bacommon/workspace/assetsv1.py", "ba_data/python/baenv.py", "ba_data/python/baplus/__init__.py", "ba_data/python/baplus/__pycache__/__init__.cpython-312.opt-1.pyc", diff --git a/src/assets/Makefile b/src/assets/Makefile index f7da779c..88ae95d2 100644 --- a/src/assets/Makefile +++ b/src/assets/Makefile @@ -733,6 +733,8 @@ SCRIPT_TARGETS_PY_PUBLIC_TOOLS = \ $(BUILD_DIR)/ba_data/python/bacommon/net.py \ $(BUILD_DIR)/ba_data/python/bacommon/servermanager.py \ $(BUILD_DIR)/ba_data/python/bacommon/transfer.py \ + $(BUILD_DIR)/ba_data/python/bacommon/workspace/__init__.py \ + $(BUILD_DIR)/ba_data/python/bacommon/workspace/assetsv1.py \ $(BUILD_DIR)/ba_data/python/efro/__init__.py \ $(BUILD_DIR)/ba_data/python/efro/call.py \ $(BUILD_DIR)/ba_data/python/efro/cloudshell.py \ @@ -768,6 +770,8 @@ SCRIPT_TARGETS_PYC_PUBLIC_TOOLS = \ $(BUILD_DIR)/ba_data/python/bacommon/__pycache__/net.cpython-312.opt-1.pyc \ $(BUILD_DIR)/ba_data/python/bacommon/__pycache__/servermanager.cpython-312.opt-1.pyc \ $(BUILD_DIR)/ba_data/python/bacommon/__pycache__/transfer.cpython-312.opt-1.pyc \ + $(BUILD_DIR)/ba_data/python/bacommon/workspace/__pycache__/__init__.cpython-312.opt-1.pyc \ + $(BUILD_DIR)/ba_data/python/bacommon/workspace/__pycache__/assetsv1.cpython-312.opt-1.pyc \ $(BUILD_DIR)/ba_data/python/efro/__pycache__/__init__.cpython-312.opt-1.pyc \ $(BUILD_DIR)/ba_data/python/efro/__pycache__/call.cpython-312.opt-1.pyc \ $(BUILD_DIR)/ba_data/python/efro/__pycache__/cloudshell.cpython-312.opt-1.pyc \ diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 9acc46e5..0958e534 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21880 +TARGET_BALLISTICA_BUILD = 21884 TARGET_BALLISTICA_VERSION = '1.7.35' diff --git a/src/ballistica/base/platform/base_platform.cc b/src/ballistica/base/platform/base_platform.cc index d07e2ab0..4fb91846 100644 --- a/src/ballistica/base/platform/base_platform.cc +++ b/src/ballistica/base/platform/base_platform.cc @@ -64,8 +64,8 @@ auto BasePlatform::GetPublicDeviceUUID() -> std::string { // We used to plug version in directly here, but that caused uuids to // shuffle too rapidly during periods of rapid development. This // keeps it more constant. - // __last_rand_uuid_component_shuffle_date__ 2023 12 13 - auto rand_uuid_component{"7YM96RZHN6ZCPZGTQONULZO1JU5NMMC7"}; + // __last_rand_uuid_component_shuffle_date__ 2024 6 12 + auto rand_uuid_component{"WI5XDVM7QQBD4G6O0GS2DW6IPJ4VQT9X"}; inputs.emplace_back(rand_uuid_component); auto gil{Python::ScopedInterpreterLock()}; diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 75acd734..395a3093 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21880; +const int kEngineBuildNumber = 21884; const char* kEngineVersion = "1.7.35"; const int kEngineApiVersion = 8; diff --git a/tools/bacommon/workspace/__init__.py b/tools/bacommon/workspace/__init__.py new file mode 100644 index 00000000..c17a0f04 --- /dev/null +++ b/tools/bacommon/workspace/__init__.py @@ -0,0 +1,3 @@ +# Released under the MIT License. See LICENSE for details. +# +"""Workspace functionality.""" diff --git a/tools/bacommon/workspace/assetsv1.py b/tools/bacommon/workspace/assetsv1.py new file mode 100644 index 00000000..1bc68c0a --- /dev/null +++ b/tools/bacommon/workspace/assetsv1.py @@ -0,0 +1,34 @@ +# Released under the MIT License. See LICENSE for details. +# +"""Defines workspace behavior.""" + +from __future__ import annotations + +from dataclasses import dataclass +from typing import TYPE_CHECKING, Annotated + +from efro.dataclassio import ioprepped, IOAttrs + + +if TYPE_CHECKING: + pass + + +@ioprepped +@dataclass +class AssetsV1GlobalVals: + """Global values for an assets_v1 workspace.""" + + # Just dummy testing values for now. + emit: Annotated[bool, IOAttrs('emit')] + aggro: Annotated[float, IOAttrs('aggro')] + + +@ioprepped +@dataclass +class AssetsV1PathVals: + """Path-specific values for an assets_v1 workspace path.""" + + # Just dummy testing values for now. + width: Annotated[int, IOAttrs('width')] + height: Annotated[int, IOAttrs('height')] diff --git a/tools/batools/build.py b/tools/batools/build.py index 940d8d19..bb0bf65c 100644 --- a/tools/batools/build.py +++ b/tools/batools/build.py @@ -644,59 +644,3 @@ def cmake_prep_dir(dirname: str, verbose: bool = False) -> None: else: if verbose: print(f'{Clr.BLD}{title}:{Clr.RST} Keeping existing build dir.') - - -def _docker_build( - image_name: str, - dockerfile_dir: str, - bombsquad_version: str | None = None, - bombsquad_build: str | int | None = None, - cmake_build_type: str | None = None, -) -> None: - - build_cmd = [ - 'docker', - 'image', - 'build', - '-t', - image_name, - '-f', - dockerfile_dir, - '.', - ] - if bombsquad_version is not None: - build_cmd = build_cmd + [ - '--build-arg', - f'bombsquad_version={bombsquad_version}', - ] - if bombsquad_build is not None: - build_cmd = build_cmd + [ - '--build-arg', - f'bombsquad_build={str(bombsquad_build)}', - ] - if cmake_build_type is not None: - build_cmd = build_cmd + [ - '--build-arg', - f'cmake_build_type={cmake_build_type}', - ] - subprocess.run(build_cmd, check=True) - - -def docker_build() -> None: - """Build docker image.""" - # todo: add option to toggle between prefab and cmake - from batools import version - - version_num, build_num = version.get_current_version() - image_name = 'bombsquad_server' - - print( - f'Building docker image {image_name}' - + 'version {version_num}:{build_num}' - ) - _docker_build( - image_name, - 'config/docker/Dockerfile', - version_num, - build_num, - ) diff --git a/tools/batools/docker.py b/tools/batools/docker.py new file mode 100644 index 00000000..68d6c5d6 --- /dev/null +++ b/tools/batools/docker.py @@ -0,0 +1,173 @@ +# Released under the MIT License. See LICENSE for details. +# +"""General functionality related to docker builds.""" + +import subprocess + + +def _docker_build( + image_name: str, + dockerfile_dir: str, + cmake_build_type: str | None = None, + labels: dict[str, str] | None = None, + platform: str | None = None, + headless_build: bool | str | None = None, +) -> None: + + build_cmd = [ + 'docker', + 'buildx', + 'build', + '--tag', + image_name, + '--file', + dockerfile_dir, + '--load', + '.', + ] + + if cmake_build_type is not None: + build_cmd = build_cmd + [ + '--build-arg', + f'cmake_build_type={cmake_build_type}', + ] + if headless_build is not None: + if headless_build: + headless_build = '1' + else: + headless_build = '0' + build_cmd = build_cmd + [ + '--build-arg', + f'headless_build={headless_build}', + ] + if platform is not None: + build_cmd = build_cmd + [ + '--platform', + platform, + ] + if labels is not None: + build_cmd = build_cmd + [ + f'--label={i}={labels[i]}' for i in labels.keys() + ] + subprocess.run(build_cmd, check=True) + + +def docker_build( + platform: str | None = 'linux/amd64', + headless_build: bool | str | None = None, + build_type: str | None = None, +) -> None: + """Build docker image. + platform == 'linux/arm64' or platform == 'linux/amd64'""" + from batools import version + + version_num, build_num = version.get_current_version() + if headless_build is None: + headless_build = True + if build_type is None: + build_type = 'Release' + + image_name = get_docker_image_name( + headless_build=headless_build, build_type=build_type + ) + + if platform is not None and 'arm64' in platform: + config_file = 'config/docker/Dockerfile_arm64' + else: + config_file = 'config/docker/Dockerfile' + + print( + f'Building docker image {image_name} ' + + f'version {version_num}:{build_num}' + ) + + _docker_build( + image_name, + config_file, + labels={ + 'bombsquad_version': version_num, + 'bombsquad_build': str(build_num), + }, + platform=platform, + headless_build=headless_build, + cmake_build_type=build_type, + ) + + +def get_docker_image_name(headless_build: bool | str, build_type: str) -> str: + """Get name of docker images in predefined format.""" + name = 'bombsquad' + if headless_build: + name += '_server' + else: + name += '_gui' + if 'release' in build_type.lower(): + name += '_release' + else: + name += '_debug' + return name + + +def docker_save_images() -> None: + """Saves bombsquad images loaded into docker.""" + output = subprocess.run( + ['docker', 'images'], capture_output=True, text=True, check=True + ) + save_cmd = ['docker', 'save', '-o'] + # we expect this directory is already present from Makefile + build_save_dir = 'build/docker/' + + img_name = get_docker_image_name(headless_build=True, build_type='Release') + if img_name in output.stdout: + subprocess.run( + save_cmd + [build_save_dir + img_name + '_docker.tar', img_name], + check=True, + ) + + img_name = get_docker_image_name(headless_build=True, build_type='Debug') + if img_name in output.stdout: + subprocess.run( + save_cmd + [build_save_dir + img_name + '_docker.tar', img_name], + check=True, + ) + + img_name = get_docker_image_name(headless_build=False, build_type='Release') + if img_name in output.stdout: + subprocess.run( + save_cmd + [build_save_dir + img_name + '_docker.tar', img_name], + check=True, + ) + + img_name = get_docker_image_name(headless_build=False, build_type='Debug') + if img_name in output.stdout: + subprocess.run( + save_cmd + [build_save_dir + img_name + '_docker.tar', img_name], + check=True, + ) + + +def docker_remove_images() -> None: + """Remove the bombsquad images loaded in docker.""" + output = subprocess.run( + ['docker', 'images'], capture_output=True, text=True, check=True + ) + remove_cmd = [ + 'docker', + 'rmi', + ] + + img_name = get_docker_image_name(headless_build=True, build_type='Release') + if img_name in output.stdout: + subprocess.run(remove_cmd + [img_name], check=True) + + img_name = get_docker_image_name(headless_build=True, build_type='Debug') + if img_name in output.stdout: + subprocess.run(remove_cmd + [img_name], check=True) + + img_name = get_docker_image_name(headless_build=False, build_type='Release') + if img_name in output.stdout: + subprocess.run(remove_cmd + [img_name], check=True) + + img_name = get_docker_image_name(headless_build=False, build_type='Debug') + if img_name in output.stdout: + subprocess.run(remove_cmd + [img_name], check=True) diff --git a/tools/batools/pcommandmain.py b/tools/batools/pcommandmain.py index 581af8d8..d50fa1f1 100644 --- a/tools/batools/pcommandmain.py +++ b/tools/batools/pcommandmain.py @@ -104,7 +104,14 @@ from batools.pcommands import ( ensure_prefab_platform, prefab_run_var, prefab_binary_path, - build_docker, + build_docker_gui_release, + build_docker_gui_debug, + build_docker_server_release, + build_docker_server_debug, + build_docker_arm64_gui_release, + build_docker_arm64_server_release, + save_docker_images, + remove_docker_images, make_prefab, lazybuild, efro_gradle, diff --git a/tools/batools/pcommands.py b/tools/batools/pcommands.py index d5a08277..f8f85203 100644 --- a/tools/batools/pcommands.py +++ b/tools/batools/pcommands.py @@ -9,6 +9,7 @@ import sys from efrotools import pcommand +# pylint: disable=too-many-lines def prune_includes() -> None: """Check for unnecessary includes in C++ files. @@ -667,11 +668,60 @@ def prefab_binary_path() -> None: ) -def build_docker() -> None: - """Build the docker image with bombsquad cmake server.""" - import batools.build +def build_docker_gui_release() -> None: + """Build the docker image with bombsquad cmake gui.""" + import batools.docker - batools.build.docker_build() + batools.docker.docker_build(headless_build=False) + + +def build_docker_gui_debug() -> None: + """Build the docker image with bombsquad debug cmake gui.""" + import batools.docker + + batools.docker.docker_build(headless_build=False, build_type='Debug') + + +def build_docker_server_release() -> None: + """Build the docker image with bombsquad cmake server.""" + import batools.docker + + batools.docker.docker_build() + + +def build_docker_server_debug() -> None: + """Build the docker image with bombsquad debug cmake server.""" + import batools.docker + + batools.docker.docker_build(build_type='Debug') + + +def build_docker_arm64_gui_release() -> None: + """Build the docker image with bombsquad cmake for arm64.""" + import batools.docker + + batools.docker.docker_build(headless_build=False, platform='linux/arm64') + + +def build_docker_arm64_server_release() -> None: + """Build the docker image with bombsquad cmake server for arm64.""" + import batools.docker + + batools.docker.docker_build(platform='linux/arm64') + + +def save_docker_images() -> None: + """Saves bombsquad images loaded into docker.""" + import batools.docker + + batools.docker.docker_save_images() + + +def remove_docker_images() -> None: + """Remove the bombsquad images loaded in docker.""" + import batools.docker + + batools.docker.docker_remove_images() def make_prefab() -> None: diff --git a/tools/efro/dataclassio/_api.py b/tools/efro/dataclassio/_api.py index ae0554e3..7475cbab 100644 --- a/tools/efro/dataclassio/_api.py +++ b/tools/efro/dataclassio/_api.py @@ -44,6 +44,7 @@ def dataclass_to_dict( obj: Any, codec: Codec = Codec.JSON, coerce_to_float: bool = True, + discard_extra_attrs: bool = False, ) -> dict: """Given a dataclass object, return a json-friendly dict. @@ -62,7 +63,11 @@ def dataclass_to_dict( """ out = _Outputter( - obj, create=True, codec=codec, coerce_to_float=coerce_to_float + obj, + create=True, + codec=codec, + coerce_to_float=coerce_to_float, + discard_extra_attrs=discard_extra_attrs, ).run() assert isinstance(out, dict) return out @@ -157,14 +162,21 @@ def dataclass_from_json( def dataclass_validate( - obj: Any, coerce_to_float: bool = True, codec: Codec = Codec.JSON + obj: Any, + coerce_to_float: bool = True, + codec: Codec = Codec.JSON, + discard_extra_attrs: bool = False, ) -> None: """Ensure that values in a dataclass instance are the correct types.""" # Simply run an output pass but tell it not to generate data; # only run validation. _Outputter( - obj, create=False, codec=codec, coerce_to_float=coerce_to_float + obj, + create=False, + codec=codec, + coerce_to_float=coerce_to_float, + discard_extra_attrs=discard_extra_attrs, ).run() diff --git a/tools/efro/dataclassio/_base.py b/tools/efro/dataclassio/_base.py index 3c38975d..246b04e7 100644 --- a/tools/efro/dataclassio/_base.py +++ b/tools/efro/dataclassio/_base.py @@ -61,6 +61,29 @@ class IOExtendedData: type-safe form. """ + # pylint: disable=useless-return + + @classmethod + def handle_input_error(cls, exc: Exception) -> Self | None: + """Called when an error occurs during input decoding. + + This allows a type to optionally return substitute data + to be used in place of the failed decode. If it returns + None, the original exception is re-raised. + + It is generally a bad idea to apply catch-alls such as this, + as it can lead to silent data loss. This should only be used + in specific cases such as user settings where an occasional + reset is harmless and is preferable to keeping all contained + enums and other values backward compatible indefinitely. + """ + del exc # Unused. + + # By default we let things fail. + return None + + # pylint: enable=useless-return + EnumT = TypeVar('EnumT', bound=Enum) diff --git a/tools/efro/dataclassio/_inputter.py b/tools/efro/dataclassio/_inputter.py index 41588e98..e913816f 100644 --- a/tools/efro/dataclassio/_inputter.py +++ b/tools/efro/dataclassio/_inputter.py @@ -236,6 +236,28 @@ class _Inputter: sets should be passed as lists, enums should be passed as their associated values, and nested dataclasses should be passed as dicts. """ + try: + return self._do_dataclass_from_input(cls, fieldpath, values) + except Exception as exc: + # Extended data types can choose to sub default data in case + # of failures (generally not a good idea but occasionally + # useful). + if issubclass(cls, IOExtendedData): + fallback = cls.handle_input_error(exc) + if fallback is None: + raise + # Make sure fallback gave us the right type. + if not isinstance(fallback, cls): + raise RuntimeError( + f'handle_input_error() was expected to return a {cls}' + f' but returned a {type(fallback)}.' + ) from exc + return fallback + raise + + def _do_dataclass_from_input( + self, cls: type, fieldpath: str, values: dict + ) -> Any: # pylint: disable=too-many-locals # pylint: disable=too-many-statements # pylint: disable=too-many-branches @@ -377,6 +399,7 @@ class _Inputter: create=False, codec=self._codec, coerce_to_float=self._coerce_to_float, + discard_extra_attrs=False, ) self._soft_default_validator.soft_default_check( value=value, anntype=anntype, fieldpath=fieldpath diff --git a/tools/efro/dataclassio/_outputter.py b/tools/efro/dataclassio/_outputter.py index 56417ddc..d9f9acec 100644 --- a/tools/efro/dataclassio/_outputter.py +++ b/tools/efro/dataclassio/_outputter.py @@ -38,12 +38,18 @@ class _Outputter: """Validates or exports data contained in a dataclass instance.""" def __init__( - self, obj: Any, create: bool, codec: Codec, coerce_to_float: bool + self, + obj: Any, + create: bool, + codec: Codec, + coerce_to_float: bool, + discard_extra_attrs: bool, ) -> None: self._obj = obj self._create = create self._codec = codec self._coerce_to_float = coerce_to_float + self._discard_extra_attrs = discard_extra_attrs def run(self) -> Any: """Do the thing.""" @@ -133,17 +139,18 @@ class _Outputter: out[storagename] = outvalue # If there's extra-attrs stored on us, check/include them. - extra_attrs = getattr(obj, EXTRA_ATTRS_ATTR, None) - if isinstance(extra_attrs, dict): - if not _is_valid_for_codec(extra_attrs, self._codec): - raise TypeError( - f'Extra attrs on \'{fieldpath}\' contains data type(s)' - f' not supported by \'{self._codec.value}\' codec:' - f' {extra_attrs}.' - ) - if self._create: - assert out is not None - out.update(extra_attrs) + if not self._discard_extra_attrs: + extra_attrs = getattr(obj, EXTRA_ATTRS_ATTR, None) + if isinstance(extra_attrs, dict): + if not _is_valid_for_codec(extra_attrs, self._codec): + raise TypeError( + f'Extra attrs on \'{fieldpath}\' contains data type(s)' + f' not supported by \'{self._codec.value}\' codec:' + f' {extra_attrs}.' + ) + if self._create: + assert out is not None + out.update(extra_attrs) # If this obj inherits from multi-type, store its type id. if isinstance(obj, IOMultiType): diff --git a/tools/efrotools/efrocache.py b/tools/efrotools/efrocache.py index c25cbf04..6f92b731 100644 --- a/tools/efrotools/efrocache.py +++ b/tools/efrotools/efrocache.py @@ -28,8 +28,6 @@ from efro.dataclassio import ( ) from efro.terminal import Clr -from efrotools.util import is_wsl_windows_build_path - if TYPE_CHECKING: import efro.terminal @@ -661,6 +659,8 @@ def _write_cache_file(staging_dir: str, fname: str) -> tuple[str, str, str]: def _cache_prefix_for_file(fname: str) -> bytes: # pylint: disable=global-statement + from efrotools.util import is_wsl_windows_build_path + global g_cache_prefix_exec global g_cache_prefix_noexec From fe2b40054f11aea481273811ab81179b3e3fdcc4 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Thu, 13 Jun 2024 18:19:35 +0530 Subject: [PATCH 16/26] finishing touches --- CHANGELOG.md | 2 +- CONTRIBUTORS.md | 3 ++- Makefile | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c3c78c..2a0337b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,7 +60,7 @@ multiple `SockAddr`s; it will attempt to contact the host on all of them and use whichever responds first. This allows us to pass both ipv4 and ipv6 addresses when available and transparently use whichever is more performant. -- Added `docker-build`, `docker-run`, `docker-clean` and `docker-save` targets +- Added `docker-gui-release`, `docker-gui-debug`, `docker-server-release`, `docker-server-debug`, `docker-clean` and `docker-save` targets to Makefile. - Fixed an issue in Assault where being teleported back to base with a sticky bomb stuck to you would do some crazy rubber-band-launching thing (Thanks diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 30865a77..2aaa069b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -64,4 +64,5 @@ ### Loup Garou - Added sphinx documentation generation -- Added docker build \ No newline at end of file +- Added docker build system +- Various CI/CD improvements \ No newline at end of file diff --git a/Makefile b/Makefile index 79fba828..9cbdb0f9 100644 --- a/Makefile +++ b/Makefile @@ -1193,7 +1193,7 @@ docker-gui-debug: assets-cmake # Build the docker image docker-server-release: assets-cmake - $(PCOMMAND) build_docker_server_release, + $(PCOMMAND) build_docker_server_release # Build the docker image docker-server-debug: assets-cmake From f1e766d86a9f38b674162d1815c8c9615ae53f01 Mon Sep 17 00:00:00 2001 From: Loup <90267658+Loup-Garou911XD@users.noreply.github.com> Date: Thu, 13 Jun 2024 18:32:42 +0530 Subject: [PATCH 17/26] Update Dockerfile --- config/docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index f6d54d7c..70baa30d 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -80,7 +80,7 @@ RUN apt-get update -y && \ libopenal-dev; \ fi && \ rm -rf /var/lib/apt/lists/* && \ - dbus-uuidgen > /etc/machine-id + python3 -c 'import uuid; print(uuid.uuid4()) > /etc/machine-id' # Copy the compiled application from the builder stage COPY --from=builder /ballistica_cmake \ @@ -94,4 +94,4 @@ RUN ln -s ballisticakit* run EXPOSE 43210/udp # Set the default command to run the application -CMD [ "./run" ] \ No newline at end of file +CMD [ "./run" ] From 89f0d1b55be117cf59195b47775168e4b23b1550 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Thu, 13 Jun 2024 18:46:55 +0530 Subject: [PATCH 18/26] oopsies --- config/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index 70baa30d..29b8aa9c 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -80,7 +80,7 @@ RUN apt-get update -y && \ libopenal-dev; \ fi && \ rm -rf /var/lib/apt/lists/* && \ - python3 -c 'import uuid; print(uuid.uuid4()) > /etc/machine-id' + python3 -c 'import uuid; print(uuid.uuid4())' > /etc/machine-id # Copy the compiled application from the builder stage COPY --from=builder /ballistica_cmake \ From 56341a0255bd7090cb8bf74a7eb059b987c9a951 Mon Sep 17 00:00:00 2001 From: Loup <90267658+Loup-Garou911XD@users.noreply.github.com> Date: Thu, 13 Jun 2024 18:52:07 +0530 Subject: [PATCH 19/26] Update Dockerfile --- config/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index 29b8aa9c..32c64b1f 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -80,7 +80,7 @@ RUN apt-get update -y && \ libopenal-dev; \ fi && \ rm -rf /var/lib/apt/lists/* && \ - python3 -c 'import uuid; print(uuid.uuid4())' > /etc/machine-id + python3.12 -c 'import uuid; print(uuid.uuid4())' > /etc/machine-id # Copy the compiled application from the builder stage COPY --from=builder /ballistica_cmake \ From 1762cc9050cf57bb25148ad937c6b32c50283fc6 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Sat, 15 Jun 2024 22:37:46 +0530 Subject: [PATCH 20/26] Added a env variable for fixing warning in build --- config/docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index 32c64b1f..09b6eba3 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -14,8 +14,9 @@ FROM ${base_image} AS builder ARG headless_build ARG cmake_build_type -ENV LANG en_US.utf8 +ENV LANG=en_US.utf8 ENV LANGUAGE=en_US +ENV LC_ALL=en_US.utf8 ENV DEBIAN_FRONTEND=noninteractive ENV CMAKE_BUILD_TYPE=${cmake_build_type} ENV HEADLESS_BUILD=${headless_build} From f79b9dee26627ffbaf39b118487e262dea0c357d Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Sat, 15 Jun 2024 22:41:53 +0530 Subject: [PATCH 21/26] missed a bit --- config/docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index 09b6eba3..dd378535 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -60,6 +60,7 @@ FROM ${base_image} ENV LANG en_US.utf8 ENV LANGUAGE=en_US +ENV LC_ALL=en_US.utf8 ENV DEBIAN_FRONTEND=noninteractive # Renew the arg From 28d4bfc8f93646bf086df2faf0348b68b77c6453 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 17 Jun 2024 02:38:38 +0530 Subject: [PATCH 22/26] added arm64 dockerfile --- config/docker/Dockerfile_arm64 | 123 +++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 config/docker/Dockerfile_arm64 diff --git a/config/docker/Dockerfile_arm64 b/config/docker/Dockerfile_arm64 new file mode 100644 index 00000000..d2457192 --- /dev/null +++ b/config/docker/Dockerfile_arm64 @@ -0,0 +1,123 @@ +# if provided it will make debug build +ARG cmake_build_type=Release +# whether to make GUI or headless build (defaults to headless) +ARG headless_build=1 +# system to start with the build with +# currently will break for other images +ARG base_image=ubuntu:latest + +#-------------------------------BUILDER-------------------------------- +# Start with the base image +FROM --platform=linux/arm64 ${base_image} AS builder + +# Renew the ARGs +ARG headless_build +ARG cmake_build_type + +# Environment settings +ENV LANG en_US.utf8 +ENV LANGUAGE=en_US +ENV DEBIAN_FRONTEND=noninteractive +ENV CMAKE_BUILD_TYPE=${cmake_build_type} +ENV HEADLESS_BUILD=${headless_build} + +# Enable ARM64 architecture and update package lists +RUN dpkg --add-architecture arm64 && apt-get update -y + +# Install necessary tools to create users and groups +RUN apt-get install -y adduser \ + && apt-cache search clang-tools + +# Configure dpkg to skip systemd post-installation scripts +RUN mkdir -p /etc/systemd/system && \ + echo "exit 0" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d && \ + apt-get install -y --no-install-recommends \ +# testing + clang + +RUN apt-get install -y --no-install-recommends \ + python3.12-dev \ + python3.12-venv \ + python3-pip \ + libsdl2-dev \ + libglut-dev \ + libopenal-dev \ + make \ + curl \ + rsync \ + clang-format \ + cmake \ + libvorbis-dev \ + build-essential \ + && rm /usr/sbin/policy-rc.d + +# Copy source code +COPY ./ /home/ubuntu/ballistica + +# Set the working directory +WORKDIR /home/ubuntu/ballistica + +# Compile the application +RUN mkdir /ballistica_cmake && \ + if [ "$HEADLESS_BUILD" != "0" ]; then \ + make cmake-server-build && \ + mv build/cmake/*/ballisticakit_headless build/cmake/*/staged/dist; \ + else \ + make cmake-build && \ + mv build/cmake/*/ballisticakit build/cmake/*/staged/; \ + fi && \ + mv build/cmake/*/staged/* /ballistica_cmake + +#-------------------------------RUNNER-------------------------------- +# Create a new stage for the runtime environment using ARM64 base image +FROM --platform=linux/arm64 ${base_image} + +# Environment settings +ENV LANG en_US.utf8 +ENV LANGUAGE=en_US +ENV DEBIAN_FRONTEND=noninteractive + +# Renew the ARGs +ARG headless_build +ENV HEADLESS_BUILD=${headless_build} +ARG cmake_build_type +LABEL BOMBSQUAD_BUILD_TYPE=${cmake_build_type} + +# Install necessary tools to create users and groups +RUN apt-get update -y && apt-get install -y adduser + +# Pre-create necessary users and groups to avoid systemd configuration errors +RUN addgroup --system systemd-journal && \ + adduser --system --no-create-home --ingroup systemd-journal systemd-network + +# Configure dpkg to skip systemd post-installation scripts +RUN mkdir -p /etc/systemd/system && \ + echo "exit 0" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d && \ + apt-get update -y && \ + apt-get install -y \ + python3.12-dev && \ + if [ "$HEADLESS_BUILD" = "0" ]; then \ + apt-get install -y \ + libsdl2-dev \ + libvorbis-dev \ + libglut-dev \ + libopenal-dev; \ + fi && \ + rm -rf /var/lib/apt/lists/* && \ + python3.12 -c "import uuid;print(uuid.uuid4())" > /etc/machine-id && \ + rm /usr/sbin/policy-rc.d + +# Copy the compiled application from the builder stage +COPY --from=builder /ballistica_cmake \ + /home/ubuntu/ballistica + + # Set the working directory +WORKDIR /home/ubuntu/ballistica + +RUN ln -s ballisticakit* run + +# Expose the necessary port +EXPOSE 43210/udp + +# Set the default command to run the application +CMD [ "./run" ] \ No newline at end of file From a526c0a0fc93957318b0485414091ec5444f8d27 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 17 Jun 2024 02:45:23 +0530 Subject: [PATCH 23/26] fixed makefile target --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9cbdb0f9..e93a30f3 100644 --- a/Makefile +++ b/Makefile @@ -1183,25 +1183,29 @@ clion-staging: assets-cmake resources meta # # ################################################################################ -# Build the docker image +# Build the gui release docker image docker-gui-release: assets-cmake $(PCOMMAND) build_docker_gui_release -# Build the docker image +# Build the gui debug docker image docker-gui-debug: assets-cmake $(PCOMMAND) build_docker_gui_debug -# Build the docker image +# Build the server release docker image docker-server-release: assets-cmake $(PCOMMAND) build_docker_server_release -# Build the docker image +# Build the server debug docker image docker-server-debug: assets-cmake $(PCOMMAND) build_docker_server_debug -# Build the docker image for arm64 +# Build the gui release docker image for arm64 docker-arm64-gui-release: assets-cmake - $(PCOMMAND) build_docker_arm64 + $(PCOMMAND) build_docker_arm64_gui_release + +# Build the server release docker image for arm64 +docker-arm64-server-release: assets-cmake + $(PCOMMAND) build_docker_arm64_server_release # Save the bombsquad_server docker image to build/docker/bombsquad_server_docker.tar docker-save: From ce26be21cfb4a2fedbf27b449fa16dd2e1f4a78f Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 16 Jun 2024 15:39:27 -0700 Subject: [PATCH 24/26] v1.7.35 --- .efrocachemap | 128 +++++++++--------- CHANGELOG.md | 15 +- Makefile | 87 +++++++----- config/requirements.txt | 12 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/base/platform/base_platform.cc | 4 +- src/ballistica/shared/ballistica.cc | 2 +- tools/efro/error.py | 6 +- tools/efro/message/_protocol.py | 14 +- tools/efro/message/_receiver.py | 3 +- tools/efro/message/_sender.py | 23 +++- tools/efrotools/pybuild.py | 11 ++ 12 files changed, 166 insertions(+), 141 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 25ba089b..cfbb8331 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -421,7 +421,7 @@ "build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26", "build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8", "build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55", - "build/assets/ba_data/data/langdata.json": "7e73466677344c1722aebe94003360d5", + "build/assets/ba_data/data/langdata.json": "b83c9445922f68152c5d0efa1f0fe608", "build/assets/ba_data/data/languages/arabic.json": "05040616cb7585e3cce2e9acba96aa75", "build/assets/ba_data/data/languages/belarussian.json": "3d5523d0004293aa2df02f3f6f3b84f8", "build/assets/ba_data/data/languages/chinese.json": "2f67c6b127ae85492ac552af1a91e95a", @@ -432,21 +432,21 @@ "build/assets/ba_data/data/languages/dutch.json": "b0900d572c9141897d53d6574c471343", "build/assets/ba_data/data/languages/english.json": "9754e816d3bc3214b7e809950d642309", "build/assets/ba_data/data/languages/esperanto.json": "0e397cfa5f3fb8cef5f4a64f21cda880", - "build/assets/ba_data/data/languages/filipino.json": "9c04219ceeb065b3bc751e6ab3731def", - "build/assets/ba_data/data/languages/french.json": "ee2a81129519d7030a617308da8c9195", + "build/assets/ba_data/data/languages/filipino.json": "aa8c94a49dec96d050be2329c3b6dcba", + "build/assets/ba_data/data/languages/french.json": "b7d11199756f0eb4f1a745ceee652b2a", "build/assets/ba_data/data/languages/german.json": "198b9860c5b9df7b8e3e30b03d8755cb", "build/assets/ba_data/data/languages/gibberish.json": "3e68d809bd6ede3b9e2c57c147737e42", "build/assets/ba_data/data/languages/greek.json": "ad3c0d38f34d809824892d6f22808dbf", "build/assets/ba_data/data/languages/hindi.json": "bb3548531daf7bc7fee4a28d48228c32", "build/assets/ba_data/data/languages/hungarian.json": "6b08fea24b72cc805ed0dc59e11c4cd6", - "build/assets/ba_data/data/languages/indonesian.json": "9103845242b572aa8ba48e24f81ddb68", + "build/assets/ba_data/data/languages/indonesian.json": "ed9038bf4b9216f93eb73e753e162706", "build/assets/ba_data/data/languages/italian.json": "e1d69eb1eec31442bf981121c7cfaf17", "build/assets/ba_data/data/languages/korean.json": "4e3524327a0174250aff5e1ef4c0c597", "build/assets/ba_data/data/languages/malay.json": "f6ce0426d03a62612e3e436ed5d1be1f", "build/assets/ba_data/data/languages/persian.json": "c209f8f6d3b3dd40d5ca9d36fe0721fe", "build/assets/ba_data/data/languages/polish.json": "59ff98adfb4f515f00769d1ec229c232", "build/assets/ba_data/data/languages/portuguese.json": "615a59bd03f84659158d9f2608a4ab21", - "build/assets/ba_data/data/languages/romanian.json": "b3e46efd6f869dbd78014570e037c290", + "build/assets/ba_data/data/languages/romanian.json": "ef68520f749cf3641d4e4225a6166349", "build/assets/ba_data/data/languages/russian.json": "41e06eda170fb5960393dd6b58d046e1", "build/assets/ba_data/data/languages/serbian.json": "d7452dd72ac0e51680cb39b5ebaa1c69", "build/assets/ba_data/data/languages/slovak.json": "3c08c748c96c71bd9e1d7291fb8817b6", @@ -455,7 +455,7 @@ "build/assets/ba_data/data/languages/tamil.json": "b9fcc523639f55e05c7f4e7914f3321a", "build/assets/ba_data/data/languages/thai.json": "1d665629361f302693dead39de8fa945", "build/assets/ba_data/data/languages/turkish.json": "fe4c7354ca6e657c2645969325af574a", - "build/assets/ba_data/data/languages/ukrainian.json": "76ad64cb4911c8d5a3e4815b865ce5bd", + "build/assets/ba_data/data/languages/ukrainian.json": "3f9ee9567a068b760bbf25433177db89", "build/assets/ba_data/data/languages/venetian.json": "96e7607b0aa79b7eb48cac8df77e8e65", "build/assets/ba_data/data/languages/vietnamese.json": "b175cd0f01d0433355f144aeaa333409", "build/assets/ba_data/data/maps/big_g.json": "1dd301d490643088a435ce75df971054", @@ -945,11 +945,11 @@ "build/assets/ba_data/meshes/zoeTorso.bob": "26a1007e98902178d8c62fd7069d5da5", "build/assets/ba_data/meshes/zoeUpperArm.bob": "a8a881010ac1ee9ec5ca872d5c5e853a", "build/assets/ba_data/meshes/zoeUpperLeg.bob": "95b2502f74c70f934927f67cd505c3ad", - "build/assets/ba_data/python-site-packages/certifi/__init__.py": "98360d9e66de68a618eed6098a65405b", + "build/assets/ba_data/python-site-packages/certifi/__init__.py": "c935c5aee4052f1c76954ace35723dfe", "build/assets/ba_data/python-site-packages/certifi/__main__.py": "ef02e73f8581609df189a9f61aca365b", - "build/assets/ba_data/python-site-packages/certifi/cacert.pem": "4e587dca9ab75057ffef6658ed385ff2", + "build/assets/ba_data/python-site-packages/certifi/cacert.pem": "47f35c87a8abc6ace093db7c215f1eab", "build/assets/ba_data/python-site-packages/certifi/core.py": "c1b8c102093ea26587619677c7ec6016", - "build/assets/ba_data/python-site-packages/typing_extensions.py": "f1af94a03caf6fc79be0aedc8ab03090", + "build/assets/ba_data/python-site-packages/typing_extensions.py": "1f6b4db70adb7ca05dff2b74f6cde8aa", "build/assets/ba_data/textures/achievementBoxer.dds": "5b5c461e67f3a92105b56fe264a7dd28", "build/assets/ba_data/textures/achievementBoxer.ktx": "1055e009423ea1d0bc3b172f9d7328bb", "build/assets/ba_data/textures/achievementBoxer.pvr": "48f212189a6d83d29be410613b4f0005", @@ -3038,16 +3038,16 @@ "build/assets/pylib-apple/_pylong.py": "e057ab3c9eea264704dff2af204884f8", "build/assets/pylib-apple/_sitebuiltins.py": "8b5e3f6e73917962fa014ad2c4a55e61", "build/assets/pylib-apple/_strptime.py": "ed6521fd413f31f0de7be162af8db9f5", - "build/assets/pylib-apple/_sysconfigdata__darwin_darwin.py": "bc494dcb0239846f92c26622e84fb99d", - "build/assets/pylib-apple/_sysconfigdata__ios_iphoneos-arm64.py": "f073b8cdfe4179236abb923d538e7fbe", - "build/assets/pylib-apple/_sysconfigdata__ios_iphonesimulator-arm64.py": "2c3a1b46d9966d740b226d0d603a392a", - "build/assets/pylib-apple/_sysconfigdata__tvos_appletvos-arm64.py": "df1d00e8a7b529d64e600c8113d872d7", - "build/assets/pylib-apple/_sysconfigdata__tvos_appletvsimulator-arm64.py": "f9b8d515e7a6619fea32ab77c341b294", - "build/assets/pylib-apple/_sysconfigdata_d_darwin_darwin.py": "bd1f109ca34c52afd95632f7ae64171f", - "build/assets/pylib-apple/_sysconfigdata_d_ios_iphoneos-arm64.py": "178d3dc412e56aeaa211c8f5237f9462", - "build/assets/pylib-apple/_sysconfigdata_d_ios_iphonesimulator-arm64.py": "fc568dd0c36d2253993b9a48f53535d6", - "build/assets/pylib-apple/_sysconfigdata_d_tvos_appletvos-arm64.py": "50e50f852dc4f6acd785fa83c2e6530b", - "build/assets/pylib-apple/_sysconfigdata_d_tvos_appletvsimulator-arm64.py": "5e2dd0675c1364fb20fb7777c4c0eeb0", + "build/assets/pylib-apple/_sysconfigdata__darwin_darwin.py": "0cf2ec75dca64a6fd736fbf0d7cf21d7", + "build/assets/pylib-apple/_sysconfigdata__ios_iphoneos-arm64.py": "00f4ef0ea2ae8fa7994813bca8972016", + "build/assets/pylib-apple/_sysconfigdata__ios_iphonesimulator-arm64.py": "4a3f247c7dfc903e89fda0bd20ef48fb", + "build/assets/pylib-apple/_sysconfigdata__tvos_appletvos-arm64.py": "6a817c7dcc35197e965ef4d1be6a5c94", + "build/assets/pylib-apple/_sysconfigdata__tvos_appletvsimulator-arm64.py": "d3adfa519698ddd824b4ef721c3460b7", + "build/assets/pylib-apple/_sysconfigdata_d_darwin_darwin.py": "776b50a7ff9d04c04a73df196b556848", + "build/assets/pylib-apple/_sysconfigdata_d_ios_iphoneos-arm64.py": "6700b08928d64c1c1eac4412c377e86e", + "build/assets/pylib-apple/_sysconfigdata_d_ios_iphonesimulator-arm64.py": "4fd4334d6c43fe9f65ae83905c6b8a33", + "build/assets/pylib-apple/_sysconfigdata_d_tvos_appletvos-arm64.py": "ad79fe9e0594bbc43adf53c96a4a81dc", + "build/assets/pylib-apple/_sysconfigdata_d_tvos_appletvsimulator-arm64.py": "18829d0bbee15874cd46cbe8d85e36e8", "build/assets/pylib-apple/_threading_local.py": "4a9688e3987d7d692db46feb9214945e", "build/assets/pylib-apple/_weakrefset.py": "e4fa8532ace46dfbc35149c41ea497f7", "build/assets/pylib-apple/abc.py": "a0daa1ed187eee8690c1e8438b97da90", @@ -3445,7 +3445,7 @@ "build/assets/pylib-apple/typing.py": "a5996aa02b21708d88c67946dabd529e", "build/assets/pylib-apple/urllib/__init__.py": "340c83beff7dcff8f5c7b87cd43cedaf", "build/assets/pylib-apple/urllib/error.py": "b7dde0483ff647eb87162d6e19c04fa0", - "build/assets/pylib-apple/urllib/parse.py": "112c518e8857be22f75ef4cd668fe5b4", + "build/assets/pylib-apple/urllib/parse.py": "8fa7882c3e97acfde85cb4486a0ceedf", "build/assets/pylib-apple/urllib/request.py": "2a9f2ec22765c9959240f559bcb2fca3", "build/assets/pylib-apple/urllib/response.py": "c8537707a4b1e493c0ec4489ab523c93", "build/assets/pylib-apple/urllib/robotparser.py": "5a7616bdf398c166f953ad48c25506eb", @@ -4038,50 +4038,50 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "0c51eee4af632ca8e9132edfea6c5ef5", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "d086ea46307e571d6278a1ac00e7199f", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "4119ef59158a5572098c997a01988d42", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "6f59df95b4c858986852123b779ea70c", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "62505635f81cb7ed9804ec5b0eb43c5a", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "8e493b1b5c987401daa7cda81e7faeb9", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "bb97152641a4ce2c41722ef4da314086", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "843f0dfcd9bdc2b6886cdd1ac6ba0fc2", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "76fff737c7e5e513aa0c55d6dbe179a4", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "4e81fe4c953d35f96c81ec19f93525d3", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "33d430a5730d2c226765a11f86dd0599", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "6cd4a729aacbb3838ea020bdfc7d67d2", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "2b5f1112f0328d69f3863fb2e06a730d", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "b051c7642dfcf446dcd1657c121eac21", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "dc8e5d62bcfc1a645c028a7df7ecb738", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "4548c17cdfe8998aa8ecb31ad973ae74", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "333d8035d9233fee2e2b09c158c720e6", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3f4453380fd5d175c8fb18d8ca3ece4f", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8d19f198e01491a98bede19987b8cc8f", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2270da9585ffdca2c0eab77196c3f7d4", - "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "bb11ac758712a51791340d19121b9791", - "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "c47ac1d2e839e4e3b701a7c59080dd09", - "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "bb11ac758712a51791340d19121b9791", - "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "c47ac1d2e839e4e3b701a7c59080dd09", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "9cb1b5b345dd00b58992913677a4ad7e", - "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "8a961e945aeb0120d924ec06a162fb55", - "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "9cb1b5b345dd00b58992913677a4ad7e", - "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "8a961e945aeb0120d924ec06a162fb55", - "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "5fcc0e89141d36e5b152095bfcc21fa1", - "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "1b63b3daeff198825740a426fe5f7a9f", - "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "5fcc0e89141d36e5b152095bfcc21fa1", - "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "1b63b3daeff198825740a426fe5f7a9f", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "e86e8adff4bf043e2c3796ed499ca134", - "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "2fddab497b60617bcaa467a458e5534c", - "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "b21ff6427895bcd8628ea55a3c2d8609", - "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "2fddab497b60617bcaa467a458e5534c", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "4594d3bdd6f0d5103da725b67c442ca5", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "37f0e4fef1e9106835c572a12f8a0354", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "660139dfa55cdbc071bf43526504823b", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "a1961b9730c58599ef326b6af9da7f93", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f534609cbfc3b2743a07c0aafb380f4b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "fd05e46d0f3acbf9dfa6a6d3b7f75926", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "db3a41fe7b3b22c90229b3ecdeb2e5ec", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "9b21b94333a5f61d45c40bcb94a53a53", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "1f69ddeb02931a14350dca8c9f57d7f1", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "4ef2017d98434d78fc6d16121220241e", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "9c131cc99b84ead5c6c4ca62167cff9b", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "d24cf6110773ef8b4814d666e8c0c435", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "831b1526ece045decbf1e0de5af24052", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e20c0e2216583337f0f1b6529d0ba11f", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "75a8601f7e9f82af46d93ffc8a256a7b", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b6dd5a6381c76da06d4e3f28b9ae26d7", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "dd1829cd7953bffed20763c27e4808e2", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "68a9183674846903f4dec83d94023498", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "370ae7af55f55c44ec97cae1713eaf44", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "f346ea68ff1614e64b5555c5fed60618", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "5b3b46d00315fd42f919e881c9db9751", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "e1e54514c6322544a41f53c84e441967", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "88c3f1d881df02bfc82bd7b228301cab", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "6712b886792057c5cac6bfcbbf93fa6f", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "b2334c71efedceb6c3d996a2d3923ac5", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "b010230a5dece5a69b3fe02bef3da05d", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "36809929a0ad003aae6c96c19a447bc5", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "c65becdb22959fb4144bf51cb567ab13", + "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "c471e06d03862e91a2a949806803efbd", + "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "4f7b8eed54eb4c7d2b6400aaa4dfa37c", + "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "c471e06d03862e91a2a949806803efbd", + "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "4f7b8eed54eb4c7d2b6400aaa4dfa37c", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "ec5f39fe33f753cace45ecda7b78e376", + "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "5ca18c2abecb1b369ddd7ff43880baa0", + "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "ec5f39fe33f753cace45ecda7b78e376", + "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "5ca18c2abecb1b369ddd7ff43880baa0", + "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "789b8d5e80d66c74af1ff0b978301704", + "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "4fa185d99e799027b324704de3925aca", + "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "789b8d5e80d66c74af1ff0b978301704", + "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "4fa185d99e799027b324704de3925aca", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "3b9db190dc436e7bfd4521b94d9b5974", + "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "cd5c91eecddb1da4e8204e3496466a07", + "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "9adc2dc1c5c3cdc1ca6fc98fc76644c5", + "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "cd5c91eecddb1da4e8204e3496466a07", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "361f36182c514f52fe7f9f426c0f3b74", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "9c4b2bd8d013f5e0691eed115cbd0835", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "d9ec65598b3906a3e4455278386bab00", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "2784af0e825434a01b85115631049789", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "24ca3020d1a3cde8d5fcc2e11cd887ae", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "d0a2cb5f0b300a08f72112597b01a26a", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "75c4c1f4fcf25e35faf1de9819e2cec1", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "215729acfa24d9d0010293aba6a1e06a", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "5548f407d97e380069f6c596c4e36cd7", "src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d", diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c3c78c..ba394443 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.35 (build 21884, api 8, 2024-06-12) +### 1.7.35 (build 21888, api 8, 2024-06-16) - Fixed an issue where the engine would block at exit on some version of Linux until Ctrl-D was pressed in the calling terminal. - V2 accounts have been around for a while now, so the old V1 device login @@ -47,19 +47,6 @@ two forms. Now it is possible to provide both. - Spaz classes now have a `default_hitpoints` which makes customizing that easier (Thanks rabbitboom!) -- (WORK IN PROGRESS) As of this version, servers are *required* to be accessible - via ipv4 to appear in the public listing. So they may need to provide an ipv4 - address in their config if the automatically detected one is ipv6. This should - reduce the confusion of ipv6-only servers appearing greyed out for lots of - ipv4-only people. Pretty much everyone can connect to ipv4. -- (WORK IN PROGRESS) There is now more personalized error feedback for the - connectivity checks when poking `Make My Party Public` or when launching the - command line server. Hopefully this will help navigate the new dual ipv4/ipv6 - situation. -- (WORK IN PROGRESS) The low level `ConnectionToHostUDP` class can now accept - multiple `SockAddr`s; it will attempt to contact the host on all of them and - use whichever responds first. This allows us to pass both ipv4 and ipv6 - addresses when available and transparently use whichever is more performant. - Added `docker-build`, `docker-run`, `docker-clean` and `docker-save` targets to Makefile. - Fixed an issue in Assault where being teleported back to base with a sticky diff --git a/Makefile b/Makefile index cfe969d9..60607f6d 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ help: env # Set env-var BA_ENABLE_COMPILE_COMMANDS_DB=1 to enable creating/updating a # cmake compile-commands database for use with things like clangd. ifeq ($(BA_ENABLE_COMPILE_COMMANDS_DB),1) - PREREQ_COMPILE_COMMANDS_DB = .cache/compile_commands_db/compile_commands.json + ENV_COMPILE_COMMANDS_DB = .cache/compile_commands_db/compile_commands.json endif # pcommandbatch can be much faster when running hundreds or thousands of @@ -46,19 +46,19 @@ else PCOMMANDBATCH = $(PCOMMAND) endif -# Prereq targets that should be safe to run anytime; even if project-files +# Env targets that should be safe to run anytime; even if project-files # are out of date. ENV_REQS_SAFE = .cache/checkenv $(PCOMMANDBATCHBIN) .dir-locals.el .mypy.ini \ - .pyrightconfig.json .pylintrc .clang-format \ - ballisticakit-cmake/.clang-format .editorconfig tools/cloudshell \ - tools/bacloud + .pyrightconfig.json .pylintrc .clang-format \ + ballisticakit-cmake/.clang-format .editorconfig tools/cloudshell \ + tools/bacloud tools/pcommand -# Prereq targets that may break if the project needs updating should go here. +# Env targets that may break if the project needs updating should go here. # An example is compile-command-databases; these might try to run cmake and # fail if the CMakeList files don't match what's on disk. If such a target was # included in ENV_REQS_SAFE it would try to build *before* project updates # which would leave us stuck in a broken state. -ENV_REQS_POST_UPDATE_ONLY = $(PREREQ_COMPILE_COMMANDS_DB) +ENV_REQS_POST_UPDATE_ONLY = $(ENV_COMPILE_COMMANDS_DB) # Target that should be built before building almost any other target. This # installs tool config files, sets up the Python virtual environment, etc. @@ -1245,30 +1245,30 @@ CHECK_CLEAN_SAFETY = $(PCOMMAND) check_clean_safety # Some tool configs that need filtering (mainly injecting projroot path). TOOL_CFG_INST = $(PCOMMAND) tool_config_install -# Anything that affects tool-config generation. +# Anything required for tool-config generation. TOOL_CFG_SRC = tools/efrotools/toolconfig.py config/projectconfig.json \ - .venv/.efro_venv_complete tools/pcommand + tools/pcommand # Anything that should trigger an environment-check when changed. -ENV_SRC = tools/batools/build.py .venv/.efro_venv_complete tools/pcommand +ENV_SRC = tools/batools/build.py .venv/.efro_venv_complete # Generate a pcommand script hard-coded to use our virtual environment. -# This is a prereq dependency so should not itself depend on env. -tools/pcommand: tools/efrotools/genwrapper.py tools/efrotools/pyver.py +# This is an env dependency so should not itself depend on env. +tools/pcommand: tools/efrotools/genwrapper.py .venv/.efro_venv_complete @echo Generating tools/pcommand... @PYTHONPATH=tools python3 -m \ efrotools.genwrapper pcommand batools.pcommandmain tools/pcommand # Generate a cloudshell script hard-coded to use our virtual environment. -# This is a prereq dependency so should not itself depend on env. -tools/cloudshell: tools/efrotools/genwrapper.py tools/efrotools/pyver.py +# This is an env dependency so should not itself depend on env. +tools/cloudshell: tools/efrotools/genwrapper.py .venv/.efro_venv_complete @echo Generating tools/cloudshell... @PYTHONPATH=tools python3 -m \ efrotools.genwrapper cloudshell efrotoolsinternal.cloudshell tools/cloudshell # Generate a bacloud script hard-coded to use our virtual environment. -# This is a prereq dependency so should not itself depend on env. -tools/bacloud: tools/efrotools/genwrapper.py tools/efrotools/pyver.py +# This is an env dependency so should not itself depend on env. +tools/bacloud: tools/efrotools/genwrapper.py .venv/.efro_venv_complete @echo Generating tools/bacloud... @PYTHONPATH=tools python3 -m \ efrotools.genwrapper bacloud batools.bacloud tools/bacloud @@ -1300,40 +1300,54 @@ SKIP_ENV_CHECKS ?= 0 VENV_PYTHON ?= python3.12 # Increment this to force all downstream venvs to fully rebuild. Useful after -# removing requirements since upgrading in place will never uninstall stuff. +# removing requirements since upgrading venvs in place will never uninstall +# stuff. VENV_STATE = 1 -# Rebuild our virtual environment whenever reqs, Python version, or explicit -# state number changes. This is a dependency of env so it should not itself -# depend on env. Note that we list pcommand as a requirement but can't use it -# in here until the end when the venv is up. Also note that we try to update -# venvs in place when possible, but when Python version or venv-state changes -# we blow it away and start over to be safe. -.venv/.efro_venv_complete: tools/pcommand config/requirements.txt \ -tools/efrotools/pyver.py +# Update our virtual environment whenever reqs changes, Python version +# changes, our venv's Python symlink breaks (can happen for minor Python +# updates), or explicit state number changes. This is a dependency of env so +# should not itself depend on env. +.venv/.efro_venv_complete: \ + config/requirements.txt \ + tools/efrotools/pyver.py \ + .venv/bin/$(VENV_PYTHON) \ + .venv/.efro_venv_state_$(VENV_STATE) +# Update venv in place when possible; otherwise create from scratch. @[ -f .venv/bin/$(VENV_PYTHON) ] \ && [ -f .venv/.efro_venv_state_$(VENV_STATE) ] \ && echo Updating existing $(VENV_PYTHON) virtual environment in \'.venv\'... \ || (echo Creating new $(VENV_PYTHON) virtual environment in \'.venv\'... \ - && rm -rf .venv) - $(VENV_PYTHON) -m venv .venv + && rm -rf .venv && $(VENV_PYTHON) -m venv .venv \ + && touch .venv/.efro_venv_state_$(VENV_STATE)) .venv/bin/pip install --upgrade pip .venv/bin/pip install -r config/requirements.txt - touch .venv/.efro_venv_state_$(VENV_STATE) \ - .venv/.efro_venv_complete # Done last to enforce fully-built venvs. - @$(PCOMMAND) echo \ - GRN Project virtual environment for BLD $(VENV_PYTHON) RST GRN \ - at BLD .venv RST GRN is ready to use. + @touch .venv/.efro_venv_complete # Done last to signal fully-built venv. + @echo Project virtual environment for $(VENV_PYTHON) at .venv is ready to use. -.cache/checkenv: $(ENV_SRC) +# We don't actually create anything with this target, but its existence allows +# .efro_venv_complete to run when these bits don't exist, and that target +# *does* recreate this stuff. Note to self: previously I tried splitting +# things up more and recreating the venv in this target, but that led to +# unintuitive dependency behavior. For example, a python update could cause +# the .venv/bin/$(VENV_PYTHON) symlink to break, which would cause that target +# to blow away and rebuild the venv, but then the reestablished symlink might +# have an old modtime (since modtime is that of python itself) which could +# cause .efro_venv_complete to think it was already up to date and not run, +# leaving us with a half-built venv. So the way we do it now ensures the venv +# update always happens in full and seems mostly foolproof. +.venv/bin/$(VENV_PYTHON) .venv/.efro_venv_state_$(VENV_STATE): + +.cache/checkenv: $(ENV_SRC) $(PCOMMAND) @if [ $(SKIP_ENV_CHECKS) -ne 1 ]; then \ $(PCOMMAND) checkenv && mkdir -p .cache && touch .cache/checkenv; \ fi -$(PCOMMANDBATCHBIN): src/tools/pcommandbatch/pcommandbatch.c \ +PCOMMANDBATCHSRC = src/tools/pcommandbatch/pcommandbatch.c \ src/tools/pcommandbatch/cJSON.c - @$(MAKE) tools/pcommand - @$(PCOMMAND) build_pcommandbatch $^ $@ + +$(PCOMMANDBATCHBIN): $(PCOMMANDBATCHSRC) $(PCOMMAND) + @$(PCOMMAND) build_pcommandbatch $(PCOMMANDBATCHSRC) $(PCOMMANDBATCHBIN) # CMake build-type lowercase CM_BT_LC = $(shell echo $(CMAKE_BUILD_TYPE) | tr A-Z a-z) @@ -1368,6 +1382,7 @@ ballisticakit-cmake/.clang-format: .clang-format # compile commands for all files; lets try to keep it up to date # whenever CMakeLists changes. .cache/compile_commands_db/compile_commands.json: \ + $(PCOMMANDBATCH) \ ballisticakit-cmake/CMakeLists.txt @$(PCOMMANDBATCH) echo BLU Updating compile commands db... @mkdir -p .cache/compile_commands_db diff --git a/config/requirements.txt b/config/requirements.txt index f0c0d8b6..1da2bc66 100644 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -1,14 +1,14 @@ cpplint==1.6.1 dmgbuild==1.6.1 -filelock==3.14.0 +filelock==3.15.1 furo==2024.5.6 mypy==1.10.0 pbxproj==4.1.0 pdoc==14.5.0 -pur==7.3.1 -pylint==3.2.2 +pur==7.3.2 +pylint==3.2.3 pylsp-mypy==0.6.8 -pytest==8.2.1 +pytest==8.2.2 python-daemon==3.0.1 python-lsp-black==2.0.0 python-lsp-server==1.11.0 @@ -17,5 +17,5 @@ Sphinx==7.3.7 tomlkit==0.12.5 types-certifi==2021.10.8.3 types-filelock==3.2.7 -types-requests==2.32.0.20240523 -typing_extensions==4.12.0 +types-requests==2.32.0.20240602 +typing_extensions==4.12.2 diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 0958e534..689f8732 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21884 +TARGET_BALLISTICA_BUILD = 21888 TARGET_BALLISTICA_VERSION = '1.7.35' diff --git a/src/ballistica/base/platform/base_platform.cc b/src/ballistica/base/platform/base_platform.cc index 4fb91846..c0fe45a4 100644 --- a/src/ballistica/base/platform/base_platform.cc +++ b/src/ballistica/base/platform/base_platform.cc @@ -64,8 +64,8 @@ auto BasePlatform::GetPublicDeviceUUID() -> std::string { // We used to plug version in directly here, but that caused uuids to // shuffle too rapidly during periods of rapid development. This // keeps it more constant. - // __last_rand_uuid_component_shuffle_date__ 2024 6 12 - auto rand_uuid_component{"WI5XDVM7QQBD4G6O0GS2DW6IPJ4VQT9X"}; + // __last_rand_uuid_component_shuffle_date__ 2024 6 13 + auto rand_uuid_component{"1URRE62C7234VP9L1BUPJ1P7QT7Q8YW3"}; inputs.emplace_back(rand_uuid_component); auto gil{Python::ScopedInterpreterLock()}; diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 395a3093..becc91fe 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21884; +const int kEngineBuildNumber = 21888; const char* kEngineVersion = "1.7.35"; const int kEngineApiVersion = 8; diff --git a/tools/efro/error.py b/tools/efro/error.py index 5bf8bee5..fed4252c 100644 --- a/tools/efro/error.py +++ b/tools/efro/error.py @@ -73,9 +73,9 @@ class RemoteError(Exception): occurs remotely. The error string can consist of a remote stack trace or a simple message depending on the context. - Communication systems should raise more specific error types locally - when more introspection/control is needed; this is intended somewhat - as a catch-all. + Communication systems should aim to communicate specific errors + gracefully as standard message responses when specific details are + needed; this is intended more as a catch-all. """ def __init__(self, msg: str, peer_desc: str): diff --git a/tools/efro/message/_protocol.py b/tools/efro/message/_protocol.py index b9b01440..cced88e6 100644 --- a/tools/efro/message/_protocol.py +++ b/tools/efro/message/_protocol.py @@ -45,7 +45,7 @@ class MessageProtocol: forward_communication_errors: bool = False, forward_clean_errors: bool = False, remote_errors_include_stack_traces: bool = False, - log_remote_errors: bool = True, + log_errors_on_receiver: bool = True, ) -> None: """Create a protocol with a given configuration. @@ -62,8 +62,8 @@ class MessageProtocol: When an exception is not covered by the optional forwarding mechanisms above, it will come across as efro.error.RemoteError - and the exception will be logged on the receiver - end - at least by default (see details below). + and the exception will be logged on the receiver end - at least + by default (see details below). If 'remote_errors_include_stack_traces' is True, stringified stack traces will be returned with efro.error.RemoteError @@ -77,8 +77,8 @@ class MessageProtocol: goal is usually to avoid returning opaque RemoteErrors and to instead return something meaningful as part of the expected response type (even if that value itself represents a logical - error state). If 'log_remote_errors' is False, however, such - exceptions will not be logged on the receiver. This can be + error state). If 'log_errors_on_receiver' is False, however, such + exceptions will *not* be logged on the receiver. This can be useful in combination with 'remote_errors_include_stack_traces' and 'forward_clean_errors' in situations where all error logging/management will be happening on the sender end. Be @@ -168,7 +168,7 @@ class MessageProtocol: self.remote_errors_include_stack_traces = ( remote_errors_include_stack_traces ) - self.log_remote_errors = log_remote_errors + self.log_errors_on_receiver = log_errors_on_receiver @staticmethod def encode_dict(obj: dict) -> str: @@ -219,7 +219,7 @@ class MessageProtocol: ), error_type=ErrorSysResponse.ErrorType.REMOTE, ), - self.log_remote_errors, + self.log_errors_on_receiver, ) def _to_dict( diff --git a/tools/efro/message/_receiver.py b/tools/efro/message/_receiver.py index 8ef6e8b0..be3fc7f3 100644 --- a/tools/efro/message/_receiver.py +++ b/tools/efro/message/_receiver.py @@ -38,6 +38,7 @@ class MessageReceiver: # MyMessageReceiver fills out handler() overloads to ensure all # registered handlers have valid types/return-types. + @receiver.handler def handle_some_message_type(self, message: SomeMsg) -> SomeResponse: # Deal with this message type here. @@ -47,7 +48,7 @@ class MessageReceiver: obj.receiver.handle_raw_message(some_raw_data) Any unhandled Exception occurring during message handling will result in - an Exception being raised on the sending end. + an efro.error.RemoteError being raised on the sending end. """ is_async = False diff --git a/tools/efro/message/_sender.py b/tools/efro/message/_sender.py index b7e18755..17f2925f 100644 --- a/tools/efro/message/_sender.py +++ b/tools/efro/message/_sender.py @@ -20,22 +20,33 @@ if TYPE_CHECKING: class MessageSender: """Facilitates sending messages to a target and receiving responses. - This is instantiated at the class level and used to register unbound - class methods to handle raw message sending. + + These are instantiated at the class level and used to register unbound + class methods to handle raw message sending. Generally this class is not + used directly, but instead autogenerated subclasses which provide type + safe overloads are used instead. Example: + (In this example, MyMessageSender is an autogenerated class that + inherits from MessageSender). class MyClass: - msg = MyMessageSender(some_protocol) + msg = MyMessageSender() @msg.send_method def send_raw_message(self, message: str) -> str: # Actually send the message here. - # MyMessageSender class should provide overloads for send(), send_async(), - # etc. to ensure all sending happens with valid types. obj = MyClass() - obj.msg.send(SomeMessageType()) + + # The MyMessageSender generated class would provides overloads for + # send(), send_async(), etc. to provide type-safety for message types + # and their associated response types. + # Thus, given the statement below, a type-checker would know that + # 'response' is a SomeResponseType or whatever is associated with + # SomeMessageType. + response = obj.msg.send(SomeMessageType()) + """ def __init__(self, protocol: MessageProtocol) -> None: diff --git a/tools/efrotools/pybuild.py b/tools/efrotools/pybuild.py index 3455c14f..baac5149 100644 --- a/tools/efrotools/pybuild.py +++ b/tools/efrotools/pybuild.py @@ -480,6 +480,17 @@ def apple_patch(python_dir: str) -> None: """New test.""" patch_modules_setup(python_dir, 'apple') + # Filter an instance of 'itms-services' that appeared in Python3.12 + # and which was getting me rejected from the app store. + fname = os.path.join(python_dir, 'Lib', 'urllib', 'parse.py') + ftxt = readfile(fname) + ftxt = replace_exact( + ftxt, + "'wss', 'itms-services']", + "'wss', 'i!t!m!s!-!s!e!r!v!i!c!e!s'.replace('!', '')]", + ) + writefile(fname, ftxt) + def patch_modules_setup(python_dir: str, baseplatform: str) -> None: """Muck with the Setup.* files Python uses to build modules.""" From 6be9e270da3e3ba22f19f9780a48440571a23f78 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Mon, 17 Jun 2024 07:25:12 +0530 Subject: [PATCH 25/26] Cleanup on arm64 dockerfile --- config/docker/Dockerfile | 16 +++++++---- config/docker/Dockerfile_arm64 | 51 ++++++++++------------------------ 2 files changed, 25 insertions(+), 42 deletions(-) diff --git a/config/docker/Dockerfile b/config/docker/Dockerfile index dd378535..c5c66559 100644 --- a/config/docker/Dockerfile +++ b/config/docker/Dockerfile @@ -10,10 +10,11 @@ ARG base_image=ubuntu:latest # Start with the base image FROM ${base_image} AS builder -# Renew the arg +# Renew the args ARG headless_build ARG cmake_build_type +# Environment settings ENV LANG=en_US.utf8 ENV LANGUAGE=en_US ENV LC_ALL=en_US.utf8 @@ -40,6 +41,7 @@ RUN apt-get update -y && \ # Copy source code COPY ./ /ballistica +# Set the working directory WORKDIR /ballistica # Compile the application @@ -58,12 +60,13 @@ RUN mkdir /ballistica_cmake && \ # Create a new stage for the runtime environment FROM ${base_image} +# Environment settings ENV LANG en_US.utf8 ENV LANGUAGE=en_US ENV LC_ALL=en_US.utf8 ENV DEBIAN_FRONTEND=noninteractive -# Renew the arg +# Renew the args ARG headless_build ENV HEADLESS_BUILD=${headless_build} ARG cmake_build_type @@ -72,7 +75,7 @@ LABEL BOMBSQUAD_BUILD_TYPE=${cmake_build_type} # Install runtime dependencies RUN apt-get update -y && \ - apt-get install -y \ + apt-get install -y \ python3.12-dev && \ if [ "$HEADLESS_BUILD" = "0" ]; then \ apt-get install -y \ @@ -82,18 +85,19 @@ RUN apt-get update -y && \ libopenal-dev; \ fi && \ rm -rf /var/lib/apt/lists/* && \ - python3.12 -c 'import uuid; print(uuid.uuid4())' > /etc/machine-id + python3.12 -c "import uuid; print(uuid.uuid4())" > /etc/machine-id # Copy the compiled application from the builder stage COPY --from=builder /ballistica_cmake \ /home/ubuntu/ballistica +# Set the working directory WORKDIR /home/ubuntu/ballistica RUN ln -s ballisticakit* run # Expose the necessary port -EXPOSE 43210/udp +EXPOSE 43210/udp # Set the default command to run the application -CMD [ "./run" ] +CMD [ "./run" ] \ No newline at end of file diff --git a/config/docker/Dockerfile_arm64 b/config/docker/Dockerfile_arm64 index d2457192..e592ed98 100644 --- a/config/docker/Dockerfile_arm64 +++ b/config/docker/Dockerfile_arm64 @@ -10,31 +10,19 @@ ARG base_image=ubuntu:latest # Start with the base image FROM --platform=linux/arm64 ${base_image} AS builder -# Renew the ARGs +# Renew the args ARG headless_build ARG cmake_build_type # Environment settings -ENV LANG en_US.utf8 +ENV LANG=en_US.utf8 ENV LANGUAGE=en_US +ENV LC_ALL=en_US.utf8 ENV DEBIAN_FRONTEND=noninteractive ENV CMAKE_BUILD_TYPE=${cmake_build_type} ENV HEADLESS_BUILD=${headless_build} -# Enable ARM64 architecture and update package lists -RUN dpkg --add-architecture arm64 && apt-get update -y - -# Install necessary tools to create users and groups -RUN apt-get install -y adduser \ - && apt-cache search clang-tools - -# Configure dpkg to skip systemd post-installation scripts -RUN mkdir -p /etc/systemd/system && \ - echo "exit 0" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d && \ - apt-get install -y --no-install-recommends \ -# testing - clang - +# Install build dependencies RUN apt-get install -y --no-install-recommends \ python3.12-dev \ python3.12-venv \ @@ -46,16 +34,16 @@ RUN apt-get install -y --no-install-recommends \ curl \ rsync \ clang-format \ + clang \ cmake \ libvorbis-dev \ - build-essential \ - && rm /usr/sbin/policy-rc.d + build-essential # Copy source code -COPY ./ /home/ubuntu/ballistica +COPY ./ /ballistica # Set the working directory -WORKDIR /home/ubuntu/ballistica +WORKDIR /ballistica # Compile the application RUN mkdir /ballistica_cmake && \ @@ -75,25 +63,17 @@ FROM --platform=linux/arm64 ${base_image} # Environment settings ENV LANG en_US.utf8 ENV LANGUAGE=en_US +ENV LC_ALL=en_US.utf8 ENV DEBIAN_FRONTEND=noninteractive -# Renew the ARGs +# Renew the args ARG headless_build ENV HEADLESS_BUILD=${headless_build} ARG cmake_build_type LABEL BOMBSQUAD_BUILD_TYPE=${cmake_build_type} -# Install necessary tools to create users and groups -RUN apt-get update -y && apt-get install -y adduser - -# Pre-create necessary users and groups to avoid systemd configuration errors -RUN addgroup --system systemd-journal && \ - adduser --system --no-create-home --ingroup systemd-journal systemd-network - -# Configure dpkg to skip systemd post-installation scripts -RUN mkdir -p /etc/systemd/system && \ - echo "exit 0" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d && \ - apt-get update -y && \ +# Install runtime dependencies +RUN apt-get update -y && \ apt-get install -y \ python3.12-dev && \ if [ "$HEADLESS_BUILD" = "0" ]; then \ @@ -104,14 +84,13 @@ RUN mkdir -p /etc/systemd/system && \ libopenal-dev; \ fi && \ rm -rf /var/lib/apt/lists/* && \ - python3.12 -c "import uuid;print(uuid.uuid4())" > /etc/machine-id && \ - rm /usr/sbin/policy-rc.d + python3.12 -c "import uuid; print(uuid.uuid4())" > /etc/machine-id # Copy the compiled application from the builder stage COPY --from=builder /ballistica_cmake \ - /home/ubuntu/ballistica + /home/ubuntu/ballistica - # Set the working directory +# Set the working directory WORKDIR /home/ubuntu/ballistica RUN ln -s ballisticakit* run From 7358dbdbb640472cedec6cea5aa984ccb7623116 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 16 Jun 2024 19:33:53 -0700 Subject: [PATCH 26/26] pubsync --- .efrocachemap | 32 ++++++++++++++++---------------- tools/batools/pcommands.py | 1 + 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index cfbb8331..444111aa 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4046,18 +4046,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e20c0e2216583337f0f1b6529d0ba11f", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "75a8601f7e9f82af46d93ffc8a256a7b", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b6dd5a6381c76da06d4e3f28b9ae26d7", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "dd1829cd7953bffed20763c27e4808e2", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "3de8379bc9d925752559f395c85c1ebc", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "68a9183674846903f4dec83d94023498", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "370ae7af55f55c44ec97cae1713eaf44", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "f0a26bbd08a4ddd9fe331bba6f731dd0", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "f346ea68ff1614e64b5555c5fed60618", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "5b3b46d00315fd42f919e881c9db9751", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "7ae36210f6167ae2cd88905c93800330", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "e1e54514c6322544a41f53c84e441967", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "88c3f1d881df02bfc82bd7b228301cab", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "60f081b960424b9a3dddc33824a5d866", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "6712b886792057c5cac6bfcbbf93fa6f", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "b2334c71efedceb6c3d996a2d3923ac5", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "b010230a5dece5a69b3fe02bef3da05d", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "36809929a0ad003aae6c96c19a447bc5", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "c65becdb22959fb4144bf51cb567ab13", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "5bce4fd4303d03d5a4d3cba16aaf7dcb", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3f72837a59d31d11e08edb0f395642d2", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "7400ee0e8a3c925af6e4859599fed64c", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "5b1db66f277c057d503aae53991adfc5", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "c471e06d03862e91a2a949806803efbd", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "4f7b8eed54eb4c7d2b6400aaa4dfa37c", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "c471e06d03862e91a2a949806803efbd", @@ -4074,14 +4074,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "cd5c91eecddb1da4e8204e3496466a07", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "9adc2dc1c5c3cdc1ca6fc98fc76644c5", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "cd5c91eecddb1da4e8204e3496466a07", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "361f36182c514f52fe7f9f426c0f3b74", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "9c4b2bd8d013f5e0691eed115cbd0835", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "d9ec65598b3906a3e4455278386bab00", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "2784af0e825434a01b85115631049789", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "24ca3020d1a3cde8d5fcc2e11cd887ae", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "d0a2cb5f0b300a08f72112597b01a26a", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "75c4c1f4fcf25e35faf1de9819e2cec1", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "215729acfa24d9d0010293aba6a1e06a", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "dc57789d3ee490d8354b259da3d126e5", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "f6c205dec651096d4b79c33fbc6521d3", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "57eaa29add181299dfeca00638cec027", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "45a0e7f47f87ac16eea7ed3c8344e930", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "3e73473e692c1076ba35230db92718df", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "b4a041b108895d140d7bae117bb6d899", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "6140fbb0c041b1a7b8fa18bca1b61b42", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "6b6b016b72558a9138fccf7f5462f1de", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "5548f407d97e380069f6c596c4e36cd7", "src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d", diff --git a/tools/batools/pcommands.py b/tools/batools/pcommands.py index f8f85203..4d25b965 100644 --- a/tools/batools/pcommands.py +++ b/tools/batools/pcommands.py @@ -11,6 +11,7 @@ from efrotools import pcommand # pylint: disable=too-many-lines + def prune_includes() -> None: """Check for unnecessary includes in C++ files.