-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 #52670 from Faless/ci/3.x_actions
[3.x] [CI] Refactor CI actions, use sub-actions, matrices.
- Loading branch information
Showing
11 changed files
with
379 additions
and
597 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,36 @@ | ||
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. | ||
default: 4096 | ||
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,22 @@ | ||
name: Setup Godot build cache | ||
description: Setup 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: | ||
# Upload cache on completion and check it out now | ||
- name: Load .scons_cache directory | ||
uses: actions/cache@v2 | ||
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,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@v2 | ||
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 | ||
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@v2 | ||
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.