Skip to content

Commit

Permalink
consolidate deps; change windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Dec 28, 2024
1 parent 5b0816d commit 49e4aab
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 36 deletions.
34 changes: 19 additions & 15 deletions .github/actions/base-deps/action.yml
Original file line number Diff line number Diff line change
@@ -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
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
6 changes: 0 additions & 6 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit 49e4aab

Please sign in to comment.