Cleanup #70
Workflow file for this run
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
# This is a basic workflow to help you get started with Actions | |
name: Builds | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
LIBRARY_PATH: addons/MotionMatching/bin | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
name: ${{matrix.name}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- identifier: windows-debug | |
os: windows-latest | |
name: π Windows Debug | |
target: template_debug | |
platform: windows | |
arch: x86_64 | |
toolset: msvc | |
platform_version: 2022 | |
- identifier: windows-release | |
os: windows-latest | |
name: π Windows Release | |
target: template_release | |
platform: windows | |
arch: x86_64 | |
toolset: msvc | |
platform_version: 2022 | |
- identifier: macos-debug | |
os: macos-latest | |
name: π macOS (universal) Debug | |
target: template_debug | |
platform: macos | |
arch: universal | |
toolset: clang | |
platform_version: 11 | |
- identifier: macos-release | |
os: macos-latest | |
name: π macOS (universal) Release | |
target: template_release | |
platform: macos | |
arch: universal | |
toolset: clang | |
platform_version: 11 | |
- identifier: linux-debug | |
os: ubuntu-latest | |
name: π§ Linux Debug | |
runner: ubuntu-22.04 | |
target: template_debug | |
platform: linux | |
arch: x86_64 | |
toolset: gcc | |
platform_version: 20.04 | |
- identifier: linux-release | |
os: ubuntu-latest | |
name: π§ Linux Release | |
runner: ubuntu-22.04 | |
target: template_release | |
platform: linux | |
arch: x86_64 | |
toolset: gcc | |
platform_version: 20.04 | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Python Packages Windows | |
if: ${{ matrix.platform == 'windows' }} | |
run: python -m pip install scons pywin32 | |
- name: Install Python Packages Others | |
if: ${{ matrix.platform != 'windows' }} | |
run: python -m pip install scons | |
- name: Download and install Boost | |
id: install-boost | |
uses: MarkusJx/install-boost@v2.4.4 | |
with: | |
boost_version: 1.81.0 | |
# The toolset used to compile boost, e.g. "msvc" | |
toolset: ${{ matrix.toolset }} # optional, default is | |
# The platform version boost was compiled on, e.g. "18.04" | |
platform_version: ${{ matrix.platform_version }} # optional, default is | |
# Whether the boost libraries are linked statically or dynamically | |
#link: # optional, default is | |
# The architecture the binaries were built for | |
arch: x86 # optional, default is x86 | |
# The dirctory to install boost into | |
#boost_install_dir: boost_1_81_0 # optional, default is | |
# Wheter to use actions/cache to improve build times | |
cache: true # optional, default is true | |
- name: Submodule Hash Windows | |
if: ${{ matrix.platform == 'windows' }} | |
run: echo "SUBMODULE_HASH=$( git rev-parse HEAD:godot-cpp )" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Submodule Hash MACOS | |
if: ${{ matrix.platform == 'macos' }} | |
run: echo "SUBMODULE_HASH=$( git rev-parse HEAD:godot-cpp )" >> $GITHUB_ENV | |
- name: Submodule Hash Linux | |
if: ${{ matrix.platform == 'linux' }} | |
run: echo "SUBMODULE_HASH=$( git rev-parse HEAD:godot-cpp )" >> $GITHUB_ENV | |
- name: MSVC Developer Command Prompt | |
if: ${{ matrix.platform == 'windows' }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Cache Godot Library | |
id: cache-godot-cpp | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/godot-cpp/bin | |
${{ github.workspace }}/godot-cpp/include | |
${{ github.workspace }}/godot-cpp/gen | |
key: ${{ runner.os }}-${{ env.SUBMODULE_HASH }} | |
- name: Compile Godot Library | |
if: steps.cache-godot-cpp.outputs.cache-hit != 'true' | |
run: | | |
scons -j8 platform=${{ matrix.platform }} target=${{ matrix.target }} arch=${{ matrix.arch }} | |
working-directory: godot-cpp | |
- name: Compile Addon | |
run: scons | |
disable_exceptions=false | |
platform=${{ matrix.platform }} | |
target=${{ matrix.target }} | |
arch=${{ matrix.arch }} | |
Boost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include/ | |
Boost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib | |
env: | |
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | |
- name: Upload Artifact Windows | |
if: ${{ matrix.platform == 'windows' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.identifier }} | |
if-no-files-found: error | |
path: | | |
${{ github.workspace }}\${{ env.LIBRARY_PATH }} | |
!**\*.lib | |
!**\*.exp | |
- name: Upload Artifact Others | |
if: ${{ matrix.platform != 'windows' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.identifier }} | |
path: ${{ github.workspace }}/${{ env.LIBRARY_PATH }} | |
if-no-files-found: error | |