forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request godotengine#98956 from akien-mga/3.2-ci-sync-with-3.x
[3.2] CI: Partially sync workflows and actions with 3.x branch
- Loading branch information
Showing
36 changed files
with
665 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build Godot | ||
description: Build Godot with the provided options. | ||
inputs: | ||
target: | ||
description: The scons target (debug/release_debug/release). | ||
default: "debug" | ||
tools: | ||
description: If tools are to be built. | ||
default: false | ||
tests: | ||
description: If tests are to be built. | ||
default: false | ||
platform: | ||
description: The Godot platform to build. | ||
required: false | ||
sconsflags: | ||
default: "" | ||
scons-cache: | ||
description: The scons cache path. | ||
default: "${{ github.workspace }}/.scons-cache/" | ||
scons-cache-limit: | ||
description: The scons cache size limit. | ||
# actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk. | ||
# Limit to 7 GiB to avoid having the extracted cache fill the disk. | ||
default: 7168 | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Scons Build | ||
shell: sh | ||
env: | ||
SCONSFLAGS: ${{ inputs.sconsflags }} | ||
SCONS_CACHE: ${{ inputs.scons-cache }} | ||
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }} | ||
run: | | ||
echo "Building with flags:" ${{ env.SCONSFLAGS }} | ||
scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }} | ||
ls -l bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Restore Godot build cache | ||
description: Restore Godot build cache. | ||
inputs: | ||
cache-name: | ||
description: The cache base name (job name by default). | ||
default: "${{github.job}}" | ||
scons-cache: | ||
description: The scons cache path. | ||
default: "${{github.workspace}}/.scons-cache/" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Restore .scons_cache directory | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{inputs.scons-cache}} | ||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} | ||
restore-keys: | | ||
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} | ||
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} | ||
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Save Godot build cache | ||
description: Save Godot build cache. | ||
inputs: | ||
cache-name: | ||
description: The cache base name (job name by default). | ||
default: "${{github.job}}" | ||
scons-cache: | ||
description: The scons cache path. | ||
default: "${{github.workspace}}/.scons-cache/" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Save .scons_cache directory | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{inputs.scons-cache}} | ||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Setup python and scons | ||
description: Setup python, install the pip version of scons. | ||
inputs: | ||
python-version: | ||
description: The python version to use. | ||
default: "3.x" | ||
python-arch: | ||
description: The python architecture. | ||
default: "x64" | ||
runs: | ||
using: "composite" | ||
steps: | ||
# Use python 3.x release (works cross platform) | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v5 | ||
with: | ||
# Semantic version range syntax or exact version of a Python version | ||
python-version: ${{ inputs.python-version }} | ||
# Optional - x64 or x86 architecture, defaults to x64 | ||
architecture: ${{ inputs.python-arch }} | ||
|
||
- name: Setup scons | ||
shell: bash | ||
run: | | ||
python -c "import sys; print(sys.version)" | ||
python -m pip install scons==4.7.0 | ||
scons --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Upload Godot artifact | ||
description: Upload the Godot artifact. | ||
inputs: | ||
name: | ||
description: The artifact name. | ||
default: "${{ github.job }}" | ||
path: | ||
description: The path to upload. | ||
required: true | ||
default: "bin/*" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Upload Godot Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.path }} | ||
retention-days: 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.