From 9cb65fb0836dde099bfe54fa2a29ec38d735965f Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+TokisanGames@users.noreply.github.com> Date: Thu, 28 Dec 2023 18:42:55 +0700 Subject: [PATCH] Update actions --- .github/actions/windows-deps/action.yml | 2 +- .github/workflows/android.yml | 4 ++-- .github/workflows/linux.yml | 25 +++++++++---------------- .github/workflows/macos.yml | 23 +++++++++-------------- .github/workflows/windows.yml | 25 +++++++++---------------- 5 files changed, 30 insertions(+), 49 deletions(-) diff --git a/.github/actions/windows-deps/action.yml b/.github/actions/windows-deps/action.yml index 37d3dad24..e09039650 100644 --- a/.github/actions/windows-deps/action.yml +++ b/.github/actions/windows-deps/action.yml @@ -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 diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 68b83bbf4..96acbd6c5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -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 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ad9880ad2..ff19581b2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,29 +3,20 @@ 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 @@ -33,15 +24,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 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c411272bb..fa84ac4cf 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -3,27 +3,20 @@ 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 @@ -31,15 +24,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: Include Files shell: sh diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b83b36be8..ab0731c15 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 @@ -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