Skip to content

Commit f99bde2

Browse files
authored
feat: Improve CI workflows (#2794)
1 parent 01bb8db commit f99bde2

12 files changed

+474
-75
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build Android Runtime
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/build-android.yml'
7+
- 'build/Stride.Android.sln'
8+
# - 'deps/**'
9+
# - 'sources/core/**'
10+
# - 'sources/engine/**'
11+
# - 'sources/native/**'
12+
# - 'sources/shaders/**'
13+
# - 'sources/shared/**'
14+
# - 'sources/targets/**'
15+
- '!**/.all-contributorsrc'
16+
- '!**/.editorconfig'
17+
- '!**/.gitignore'
18+
- '!**/*.md'
19+
- '!crowdin.yml'
20+
types: [opened, synchronize, reopened, ready_for_review]
21+
workflow_dispatch:
22+
inputs:
23+
build-type:
24+
description: Build Configuration
25+
default: Debug
26+
type: choice
27+
options:
28+
- Debug
29+
- Release
30+
workflow_call:
31+
inputs:
32+
build-type:
33+
default: Debug
34+
type: string
35+
36+
jobs:
37+
#
38+
# Build Stride Runtime for Android
39+
#
40+
Android-Runtime:
41+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
42+
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
43+
runs-on: windows-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
lfs: true
48+
- uses: actions/setup-dotnet@v4
49+
with:
50+
dotnet-version: '8.0.x'
51+
- uses: microsoft/setup-msbuild@v2
52+
- name: Build
53+
run: |
54+
msbuild build\Stride.Android.sln `
55+
-restore -m:1 -nr:false `
56+
-v:m -p:WarningLevel=0 `
57+
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
58+
-p:StridePlatforms=Android `
59+
-p:StrideSkipUnitTests=true `
60+
-p:StrideSkipAutoPack=true

.github/workflows/build-assembly-processor.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
name: Build Assembly Processor
22

33
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/build-assembly-processor.yml'
7+
- 'build/Stride.AssemblyProcessor.sln'
8+
- 'sources/core/Stride.Core/**'
9+
- 'sources/core/Stride.Core.AssemblyProcessor/**'
10+
- 'sources/core/Stride.Core.AssemblyProcessor.Tests/**'
11+
- '!**/.all-contributorsrc'
12+
- '!**/.editorconfig'
13+
- '!**/.gitignore'
14+
- '!**/*.md'
15+
- '!crowdin.yml'
16+
types: [opened, synchronize, reopened, ready_for_review]
417
workflow_dispatch:
518
inputs:
619
build-type:
7-
description: Build Configuration?
20+
description: Build Configuration
821
default: Debug
922
type: choice
1023
options:
@@ -21,7 +34,8 @@ jobs:
2134
# Build Assembly Processor
2235
#
2336
Assembly-Processor:
24-
name: Build (${{ github.event.inputs.build-type || inputs.build-type }})
37+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
38+
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
2539
runs-on: windows-latest
2640
steps:
2741
- uses: actions/checkout@v4
@@ -35,7 +49,6 @@ jobs:
3549
dotnet build build\Stride.AssemblyProcessor.sln `
3650
-restore -m:1 -nr:false `
3751
-v:m -p:WarningLevel=0 `
38-
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} `
52+
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
3953
-p:StrideSkipUnitTests=true `
40-
-p:StrideSkipAutoPack=true `
41-
-p:StrideEnableCodeAnalysis=true
54+
-p:StrideSkipAutoPack=true

.github/workflows/build-ios.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build iOS Runtime
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/build-ios.yml'
7+
- 'build/Stride.iOS.sln'
8+
- 'deps/**'
9+
- 'sources/core/**'
10+
- 'sources/engine/**'
11+
- 'sources/native/**'
12+
- 'sources/shaders/**'
13+
- 'sources/shared/**'
14+
- 'sources/targets/**'
15+
- '!**/.all-contributorsrc'
16+
- '!**/.editorconfig'
17+
- '!**/.gitignore'
18+
- '!**/*.md'
19+
- '!crowdin.yml'
20+
types: [opened, synchronize, reopened, ready_for_review]
21+
workflow_dispatch:
22+
inputs:
23+
build-type:
24+
description: Build Configuration
25+
default: Debug
26+
type: choice
27+
options:
28+
- Debug
29+
- Release
30+
workflow_call:
31+
inputs:
32+
build-type:
33+
default: Debug
34+
type: string
35+
36+
jobs:
37+
#
38+
# Build Stride Runtime for iOS
39+
#
40+
iOS-Runtime:
41+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
42+
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
43+
runs-on: windows-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
lfs: true
48+
- uses: actions/setup-dotnet@v4
49+
with:
50+
dotnet-version: '8.0.x'
51+
- uses: microsoft/setup-msbuild@v2
52+
- name: Build
53+
run: |
54+
msbuild build\Stride.iOS.sln `
55+
-restore -m:1 -nr:false `
56+
-v:m -p:WarningLevel=0 `
57+
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
58+
-p:StridePlatforms=iOS `
59+
-p:StrideSkipUnitTests=true `
60+
-p:StrideSkipAutoPack=true
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build Launcher
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/build-launcher.yml'
7+
- 'build/Stride.Launcher.sln'
8+
- 'sources/core/**'
9+
- 'sources/launcher/**'
10+
- 'sources/presentation/**'
11+
- 'sources/shared/**'
12+
- 'sources/targets/**'
13+
- '!**/.all-contributorsrc'
14+
- '!**/.editorconfig'
15+
- '!**/.gitignore'
16+
- '!**/*.md'
17+
- '!crowdin.yml'
18+
types: [opened, synchronize, reopened, ready_for_review]
19+
workflow_dispatch:
20+
inputs:
21+
build-type:
22+
description: Build Configuration
23+
default: Debug
24+
type: choice
25+
options:
26+
- Debug
27+
- Release
28+
workflow_call:
29+
inputs:
30+
build-type:
31+
default: Debug
32+
type: string
33+
34+
jobs:
35+
#
36+
# Build Stride Runtime for Windows
37+
#
38+
Launcher:
39+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
40+
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
41+
runs-on: windows-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
with:
45+
lfs: true
46+
- uses: actions/setup-dotnet@v4
47+
with:
48+
dotnet-version: '8.0.x'
49+
- uses: microsoft/setup-msbuild@v2
50+
- name: Build
51+
run: |
52+
msbuild build\Stride.Launcher.sln `
53+
-restore -m:1 -nr:false `
54+
-v:m -p:WarningLevel=0 `
55+
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
56+
-p:StridePlatforms=Windows `
57+
-p:StrideSkipUnitTests=true `
58+
-p:StrideSkipAutoPack=true
Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1-
name: Build Linux
1+
name: Build Linux Runtime
22

33
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/build-linux-runtime.yml'
7+
- 'build/Stride.Runtime.sln'
8+
- 'deps/**'
9+
- 'sources/core/**'
10+
- 'sources/engine/**'
11+
- 'sources/native/**'
12+
- 'sources/shaders/**'
13+
- 'sources/shared/**'
14+
- 'sources/targets/**'
15+
- '!**/.all-contributorsrc'
16+
- '!**/.editorconfig'
17+
- '!**/.gitignore'
18+
- '!**/*.md'
19+
- '!crowdin.yml'
20+
types: [opened, synchronize, reopened, ready_for_review]
421
workflow_dispatch:
522
inputs:
623
build-type:
7-
description: Build Configuration?
24+
description: Build Configuration
825
default: Debug
926
type: choice
1027
options:
@@ -28,10 +45,11 @@ on:
2845

2946
jobs:
3047
#
31-
# Build Stride for Linux
48+
# Build Stride Runtime for Linux
3249
#
33-
Linux:
34-
name: Build (${{ github.event.inputs.build-type || inputs.build-type }}, ${{ github.event.inputs.graphics-api || inputs.graphics-api }})
50+
Linux-Runtime:
51+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
52+
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }}, ${{ github.event.inputs.graphics-api || inputs.graphics-api || 'OpenGL' }})
3553
runs-on: windows-latest
3654
steps:
3755
- uses: actions/checkout@v4
@@ -46,9 +64,8 @@ jobs:
4664
msbuild build\Stride.Runtime.sln `
4765
-restore -m:1 -nr:false `
4866
-v:m -p:WarningLevel=0 `
49-
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} `
67+
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
5068
-p:StridePlatforms=Linux `
51-
-p:StrideGraphicsApis=${{ github.event.inputs.graphics-api || inputs.graphics-api }} `
69+
-p:StrideGraphicsApis=${{ github.event.inputs.graphics-api || inputs.graphics-api || 'OpenGL' }} `
5270
-p:StrideSkipUnitTests=true `
53-
-p:StrideSkipAutoPack=true `
54-
-p:StrideEnableCodeAnalysis=true
71+
-p:StrideSkipAutoPack=true

