Skip to content

feat: Add CI workflows #10

feat: Add CI workflows

feat: Add CI workflows #10

name: Build Linux Runtime
on:
pull_request:
paths:
- '.github/workflows/build-linux-runtime.yml'
- 'build/Stride.Runtime.sln'
- 'deps/**'
- 'sources/core/**'
- 'sources/engine/**'
- 'sources/native/**'
- 'sources/shaders/**'
- 'sources/shared/**'
- 'sources/targets/**'
- '!**/.all-contributorsrc'
- '!**/.editorconfig'
- '!**/.gitignore'
- '!**/*.md'
- '!crowdin.yml'
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
inputs:
build-type:
description: Build Configuration
default: Debug
type: choice
options:
- Debug
- Release
graphics-api:
description: Graphics API
default: OpenGL
type: choice
options:
- OpenGL
- Vulkan
workflow_call:
inputs:
build-type:
default: Debug
type: string
graphics-api:
default: OpenGL
type: string
jobs:
#
# Build Stride Runtime for Linux
#
Linux-Runtime:
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }}, ${{ github.event.inputs.graphics-api || inputs.graphics-api || 'OpenGL' }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: |
sudo apt-get install clang lld
- name: Build
run: |
dotnet build build/Stride.Runtime.sln \
-m:1 -nr:false \
-v:m -p:WarningLevel=0 \
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} \
-p:StridePlatforms=Linux \
-p:StrideGraphicsApis=${{ github.event.inputs.graphics-api || inputs.graphics-api || 'OpenGL' }} \
-p:StrideSkipUnitTests=true \
-p:StrideSkipAutoPack=true