diff --git a/.github/workflows/runner.yml b/.github/workflows/all_builds.yml similarity index 100% rename from .github/workflows/runner.yml rename to .github/workflows/all_builds.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 8c57104..7308aa2 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -105,11 +105,11 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} restore-keys: | - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}} + ${{env.BIN}}-${{inputs.godot-treeish}} - name: Compilation env: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 4db9047..1adcc06 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -117,11 +117,11 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} restore-keys: | - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}} + ${{env.BIN}}-${{inputs.godot-treeish}} - name: Compilation env: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9a604f7..bbb4e43 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -142,11 +142,11 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} restore-keys: | - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}} + ${{env.BIN}}-${{inputs.godot-treeish}} - name: Compilation env: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2651bd7..aacdd92 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -160,11 +160,11 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} restore-keys: | - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}} + ${{env.BIN}}-${{inputs.godot-treeish}} - name: Compilation env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4908d6a..4c4f84e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,73 +1,78 @@ name: 🔧 Test builds on: - workflow_call: - inputs: - godot-treeish: - description: A tag, branch or commit hash in the Godot repository. - type: string - default: master - limboai-treeish: - description: A tag, branch or commit hash in the LimboAI repository. - type: string - default: master - workflow_dispatch: - inputs: - godot-treeish: - description: A tag, branch or commit hash in the Godot repository. - type: string - default: master - limboai-treeish: - description: A tag, branch or commit hash in the LimboAI repository. - type: string - default: master + + push: + branches: [ master ] + paths-ignore: + - "README.md" + - "LICENSE" + - "**/*.png" + - "demo/*" + + pull_request: + branches: [ master ] + paths-ignore: + - "README.md" + - "LICENSE" + - "**/*.png" + - "demo/*" # Global Settings env: + GODOT_TREEISH: 4.1.1-stable SCONS_CACHE_MSVC_CONFIG: true SCONS_CACHE_LIMIT: 4096 - SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes + SCONSFLAGS: verbose=yes warnings=extra werror=yes DOTNET_NOLOGO: true DOTNET_CLI_TELEMETRY_OPTOUT: true jobs: - linux-test-build: + linux-test-builds: runs-on: "ubuntu-20.04" name: ${{ matrix.name }} strategy: fail-fast: false matrix: include: + - name: 🐧 Editor (x86_64, debug) + Tests + target: editor + arch: x86_64 + tests: true + sconsflags: devbuild=yes debug_symbols=yes + - name: 🐧 Editor (x86_64, release) target: editor arch: x86_64 - build-mono: false + tests: false + sconsflags: production=yes - name: 🐧 Template (x86_64, release) target: template_release arch: x86_64 - build-mono: false + tests: false + sconsflags: production=yes - name: 🐧 Template (x86_64, debug) target: template_debug arch: x86_64 - build-mono: false + tests: false + sconsflags: production=yes env: - BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} + BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}} steps: - name: Clone Godot uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot-treeish }} + ref: ${{ env.GODOT_TREEISH }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai-treeish }} # Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables. - uses: ./modules/limboai/.github/actions/init-version @@ -98,18 +103,18 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}}-${{github.sha}} restore-keys: | - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}} + ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}}-${{github.sha}} + ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}} + ${{env.BIN}}-${{env.GODOT_TREEISH}} - name: Compilation env: SCONS_CACHE: ${{github.workspace}}/.scons_cache/ run: | PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH - scons platform=linuxbsd target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{env.SCONSFLAGS}} + scons platform=linuxbsd target=${{matrix.target}} arch=${{matrix.arch}} tests=${{matrix.tests}} ${{matrix.sconsflags}} ${{env.SCONSFLAGS}} - name: Prepare artifact env: @@ -129,6 +134,13 @@ jobs: name: ${{ startsWith(matrix.target, 'template') && env.NAME_TEMPLATES || env.NAME_EDITOR }} path: out/* + - name: Unit Tests + if: ${{ matrix.tests }} + run: | + ./out/${{ env.BIN }} --version + ./out/${{ env.BIN }} --help + ./out/${{ env.BIN }} --headless --test + windows-dot-net: runs-on: "windows-latest" name: ${{ matrix.name }} @@ -140,11 +152,13 @@ jobs: target: editor arch: x86_64 build-mono: true + sconsflags: production=yes - name: 🪟 Template .NET (x86_64, release) target: template_release arch: x86_64 build-mono: true + sconsflags: production=yes env: BIN: godot.windows.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} @@ -154,13 +168,12 @@ jobs: uses: actions/checkout@v3 with: repository: godotengine/godot - ref: ${{ inputs.godot-treeish }} + ref: ${{ env.GODOT_TREEISH }} - name: Clone LimboAI module uses: actions/checkout@v3 with: path: modules/limboai - ref: ${{ inputs.limboai-treeish }} # Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables. - uses: ./modules/limboai/.github/actions/init-version @@ -185,17 +198,17 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}}-${{github.sha}} restore-keys: | - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}} + ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}}-${{github.sha}} + ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}} + ${{env.BIN}}-${{env.GODOT_TREEISH}} - name: Compilation env: SCONS_CACHE: ${{github.workspace}}/.scons_cache/ run: | - scons -j2 platform=windows target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{env.SCONSFLAGS}} + scons -j2 platform=windows target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{matrix.sconsflags}} ${{env.SCONSFLAGS}} - name: Generate C# glue if: matrix.build-mono && matrix.target == 'editor' diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 38cae0c..829ef6f 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -94,11 +94,11 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.CACHE_NAME}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} restore-keys: | - ${{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}} + ${{env.CACHE_NAME}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} + ${{env.CACHE_NAME}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}} + ${{env.CACHE_NAME}}-${{inputs.godot-treeish}} - name: Compilation env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index db4f9d3..d3aeb07 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -137,11 +137,11 @@ jobs: uses: actions/cache@v3 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + key: ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} restore-keys: | - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} - ${{env.BIN}}-${{env.GODOT_BASE_BRANCH}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}} + ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}} + ${{env.BIN}}-${{inputs.godot-treeish}} - name: Compilation env: