Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Restore macos. #12

Merged
1 commit merged into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
95 changes: 93 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,97 @@ on:
types: [opened, reopened, edited, synchronize]

jobs:
build-native:
runs-on: macos-latest
permissions:
pull-requests: write
actions: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
GODOT_BASE_BRANCH: main
CACHE_NAME: v-sekai-world

strategy:
fail-fast: false
matrix:
platform: [macos]
target: [editor, template_release, template_debug]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.platform }}-${{ matrix.target }}
cancel-in-progress: true

steps:
- name: Set up dependencies
run: brew install just hyperfine scons

- name: Set up placeholders
run: |
mkdir -p godot/bin/
mkdir -p tpz/
mkdir -p editor
echo "This is the README for the Godot bin directory." > godot/bin/readme.md
echo "This is the README for the TPZ directory." > tpz/readme.md
echo "This is the README for the Editor directory." > editor/readme.md

- name: Checkout code
uses: actions/checkout@v4

- name: Cache SCons cache
uses: actions/cache@v4
if: always()
with:
path: |
.scons_cache
key: ${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}-${{ matrix.platform }}-${{ matrix.target }}
restore-keys: |
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}-${{ matrix.platform }}-${{ matrix.target }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-refs/heads/${{ env.GODOT_BASE_BRANCH }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}

- uses: bencherdev/bencher@main

- name: Fetch dependencies and Build Platform Target
run: |
export PLATFORM_ARGS="fetch-vulkan-sdk"
bencher run \
--project 'v-sekai-world' \
--adapter shell_hyperfine \
--branch '${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}' \
--testbed ubuntu-latest \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--ci-id ${{ runner.os }}-scons-${{ matrix.platform }}-${{ matrix.target }} \
--err \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--ci-only-on-alert \
--file results.json \
"hyperfine --show-output --runs 1 --export-json results.json 'just $PLATFORM_ARGS && just build-platform-target ${{ matrix.platform }} ${{ matrix.target }}'"

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}-${{ matrix.target }}
path: godot/bin/*

- name: Upload TPZ File
uses: actions/upload-artifact@v4
with:
name: Godot-${{ matrix.platform }}-${{ matrix.target }}.tpz
path: tpz

- name: Upload Godot Editor Files
uses: actions/upload-artifact@v4
with:
name: Godot-${{ matrix.platform }}-${{ matrix.target }}
path: editor
build:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -71,7 +162,7 @@ jobs:

- name: Fetch dependencies and Build Platform Target
run: |
just install_packages
just install_packages
export PLATFORM_ARGS=""
case "${{ matrix.platform }}" in
android)
Expand Down Expand Up @@ -128,7 +219,7 @@ jobs:

merge:
runs-on: ubuntu-latest
needs: build
needs: ["build", "build-native"]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
Expand Down
17 changes: 10 additions & 7 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ run-all:
just fetch-llvm-mingw
just build-osxcross
just fetch-vulkan-sdk
just all-build-platform-target
just build-platform-target macos template_release
echo "run-all: Success!"

fetch-llvm-mingw:
Expand Down Expand Up @@ -144,12 +144,15 @@ build-platform-target platform target:
cd godot
export EXTRA_FLAGS=""
case "{{platform}}" in \
macos)
EXTRA_FLAGS="vulkan_sdk_path=$VULKAN_SDK_ROOT/MoltenVK/MoltenVK/static/MoltenVK.xcframework osxcross_sdk=darwin24 vulkan=yes arch=arm64" \
;; \
*) \
EXTRA_FLAGS="use_llvm=yes use_mingw=yes" \
;; \
macos) \
EXTRA_FLAGS="vulkan=yes arch=arm64 werror=no vulkan_sdk_path=$VULKAN_SDK_ROOT/MoltenVK/MoltenVK/static/MoltenVK.xcframework osxcross_sdk=darwin24"
if [ "$(uname)" = "Darwin" ]; then
unset OSXCROSS_ROOT
fi
;;
*)
EXTRA_FLAGS="use_llvm=yes use_mingw=yes"
;;
esac
scons platform={{platform}} \
werror=no \
Expand Down
4 changes: 2 additions & 2 deletions godot/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ PackConstructorInitializers: NextLine
# ReflowComments: true
# RemoveBracesLLVM: false
# RemoveParentheses: Leave
# RemoveSemicolon: false
RemoveSemicolon: true
# RequiresClausePosition: OwnLine
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
Expand Down Expand Up @@ -231,7 +231,7 @@ SpacesInLineCommentPrefix:
# InEmptyParentheses: false
# Other: false
# SpacesInSquareBrackets: false
Standard: c++17
Standard: c++20
# StatementAttributeLikeMacros:
# - Q_EMIT
# StatementMacros:
Expand Down
3 changes: 3 additions & 0 deletions godot/.git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ df61dc4b2bd54a5a40c515493c76f5a458e5b541

# Style: Apply new `clang-format` fixes
b37fc1014abf7adda70dc30b0822d775b3a4433f

# Set clang-format `RemoveSemicolon` rule to `true`
0d350e71086fffce0553811739aae9f6ad66136c
43 changes: 19 additions & 24 deletions godot/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# Owners can be @users, @org/teams or emails
# Owners can be @users, @org/teams or emails.

# Buildsystem (Before everything to be overwritten)

Expand Down Expand Up @@ -77,14 +77,12 @@

/modules/ @godotengine/_engine
/modules/**/doc_classes/ @godotengine/_engine @godotengine/documentation
/modules/**/editor/ @godotengine/_engine @godotengine/_editor
/modules/**/icons/ @godotengine/_engine @godotengine/usability
/modules/**/tests/ @godotengine/_engine @godotengine/tests

