11name : Continuous integration
22on : [push, pull_request]
33
4+ env :
5+ # Only used for the cache key. Increment version to force clean build.
6+ GODOT_BASE_BRANCH : master
7+
8+ concurrency :
9+ group : ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
10+ cancel-in-progress : true
11+
412jobs :
513 build :
614 name : ${{ matrix.name }}
@@ -14,54 +22,70 @@ jobs:
1422 platform : linux
1523 artifact-name : godot-cpp-linux-glibc2.27-x86_64-release
1624 artifact-path : bin/libgodot-cpp.linux.release.x86_64.a
25+ cache-name : linux-x86_64
1726
1827 - name : 🐧 Linux (GCC, Double Precision)
1928 os : ubuntu-18.04
2029 platform : linux
2130 artifact-name : godot-cpp-linux-glibc2.27-x86_64-double-release
2231 artifact-path : bin/libgodot-cpp.linux.release.x86_64.a
2332 flags : float=64
33+ cache-name : linux-x86_64-f64
2434
2535 - name : 🏁 Windows (x86_64, MSVC)
2636 os : windows-2019
2737 platform : windows
2838 artifact-name : godot-cpp-windows-msvc2019-x86_64-release
2939 artifact-path : bin/libgodot-cpp.windows.release.x86_64.lib
40+ cache-name : windows-x86_64-msvc
3041
3142 - name : 🏁 Windows (x86_64, MinGW)
3243 os : windows-2019
3344 platform : windows
3445 artifact-name : godot-cpp-linux-mingw-x86_64-release
3546 artifact-path : bin/libgodot-cpp.windows.release.x86_64.a
3647 flags : use_mingw=yes
48+ cache-name : windows-x86_64-mingw
3749
3850 - name : 🍎 macOS (universal)
3951 os : macos-11
4052 platform : macos
4153 artifact-name : godot-cpp-macos-universal-release
4254 artifact-path : bin/libgodot-cpp.macos.release.universal.a
4355 flags : arch=universal
56+ cache-name : macos-universal
4457
4558 - name : 🤖 Android (arm64)
4659 os : ubuntu-18.04
4760 platform : android
4861 artifact-name : godot-cpp-android-arm64-release
4962 artifact-path : bin/libgodot-cpp.android.release.arm64.a
5063 flags : ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
64+ cache-name : android-arm64
5165
5266 - name : 🍏 iOS (arm64)
5367 os : macos-11
5468 platform : ios
5569 artifact-name : godot-cpp-ios-arm64-release
5670 artifact-path : bin/libgodot-cpp.ios.release.arm64.a
5771 flags : arch=arm64
72+ cache-name : ios-arm64
73+
74+ env :
75+ SCONS_CACHE : ${{ github.workspace }}/.scons-cache/
5876
5977 steps :
6078 - name : Checkout
6179 uses : actions/checkout@v3
6280 with :
6381 submodules : recursive
6482
83+ - name : Setup Godot build cache
84+ uses : ./.github/actions/godot-cache
85+ with :
86+ cache-name : ${{ matrix.cache-name }}
87+ continue-on-error : true
88+
6589 - name : Set up Python (for SCons)
6690 uses : actions/setup-python@v4
6791 with :
83107
84108 - name : Build godot-cpp (debug)
85109 run : |
86- scons platform=${{ matrix.platform }} target=debug generate_bindings=yes ${{ matrix.flags }}
110+ scons platform=${{ matrix.platform }} target=debug ${{ matrix.flags }}
87111
88112 - name : Build test without rebuilding godot-cpp (debug)
89113 run : |
0 commit comments