.github/workflows/build-vs-package.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
name: Build Visual Studio Package
22

33
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/build-vs-package.yml'
7+
- 'build/Stride.VisualStudio.sln'
8+
- 'sources/tools/Stride.VisualStudio.*/**'
9+
- 'sources/targets/**'
10+
- '!**/.all-contributorsrc'
11+
- '!**/.editorconfig'
12+
- '!**/.gitignore'
13+
- '!**/*.md'
14+
- '!crowdin.yml'
15+
types: [opened, synchronize, reopened, ready_for_review]
416
workflow_dispatch:
517
inputs:
618
build-type:
7-
description: Build Configuration?
19+
description: Build Configuration
820
default: Debug
921
type: choice
1022
options:
@@ -21,7 +33,8 @@ jobs:
2133
# Build Visual Studio Package
2234
#
2335
VS-Package:
24-
name: Build (${{ github.event.inputs.build-type || inputs.build-type }})
36+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
37+
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
2538
runs-on: windows-latest
2639
steps:
2740
- uses: actions/checkout@v4
@@ -36,7 +49,6 @@ jobs:
3649
msbuild build\Stride.VisualStudio.sln `
3750
-restore -m:1 -nr:false `
3851
-v:m -p:WarningLevel=0 `
39-
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} `
52+
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
4053
-p:StrideSkipUnitTests=true `
41-
-p:StrideSkipAutoPack=true `
42-
-p:StrideEnableCodeAnalysis=true
54+
-p:StrideSkipAutoPack=true
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
name: Build Windows
1+
name: Build Windows (Full)
22