## Audio (+ video)
/modules/interactive_music/ @godotengine/audio
/modules/interactive_music/doc_classes/ @godotengine/audio @godotengine/documentation
/modules/interactive_music/editor/ @godotengine/audio @godotengine/_editor
/modules/minimp3/ @godotengine/audio
/modules/minimp3/doc_classes/ @godotengine/audio @godotengine/documentation
/modules/ogg/ @godotengine/audio
Expand All @@ -104,10 +102,8 @@
/modules/etcpak/ @godotengine/import
/modules/fbx/ @godotengine/import
/modules/fbx/doc_classes/ @godotengine/import @godotengine/documentation
/modules/fbx/editor/ @godotengine/import @godotengine/_editor
/modules/gltf/ @godotengine/import
/modules/gltf/doc_classes/ @godotengine/import @godotengine/documentation
/modules/gltf/editor/ @godotengine/import @godotengine/_editor
/modules/gltf/tests/ @godotengine/import @godotengine/tests
/modules/hdr/ @godotengine/import
/modules/jpg/ @godotengine/import
Expand All @@ -125,14 +121,12 @@
/modules/mbedtls/tests/ @godotengine/network @godotengine/tests
/modules/multiplayer/ @godotengine/network
/modules/multiplayer/doc_classes/ @godotengine/network @godotengine/documentation
/modules/multiplayer/editor/ @godotengine/network @godotengine/_editor
/modules/upnp/ @godotengine/network
/modules/upnp/doc_classes/ @godotengine/network @godotengine/documentation
/modules/webrtc/ @godotengine/network
/modules/webrtc/doc_classes/ @godotengine/network @godotengine/documentation
/modules/websocket/ @godotengine/network
/modules/websocket/doc_classes/ @godotengine/network @godotengine/documentation
/modules/websocket/editor/ @godotengine/network @godotengine/_editor

## Physics
/modules/godot_physics_2d/ @godotengine/physics
Expand All @@ -149,14 +143,12 @@
## Scripting
/modules/gdscript/ @godotengine/gdscript
/modules/gdscript/doc_classes/ @godotengine/gdscript @godotengine/documentation
/modules/gdscript/editor/ @godotengine/gdscript @godotengine/_editor
/modules/gdscript/icons/ @godotengine/gdscript @godotengine/usability
/modules/gdscript/tests/ @godotengine/gdscript @godotengine/tests
/modules/jsonrpc/ @godotengine/gdscript @godotengine/network
/modules/jsonrpc/tests @godotengine/gdscript @godotengine/network @godotengine/tests
/modules/jsonrpc/tests/ @godotengine/gdscript @godotengine/network @godotengine/tests
/modules/mono/ @godotengine/dotnet
/modules/mono/doc_classes/ @godotengine/dotnet @godotengine/documentation
/modules/mono/editor/ @godotengine/dotnet @godotengine/_editor
/modules/mono/icons/ @godotengine/dotnet @godotengine/usability

