Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Dec 28, 2023
1 parent c280998 commit 9cb65fb
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/actions/windows-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: "composite"
steps:
- name: (Windows) Install mingw64
if: startsWith(matrix.identifier, 'windows-')
if: ${{ matrix.platform == 'windows' }}
shell: sh
run: |
sudo apt-get install mingw-w64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: android-${{ matrix.arch }}-${{ matrix.target }}
cache-name: ${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
continue-on-error: true

- name: Build Terrain3D
shell: sh
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
Expand Down
25 changes: 9 additions & 16 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,38 @@ on: [ workflow_call, workflow_dispatch ]

jobs:
build-linux:
name: ${{ matrix.name }}
name: 🐧 Linux ${{ matrix.arch }} ${{ matrix.target }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- identifier: linux-debug
name: Linux Debug
target: template_debug
platform: linux
arch: x86_64
- identifier: linux-release
name: Linux Release
target: template_release
platform: linux
arch: x86_64
platform: [linux]
target: [debug, release]
arch: [x86_64]

steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
lfs: true

- name: Setup Base Dependencies
uses: ./.github/actions/base-deps

- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.identifier }}
cache-name: ${{ matrix.platform }}-${{ matrix.target }}
continue-on-error: true

- name: Build Terrain3D
shell: sh
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target='${{ matrix.target }}' platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' debug_symbols=no -j2
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Prepare Files
shell: sh
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,38 @@ on: [ workflow_call, workflow_dispatch ]

jobs:
build-macos:
name: ${{ matrix.name }}
name: 🍎 macOS ${{ matrix.arch }} ${{ matrix.target }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- identifier: macos-debug
name: macOS Debug
target: template_debug
platform: macos
- identifier: macos-release
name: macOS Release
target: template_release
platform: macos
platform: [macos]
target: [debug, release]
arch: [universal]

steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
lfs: true

- name: Setup Base Dependencies
uses: ./.github/actions/base-deps

- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.identifier }}
cache-name: ${{ matrix.platform }}-${{ matrix.target }}
continue-on-error: true

- name: Build Terrain3D
shell: sh
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target='${{ matrix.target }}' platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' debug_symbols=no -j2
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Include Files
shell: sh
Expand Down
25 changes: 9 additions & 16 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,20 @@ on: [ workflow_call, workflow_dispatch ]

jobs:
build:
name: ${{ matrix.name }}
name: 🪟 Windows ${{ matrix.arch }} ${{ matrix.target }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- identifier: windows-debug
name: Windows Debug
target: template_debug
platform: windows
arch: x86_64
- identifier: windows-release
name: Windows Release
target: template_release
platform: windows
arch: x86_64
platform: [windows]
target: [debug, release]
arch: [x86_64]

steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
lfs: true

- name: Setup Windows Dependencies
uses: ./.github/actions/windows-deps
Expand All @@ -36,15 +27,17 @@ jobs:
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.identifier }}
cache-name: ${{ matrix.platform }}-${{ matrix.target }}
continue-on-error: true

- name: Build Terrain3D
shell: sh
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target='${{ matrix.target }}' platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' debug_symbols=no -j2
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Prepare Files
shell: sh
Expand Down

0 comments on commit 9cb65fb

Please sign in to comment.