Skip to content

Initial commit

Initial commit #1

Workflow file for this run

on:
push:
jobs:
build-gdextension:
runs-on: ${{ matrix.opts.runner }}
name: ${{ matrix.opts.name }}
strategy:
fail-fast: false
matrix:
opts:
- identifier: linux-debug (x86_64)
name: Linux (64 bits) - Debug
runner: ubuntu-20.04
target: template_debug
platform: linux
arch: x86_64
output: linux64
- identifier: linux-release (x86_64)
name: Linux (64 bits) - Release
runner: ubuntu-20.04
target: template_release
platform: linux
arch: x86_64
output: linux64
- identifier: linux-debug (x86_32)
name: Linux (32 bits) - Debug
runner: ubuntu-20.04
target: template_debug
platform: linux
arch: x86_32
output: linux32
- identifier: linux-release (x86_32)
name: Linux (32 bits) - Release
runner: ubuntu-20.04
target: template_release
platform: linux
arch: x86_32
output: linux32
- identifier: windows-debug (x86_64)
name: Windows (64 bits) - Debug
runner: windows-latest
target: template_debug
platform: windows
arch: x86_64
output: win64
- identifier: windows-release (x86_64)
name: Windows (64 bits) - Release
runner: windows-latest
target: template_release
platform: windows
arch: x86_64
output: win64
- identifier: windows-debug (x86_32)
name: Windows (32 bits) - Debug
runner: windows-latest
target: template_debug
platform: windows
arch: x86_32
output: win32
- identifier: windows-release (x86_32)
name: Windows (32 bits) - Release
runner: windows-latest
target: template_release
platform: windows
arch: x86_32
output: win32
- identifier: macos-release (universal)
name: MacOS (universal) - Release
runner: macos-latest
target: template_release
platform: macos
arch: universal
output: macos
- identifier: macos-debug (universal)
name: MacOS (universal) - Debug
runner: macos-latest
target: template_debug
platform: macos
arch: universal
output: macos
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install gcc-multilib
if: ${{ startsWith(matrix.opts.arch, 'x86_32') && startsWith(matrix.opts.runner,'ubuntu-') }}
shell: sh
run: |
sudo apt-get update
sudo apt install gcc-multilib g++-multilib
- name: (Linux) Install buildroot x86_64
if: ${{ startsWith(matrix.opts.identifier, 'linux-') && contains(matrix.opts.arch, 'x86_64')}}
shell: sh
run: |
sudo apt-get update
sudo apt-get install yasm
cd /opt
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
mv x86_64-godot-linux-gnu_sdk-buildroot buildroot
cd buildroot
./relocate-sdk.sh
- name: (Linux) Install buildroot x86_32
if: ${{ startsWith(matrix.opts.identifier, 'linux-') && contains(matrix.opts.arch, 'x86_32')}}
shell: sh
run: |
sudo apt-get update
sudo apt-get install yasm
cd /opt
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/i686-godot-linux-gnu_sdk-buildroot.tar.bz2
tar xf i686-godot-linux-gnu_sdk-buildroot.tar.bz2
rm -f i686-godot-linux-gnu_sdk-buildroot.tar.bz2
mv i686-godot-linux-gnu_sdk-buildroot buildroot
cd buildroot
./relocate-sdk.sh
- name: Set up Python
uses: actions/setup-python@v2
- name: Set up SCons
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
scons --version
- name: Load .scons_cache directory
id: godot-extension-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{matrix.opts.output}}-${{github.job}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{matrix.opts.output}}-${{github.job}}-${{github.ref}}-${{github.sha}}
${{matrix.opts.output}}-${{github.job}}-${{github.ref}}
${{matrix.opts.output}}-${{github.job}}
- name: Compile extension
shell: sh
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
SCONS_CACHE_LIMIT: 7168
run: |
PATH=/opt/buildroot/bin:$PATH scons target='${{ matrix.opts.target }}' platform='${{ matrix.opts.platform }}' arch='${{ matrix.opts.arch }}' ${{ matrix.opts.args }} -j2
ls -la addons/godot-rcheevos-rhash/${{ matrix.opts.output }}
- name: Strip bins
if: "!startsWith(matrix.opts.identifier, 'windows-') && startsWith(matrix.opts.arch, 'x86_')"
shell: sh
run: |
strip addons/godot-rcheevos-rhash/${{ matrix.opts.output }}/* || true
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: rcheevos-rhash-build
path: |
addons/