diff --git a/.github/actions/base-deps/action.yml b/.github/actions/base-deps/action.yml index 628ea4218..3bcdf34e6 100644 --- a/.github/actions/base-deps/action.yml +++ b/.github/actions/base-deps/action.yml @@ -1,27 +1,31 @@ name: Setup Base Dependencies -description: Setup python and scons +description: Setup base dependencies inputs: - python-version: - description: The python version to use. - default: "3.x" - python-arch: - description: The python architecture. - default: "x64" + platform: + required: true + description: Target platform. runs: using: "composite" steps: - # Use python 3.x release (works cross platform) - - name: Setup python 3.x + - name: Setup 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 }} + python-version: 3.x - - name: Setup scons 4.4 + - name: Setup SCons 4.4 shell: bash run: | python -c "import sys; print(sys.version)" python -m pip install scons==4.4.0 - scons --version \ No newline at end of file + scons --version + + - name: Setup Android Dependencies + if: inputs.platform == 'android' + uses: nttld/setup-ndk@v1 + with: + ndk-version: r23c + link-to-sdk: true + + - name: Setup Windows Dependencies + if: inputs.platform == 'windows' + uses: ./.github/actions/windows-deps \ No newline at end of file diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1ba398c86..a76bbbd9d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -18,12 +18,6 @@ jobs: with: submodules: recursive - - name: Setup Android Dependencies - uses: nttld/setup-ndk@v1 - with: - ndk-version: r23c - link-to-sdk: true - - name: Setup Base Dependencies uses: ./.github/actions/base-deps diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43668752a..1182726e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,5 @@ +# Modeled off of godot-cpp https://github.com/godotengine/godot-cpp/blob/master/.github/workflows/ci.yml + name: 🛠️ Build All on: push: @@ -61,20 +63,11 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - - name: Setup Windows Dependencies - if: ${{ matrix.platform == 'windows' }} - uses: ./.github/actions/windows-deps - - name: Setup Android Dependencies - if: ${{ matrix.platform == 'android' }} - uses: nttld/setup-ndk@v1 - with: - ndk-version: r23c - link-to-sdk: true - - name: Setup Base Dependencies uses: ./.github/actions/base-deps + with: + platform: ${{ matrix.platform }} - name: Setup Build Cache uses: ./.github/actions/build-cache diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index bde2d78e2..76eb60676 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,7 +4,7 @@ on: [ workflow_call, workflow_dispatch ] jobs: build: name: 🪟 Windows ${{ matrix.arch }} ${{ matrix.target }} - runs-on: ubuntu-22.04 + runs-on: windows-2019 strategy: fail-fast: false matrix: @@ -18,9 +18,6 @@ jobs: with: submodules: recursive - - name: Setup Windows Dependencies - uses: ./.github/actions/windows-deps - - name: Setup Base Dependencies uses: ./.github/actions/base-deps