33
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/build-windows-full.yml'
7+
- 'build/Stride.sln'
8+
- 'deps/**'
9+
- 'sources/**'
10+
- '!**/.all-contributorsrc'
11+
- '!**/.editorconfig'
12+
- '!**/.gitignore'
13+
- '!**/*.md'
14+
- '!crowdin.yml'
15+
types: [opened, synchronize, reopened, ready_for_review]
416
workflow_dispatch:
517
inputs:
618
build-type:
7-
description: Build Configuration?
19+
description: Build Configuration
820
default: Debug
921
type: choice
1022
options:
@@ -21,7 +33,8 @@ jobs:
2133
# Build Stride for Windows
2234
#
2335
Windows:
24-
name: Build (${{ github.event.inputs.build-type || inputs.build-type }})
36+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
37+
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
2538
runs-on: windows-latest
2639
steps:
2740
- uses: actions/checkout@v4
@@ -36,8 +49,8 @@ jobs:
3649
msbuild build\Stride.sln `
3750
-restore -m:1 -nr:false `
3851
-v:m -p:WarningLevel=0 `
39-
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} `
52+
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
4053
-p:StridePlatforms=Windows `
54+
-p:StrideGraphicsApiDependentBuildAll=true `
4155
-p:StrideSkipUnitTests=true `
42-
-p:StrideSkipAutoPack=true `
43-
-p:StrideEnableCodeAnalysis=true
56+
-p:StrideSkipAutoPack=true

0 commit comments

Comments
 (0)