## Text
Expand All @@ -173,24 +165,19 @@
/modules/mobile_vr/doc_classes/ @godotengine/xr @godotengine/documentation
/modules/openxr/ @godotengine/xr
/modules/openxr/doc_classes/ @godotengine/xr @godotengine/documentation
/modules/openxr/editor/ @godotengine/xr @godotengine/_editor
/modules/webxr/ @godotengine/xr
/modules/webxr/doc_classes/ @godotengine/xr @godotengine/documentation

## Misc
/modules/csg/ @godotengine/3d-nodes
/modules/csg/doc_classes/ @godotengine/3d-nodes @godotengine/documentation
/modules/csg/editor/ @godotengine/3d-nodes @godotengine/_editor
/modules/csg/icons/ @godotengine/3d-nodes @godotengine/usability
/modules/gridmap/ @godotengine/3d-nodes
/modules/gridmap/doc_classes/ @godotengine/3d-nodes @godotengine/documentation
/modules/gridmap/editor/ @godotengine/3d-nodes @godotengine/_editor
/modules/gridmap/icons/ @godotengine/3d-nodes @godotengine/usability
/modules/navigation/ @godotengine/navigation
/modules/navigation/editor/ @godotengine/navigation @godotengine/_editor
/modules/noise/ @godotengine/core
/modules/noise/doc_classes/ @godotengine/core @godotengine/documentation
/modules/noise/editor/ @godotengine/core @godotengine/_editor
/modules/noise/icons/ @godotengine/core @godotengine/usability
/modules/noise/tests/ @godotengine/core @godotengine/tests
/modules/regex/ @godotengine/core
Expand Down Expand Up @@ -238,15 +225,23 @@
# Servers

/servers/ @godotengine/_systems
/servers/**/audio* @godotengine/audio
/servers/**/camera* @godotengine/xr
/servers/**/debugger* @godotengine/debugger
/servers/**/display* @godotengine/_platforms
/servers/**/navigation* @godotengine/navigation
/servers/**/physics* @godotengine/physics
/servers/**/rendering* @godotengine/rendering
/servers/**/text* @godotengine/gui-nodes
/servers/**/xr* @godotengine/xr
/servers/**/audio_* @godotengine/audio
/servers/**/camera_* @godotengine/xr
/servers/**/debugger_* @godotengine/debugger
/servers/**/display_* @godotengine/_platforms
/servers/**/navigation_* @godotengine/navigation
/servers/**/physics_* @godotengine/physics
/servers/**/rendering_* @godotengine/rendering
/servers/**/text_* @godotengine/gui-nodes
/servers/**/xr_* @godotengine/xr
/servers/audio/ @godotengine/audio
/servers/camera/ @godotengine/xr
/servers/debugger/ @godotengine/debugger
/servers/display/ @godotengine/_platforms
/servers/navigation/ @godotengine/navigation
/servers/rendering/ @godotengine/rendering
/servers/text/ @godotengine/gui-nodes
/servers/xr/ @godotengine/xr

# Tests

Expand Down
4 changes: 2 additions & 2 deletions godot/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/V-Sekai/godot.git
branch = groups-staging-4.4
commit = 24751dc66535ca397ec9429a8eb93282ebd79f60
parent = a8aa89169a747008eaf1e9cb2a451b8db172c844
commit = bf47816a0ab3f9dc464c5531a7464bdb65bf5137
parent = 01c826c62ccadad59c648fe5d128ebc0fe5b3fe1
method = merge
cmdver = 0.4.6
13 changes: 12 additions & 1 deletion godot/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,25 @@ repos:
rev: v19.1.0
hooks:
- id: clang-format
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
types_or: [text]
exclude: |
(?x)^(
tests/python_build/.*|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
- id: clang-format
name: clang-format-glsl
files: \.(glsl)$
types_or: [text]
exclude: |
(?x)^(
tests/python_build/.*|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
args: ["-style=file:misc/utility/.clang-format-glsl"]

- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
Expand Down
Loading
Loading