🛠️ Build All #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🛠️ Build All | |
on: workflow_dispatch | |
env: | |
SCONSFLAGS: verbose=yes | |
jobs: | |
build: | |
runs-on: ${{ matrix.runner }} | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- identifier: linux-debug | |
name: Linux Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: linux | |
arch: x86_64 | |
- identifier: linux-release | |
name: Linux Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: linux | |
arch: x86_64 | |
- identifier: windows-debug | |
name: Windows Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: windows | |
arch: x86_64 | |
- identifier: windows-release | |
name: Windows Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: windows | |
arch: x86_64 | |
- identifier: macos-debug | |
name: macOS Debug | |
target: template_debug | |
platform: macos | |
- identifier: macos-release | |
name: macOS Release | |
target: template_release | |
platform: macos | |
- identifier: android-debug | |
name: Android Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: android | |
arch: arm64 | |
- identifier: android-release | |
name: Android Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: android | |
arch: arm64 | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: (Windows) Install mingw64 | |
if: ${{ startsWith(matrix.identifier, 'windows-') }} | |
shell: sh | |
run: | | |
sudo apt-get install mingw-w64 | |
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix | |
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix | |
- name: (Android) Set up Android dependencies | |
if: ${{ startsWith(matrix.identifier, 'android-') }} | |
uses: ./.github/actions/android-deps | |
- name: Setup python & scons | |
uses: ./.github/actions/base-deps | |
- name: Compile extension | |
shell: sh | |
env: | |
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/" | |
SCONS_CACHE_LIMIT: 7168 | |
run: | | |
scons target='${{ matrix.target }}' platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' ${{ env.SCONSFLAGS }} -j2 | |
- name: Strip libraries | |
if: ${{ startsWith(matrix.identifier, 'windows-') }} || ${{ startsWith(matrix.identifier, 'linux-') }} | |
shell: sh | |
run: | | |
ls -l project/addons/terrain_3d/bin/ | |
strip project/addons/terrain_3d/bin/libterrain.* | |
ls -l project/addons/terrain_3d/bin/ | |
- name: Prepare artifact | |
shell: sh | |
run: | | |
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE' ${{ github.workspace }}/project/addons/terrain_3d/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: | | |
${{ github.workspace }}/project/ |