Skip to content

GFX: Calculate minimal number of dispatch groups for cubemap filtering #43

GFX: Calculate minimal number of dispatch groups for cubemap filtering

GFX: Calculate minimal number of dispatch groups for cubemap filtering #43

Workflow file for this run

name: Build
on:
push:
branches-ignore:
- 'no-ci-**'
- 'skip-ci-**'
pull_request:
env:
# common settings
URHO3D_ENABLE_ALL: ON
URHO3D_SAMPLES: ON
URHO3D_TESTING: ON
URHO3D_PROFILING_FALLBACK: ON
DOTNET_VERSION: '6.0'
CMAKE_VERSION: 3.21.x
# ccache configuration
ccache_prefix: ${{ secrets.CACHE_VERSION }}-master
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_DEPEND: true
CCACHE_HARDLINK: true
CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime
CCACHE_NOHASHDIR: true
CCACHE_MAXSIZE: 5G
CCACHE_LIMIT_MULTIPLE: 0.6
# paths
ci_workspace_dir: ${{ github.workspace }}
ci_source_dir: ${{ github.workspace }}/source-code
ci_build_script: ./source-code/script/ci_build.sh
ci_build_dir: ${{ github.workspace }}/cmake-build
ci_sdk_dir: ${{ github.workspace }}/SDK
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
CheckSkipCI:
runs-on: ubuntu-20.04
# Skip CI if:
# - pull request is from rbfx/rbfx repository branch
if: |
!(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'rbfx/rbfx')
steps:
- run: exit 0
notifications:
name: Discord Commits
runs-on: ubuntu-20.04
continue-on-error: true
if: github.repository == 'rbfx/rbfx' && github.ref == 'refs/heads/master'
steps:
- name: Discord Commits
uses: rbfx/github_discord_notifier@latest
with:
discord-webhook: ${{ secrets.DISCORD_WEBHOOK_COMMITS }}
github-token: ${{ github.token }}
action-task: discord-commits
discord-username: GitHub
Windows-Tools:
if: github.event.pull_request.draft == false
runs-on: windows-2022
needs: [CheckSkipCI]
env:
BUILD_SHARED_LIBS: ON
URHO3D_GRAPHICS_API: OpenGL
URHO3D_ENABLE_ALL: OFF
URHO3D_SAMPLES: OFF
URHO3D_TESTING: OFF
URHO3D_SHADER_TRANSLATOR: OFF
URHO3D_SHADER_OPTIMIZER: OFF
URHO3D_TOOLS: "swig;PackageTool"
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ github.sha }}
restore-keys: ${{ env.ccache_prefix }}-${{ github.job }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Generate
shell: bash
run: cmake '-S${{ env.ci_source_dir }}' '-B${{ env.ci_build_dir }}' '-DCMAKE_INSTALL_PREFIX=${{ env.ci_sdk_dir }}' -DCMAKE_BUILD_TYPE=Release -DURHO3D_PARALLEL_BUILD=$NUMBER_OF_PROCESSORS
- name: Build
shell: bash
run: cmake --build '${{ env.ci_build_dir }}' --config Release --parallel $NUMBER_OF_PROCESSORS
- name: Install
shell: bash
run: cmake --install '${{ env.ci_build_dir }}' --config Release
- uses: actions/upload-artifact@v3
with:
name: 'rbfx-${{ github.job }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
Linux-Tools:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
needs: [CheckSkipCI]
env:
BUILD_SHARED_LIBS: ON
URHO3D_GRAPHICS_API: OpenGL
URHO3D_ENABLE_ALL: OFF
URHO3D_SAMPLES: OFF
URHO3D_TESTING: OFF
URHO3D_SHADER_TRANSLATOR: OFF
URHO3D_SHADER_OPTIMIZER: OFF
URHO3D_TOOLS: "swig;PackageTool"
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ github.sha }}
restore-keys: ${{ env.ccache_prefix }}-${{ github.job }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ccache xvfb libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev \
libxrender-dev libxss-dev libasound2-dev libpulse-dev libibus-1.0-dev libdbus-1-dev libreadline6-dev libudev-dev uuid-dev libtbb-dev
- name: Generate
shell: bash
run: cmake '-S${{ env.ci_source_dir }}' '-B${{ env.ci_build_dir }}' '-DCMAKE_INSTALL_PREFIX=${{ env.ci_sdk_dir }}' -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: bash
run: cmake --build '${{ env.ci_build_dir }}' --config Release --parallel $(nproc)
- name: Install
shell: bash
run: cmake --install '${{ env.ci_build_dir }}' --config Release
- uses: actions/upload-artifact@v3
with:
name: 'rbfx-${{ github.job }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
MacOS-Tools:
if: github.event.pull_request.draft == false
runs-on: macos-11
needs: [CheckSkipCI]
env:
BUILD_SHARED_LIBS: ON
URHO3D_GRAPHICS_API: OpenGL
URHO3D_ENABLE_ALL: OFF
URHO3D_SAMPLES: OFF
URHO3D_TESTING: OFF
URHO3D_SHADER_TRANSLATOR: OFF
URHO3D_SHADER_OPTIMIZER: OFF
URHO3D_TOOLS: "swig;PackageTool"
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ github.sha }}
restore-keys: ${{ env.ccache_prefix }}-${{ github.job }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Generate
shell: bash
run: cmake -S${{ env.ci_source_dir }} -B${{ env.ci_build_dir }} '-DCMAKE_INSTALL_PREFIX=${{ env.ci_sdk_dir }}' -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: bash
run: cmake --build '${{ env.ci_build_dir }}' --config Release --parallel $(sysctl -n hw.ncpu)
- name: Install
shell: bash
run: cmake --install '${{ env.ci_build_dir }}' --config Release
- uses: actions/upload-artifact@v3
with:
name: 'rbfx-${{ github.job }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
Windows:
if: github.event.pull_request.draft == false
runs-on: windows-2022
needs: [CheckSkipCI]
strategy:
fail-fast: false
matrix:
ci_arch:
- x64
- x86
ci_lib_type:
- dll
- lib
ci_build_type:
- dbg
- rel
ci_compiler:
- msvc
# TODO: Enable MinGW when the issue with crnlib is fixed
# - mingw
# MinGW debug builds require too much memory
exclude:
- ci_compiler: mingw
ci_build_type: dbg
env:
ci_platform: windows
ci_arch: ${{ matrix.ci_arch }}
ci_lib_type: ${{ matrix.ci_lib_type }}
ci_build_type: ${{ matrix.ci_build_type }}
ci_compiler: ${{ matrix.ci_compiler }}
ci_artifacts: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/nuget/') ||
startsWith(github.ref, 'refs/heads/nuget/')
) &&
(matrix.ci_build_type == 'rel') &&
(matrix.ci_arch == 'x64') &&
(matrix.ci_lib_type == 'dll') &&
(matrix.ci_compiler == 'msvc')
}}
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ matrix.ci_compiler }}-${{ github.sha }}
restore-keys: |
${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ matrix.ci_compiler }}
- name: Setup dotnet
uses: actions/setup-dotnet@v3
if: matrix.ci_lib_type == 'dll'
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup cmake
# FIXME: CMake installed by this action fails with MinGW because it can find 'C:/Program Files/Git/usr/bin/sh.exe' on PATH.
if: matrix.ci_compiler != 'mingw'
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Dependencies
shell: bash
run: ${{ env.ci_build_script }} dependencies
- name: Generate
shell: bash
run: ${{ env.ci_build_script }} generate
- name: Build
shell: bash
run: ${{ env.ci_build_script }} build
- name: Test (Native)
if: matrix.ci_compiler == 'msvc'
shell: bash
run: ${{ env.ci_build_script }} test
- name: Test (Managed)
if: (matrix.ci_compiler == 'msvc') && (matrix.ci_lib_type == 'dll')
shell: bash
run: ${{ env.ci_build_script }} cstest
- name: Install
shell: bash
run: ${{ env.ci_build_script }} install
- uses: actions/upload-artifact@v3
if: env.ci_artifacts == 'true'
with:
name: 'rbfx-${{ github.job }}-${{ matrix.ci_compiler }}-${{ matrix.ci_build_type }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_arch }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
UWP:
if: github.event.pull_request.draft == false
runs-on: windows-2022
needs: [CheckSkipCI, Windows-Tools]
strategy:
fail-fast: false
matrix:
ci_arch:
- x64
- arm
- arm64
ci_lib_type:
- dll
- lib
ci_build_type:
- dbg
- rel
ci_compiler:
- msvc
env:
ci_platform: uwp
ci_arch: ${{ matrix.ci_arch }}
ci_lib_type: ${{ matrix.ci_lib_type }}
ci_build_type: ${{ matrix.ci_build_type }}
ci_compiler: ${{ matrix.ci_compiler }}
ci_artifacts: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/nuget/') ||
startsWith(github.ref, 'refs/heads/nuget/')
) &&
(matrix.ci_build_type == 'rel') &&
(matrix.ci_arch == 'x64') &&
(matrix.ci_lib_type == 'dll') &&
(matrix.ci_compiler == 'msvc')
}}
URHO3D_SDK: ${{ github.workspace }}/host-sdk
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ github.sha }}
restore-keys: |
${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}
- uses: actions/download-artifact@v3
with:
name: 'rbfx-Windows-Tools-${{ github.sha }}'
path: host-sdk/
- name: Setup dotnet
uses: actions/setup-dotnet@v3
if: matrix.ci_lib_type == 'dll'
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Dependencies
shell: bash
run: ${{ env.ci_build_script }} dependencies
- name: Generate
shell: bash
run: ${{ env.ci_build_script }} generate
- name: Build
shell: bash
run: ${{ env.ci_build_script }} build
- name: Install
shell: bash
run: ${{ env.ci_build_script }} install
- uses: actions/upload-artifact@v3
if: env.ci_artifacts == 'true'
with:
name: 'rbfx-${{ github.job }}-${{ matrix.ci_compiler }}-${{ matrix.ci_build_type }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_arch }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
Linux:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
needs: [CheckSkipCI]
strategy:
fail-fast: false
matrix:
ci_arch:
- x64
# - x86 # TODO: Build script does not implement this fully.
ci_lib_type:
- dll
- lib
ci_build_type:
- dbg
- rel
ci_compiler:
- gcc
- clang
env:
ci_platform: linux
ci_arch: ${{ matrix.ci_arch }}
ci_lib_type: ${{ matrix.ci_lib_type }}
ci_build_type: ${{ matrix.ci_build_type }}
ci_compiler: ${{ matrix.ci_compiler }}
ci_artifacts: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/nuget/') ||
startsWith(github.ref, 'refs/heads/nuget/')
) &&
(matrix.ci_build_type == 'rel') &&
(matrix.ci_arch == 'x64') &&
(matrix.ci_lib_type == 'dll') &&
(matrix.ci_compiler == 'gcc')
}}
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ matrix.ci_compiler }}-${{ github.sha }}
restore-keys: |
${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ matrix.ci_compiler }}
- name: Setup dotnet
uses: actions/setup-dotnet@v3
if: matrix.ci_lib_type == 'dll'
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Dependencies
shell: bash
run: ${{ env.ci_build_script }} dependencies
- name: Generate
shell: bash
run: ${{ env.ci_build_script }} generate
- name: Build
shell: bash
run: ${{ env.ci_build_script }} build
- name: Test (Native)
shell: bash
run: ${{ env.ci_build_script }} test
- name: Install
shell: bash
run: ${{ env.ci_build_script }} install
- uses: actions/upload-artifact@v3
if: env.ci_artifacts == 'true'
with:
name: 'rbfx-${{ github.job }}-${{ matrix.ci_compiler }}-${{ matrix.ci_build_type }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_arch }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
MacOS:
if: github.event.pull_request.draft == false
runs-on: macos-11
needs: [CheckSkipCI]
strategy:
fail-fast: false
matrix:
ci_arch:
- x64
# - x86 # TODO: Untested.
ci_lib_type:
- dll
- lib
ci_build_type:
- dbg
- rel
ci_compiler:
- clang
env:
ci_platform: macos
ci_arch: ${{ matrix.ci_arch }}
ci_lib_type: ${{ matrix.ci_lib_type }}
ci_build_type: ${{ matrix.ci_build_type }}
ci_compiler: ${{ matrix.ci_compiler }}
ci_artifacts: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/nuget/') ||
startsWith(github.ref, 'refs/heads/nuget/')
) &&
(matrix.ci_build_type == 'rel') &&
(matrix.ci_arch == 'x64') &&
(matrix.ci_lib_type == 'dll') &&
(matrix.ci_compiler == 'clang')
}}
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ matrix.ci_compiler }}-${{ github.sha }}
restore-keys: |
${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_arch }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ matrix.ci_compiler }}
- name: Bash
shell: bash
run: brew install bash
- name: Setup dotnet
uses: actions/setup-dotnet@v3
if: matrix.ci_lib_type == 'dll'
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Dependencies
shell: bash
run: ${{ env.ci_build_script }} dependencies
- name: Generate
shell: bash
run: ${{ env.ci_build_script }} generate
- name: Build
shell: bash
run: ${{ env.ci_build_script }} build
- name: Install
shell: bash
run: ${{ env.ci_build_script }} install
- uses: actions/upload-artifact@v3
if: env.ci_artifacts == 'true'
with:
name: 'rbfx-${{ github.job }}-${{ matrix.ci_compiler }}-${{ matrix.ci_build_type }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_arch }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
Android:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
needs: [CheckSkipCI, Linux-Tools]
strategy:
fail-fast: false
matrix:
ci_build_type:
- dbg
- rel
env:
ci_platform: android
ci_build_type: ${{ matrix.ci_build_type }}
ci_artifacts: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/nuget/') ||
startsWith(github.ref, 'refs/heads/nuget/')
) &&
(matrix.ci_build_type == 'rel')
}}
URHO3D_SDK: ${{ github.workspace }}/host-sdk
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_build_type }}-${{ github.sha }}
restore-keys: |
${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_build_type }}
- uses: actions/download-artifact@v3
with:
name: 'rbfx-Linux-Tools-${{ github.sha }}'
path: host-sdk/
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Dependencies
shell: bash
run: ${{ env.ci_build_script }} dependencies
# Not applicable on Android, because build is performed through Gradle.
#- name: Generate
# shell: bash
# run: ${{ env.ci_build_script }} generate
- name: Build
shell: bash
run: ${{ env.ci_build_script }} build
- uses: actions/upload-artifact@v3
if: env.ci_artifacts == 'true'
with:
name: 'rbfx-${{ github.job }}-${{ matrix.ci_build_type }}-${{ github.sha }}'
path: '**/*.apk'
iOS:
if: github.event.pull_request.draft == false
runs-on: macos-11
needs: [CheckSkipCI, MacOS-Tools]
strategy:
fail-fast: false
matrix:
ci_lib_type:
# - dll # TODO: Linker error failing to find SDL_main.
- lib
ci_build_type:
- dbg
- rel
env:
ci_platform: ios
ci_lib_type: ${{ matrix.ci_lib_type }}
ci_build_type: ${{ matrix.ci_build_type }}
ci_artifacts: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/nuget/') ||
startsWith(github.ref, 'refs/heads/nuget/')
) &&
(matrix.ci_build_type == 'rel')
}}
URHO3D_SDK: ${{ github.workspace }}/host-sdk
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ github.sha }}
restore-keys: |
${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}
- uses: actions/download-artifact@v3
with:
name: 'rbfx-MacOS-Tools-${{ github.sha }}'
path: host-sdk/
- name: Setup dotnet
uses: actions/setup-dotnet@v3
if: matrix.ci_lib_type == 'dll'
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Bash
shell: bash
run: brew install bash
- name: Dependencies
shell: bash
run: ${{ env.ci_build_script }} dependencies
- name: Generate
shell: bash
run: ${{ env.ci_build_script }} generate
- name: Build
shell: bash
run: ${{ env.ci_build_script }} build
- uses: actions/upload-artifact@v3
if: env.ci_artifacts == 'true'
with:
name: 'rbfx-${{ github.job }}-${{ env.ci_build_type }}-${{ env.ci_lib_type }}-${{ github.sha }}'
path: '**/*.app'
Web:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
needs: [CheckSkipCI, Linux-Tools]
strategy:
fail-fast: false
matrix:
ci_lib_type:
- lib
ci_build_type:
- dbg
- rel
ci_emsdk_version:
- latest
#- 3.1.24 # Minimal supported
env:
BINARYEN_CORES: 1
ci_platform: web
ci_lib_type: ${{ matrix.ci_lib_type }}
ci_build_type: ${{ matrix.ci_build_type }}
ci_artifacts: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/nuget/') ||
startsWith(github.ref, 'refs/heads/nuget/')
) &&
(matrix.ci_build_type == 'rel')
}}
URHO3D_SDK: ${{ github.workspace }}/host-sdk
steps:
- uses: mymindstorm/setup-emsdk@v12
with:
version: ${{ matrix.ci_emsdk_version }}
- uses: actions/checkout@v3
with:
path: ${{ env.ci_source_dir }}
fetch-depth: 1
- name: Build Cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}-${{ github.sha }}
restore-keys: |
${{ env.ccache_prefix }}-${{ github.job }}-${{ matrix.ci_lib_type }}-${{ matrix.ci_build_type }}
- uses: actions/download-artifact@v3
with:
name: 'rbfx-Linux-Tools-${{ github.sha }}'
path: host-sdk/
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '${{ env.CMAKE_VERSION }}'
- name: Dependencies
shell: bash
run: ${{ env.ci_build_script }} dependencies
- name: Generate
shell: bash
run: ${{ env.ci_build_script }} generate
- name: Build
shell: bash
run: ${{ env.ci_build_script }} build
- name: Install
shell: bash
run: ${{ env.ci_build_script }} install
- name: Deploy
if: github.repository == 'rbfx/rbfx' && github.ref == 'refs/heads/master' && matrix.ci_build_type =='rel'
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.RBFX_DOCS_DEPLOY_TOKEN }}
external_repository: rbfx/rbfx.github.io
destination_dir: samples
cname: rebelfork.io
publish_dir: ${{ env.ci_sdk_dir }}/deploy
publish_branch: master
- name: Deploy [diligent]
if: github.repository == 'rbfx/rbfx' && github.ref == 'refs/heads/diligent' && matrix.ci_build_type =='rel'
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.RBFX_DOCS_DEPLOY_TOKEN }}
external_repository: rbfx/rbfx.github.io
destination_dir: samples-diligent
cname: rebelfork.io
publish_dir: ${{ env.ci_sdk_dir }}/deploy
publish_branch: master
- uses: actions/upload-artifact@v3
if: env.ci_artifacts == 'true'
with:
name: 'rbfx-${{ github.job }}-${{ env.ci_build_type }}-${{ env.ci_lib_type }}-${{ github.sha }}'
path: ${{ env.ci_sdk_dir }}
NuGet:
runs-on: ubuntu-20.04
if: ${{ startsWith(github.ref, 'refs/tags/nuget/') || startsWith(github.ref, 'refs/heads/nuget/') }}
needs:
- Windows
- UWP
- MacOS
- Android
- iOS
- Web
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
path: source-code
fetch-depth: 1
- name: Get short SHA
id: vars
run: echo "sha_short=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v3
with:
path: source-code/packaging/nuget/
- name: Nuget
shell: bash
working-directory: source-code/packaging/nuget/
run: |
./package.sh
for pkg in out/*.nupkg;
do
dotnet nuget push $pkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
done
Docs:
runs-on: ubuntu-20.04
if: github.repository == 'rbfx/rbfx' && github.ref == 'refs/heads/master'
needs:
- Windows
- UWP
- MacOS
- Android
- iOS
- Web
- CheckSkipCI
env:
GH_TOKEN: ${{ secrets.RBFX_DOCS_DEPLOY_TOKEN }}
steps:
- name: Trigger
shell: bash
run: |
gh workflow run --repo rbfx/rbfx-docs Documentation