Skip to content

Commit 6c30e0c

Browse files
committed
Cherry-pick from feature/github-ci
1 parent 3871941 commit 6c30e0c

File tree

6 files changed

+256
-0
lines changed

6 files changed

+256
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Assembly Processor
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build-type:
7+
description: Build in Release or Debug?
8+
required: true
9+
default: Debug
10+
type: choice
11+
options:
12+
- Debug
13+
- Release
14+
workflow_call:
15+
inputs:
16+
build-type:
17+
required: true
18+
default: Debug
19+
type: string
20+
21+
jobs:
22+
#
23+
# Build Assembly Processor
24+
#
25+
Assembly-Processor:
26+
name: Build (${{ github.event.inputs.build-type || inputs.build-type }})
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
lfs: true
32+
- uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: '8.0.x'
35+
- uses: microsoft/setup-msbuild@v2
36+
- name: Build
37+
run: msbuild build\Stride.AssemblyProcessor.sln -restore -m:1 -nr:false -v:m -p:WarningLevel=0 -p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} -p:StrideSkipUnitTests=true -p:StrideSkipAutoPack=true -p:StrideEnableCodeAnalysis=true

.github/workflows/build-linux.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Linux
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build-type:
7+
description: Build in Release or Debug?
8+
required: true
9+
default: Debug
10+
type: choice
11+
options:
12+
- Debug
13+
- Release
14+
workflow_call:
15+
inputs:
16+
build-type:
17+
required: true
18+
default: Debug
19+
type: string
20+
21+
jobs:
22+
#
23+
# Build Stride for Linux
24+
#
25+
Linux:
26+
name: Build (${{ github.event.inputs.build-type || inputs.build-type }})
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
lfs: true
32+
- uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: '8.0.x'
35+
- uses: microsoft/setup-msbuild@v2
36+
- name: Build
37+
run: msbuild build\Stride.build -t:BuildLinux -m:1 -nr:false -v:m -p:WarningLevel=0 -p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} -p:StrideSkipUnitTests=true -p:StrideSkipAutoPack=true -p:StrideEnableCodeAnalysis=true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Visual Studio Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build-type:
7+
description: Build in Release or Debug?
8+
required: true
9+
default: Debug
10+
type: choice
11+
options:
12+
- Debug
13+
# - Release # has a bug and cannot build
14+
workflow_call:
15+
inputs:
16+
build-type:
17+
required: true
18+
default: Debug
19+
type: string
20+
21+
jobs:
22+
#
23+
# Build Visual Studio Package
24+
#
25+
VS-Package:
26+
name: Build (${{ github.event.inputs.build-type || inputs.build-type }})
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
lfs: true
32+
- uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: '8.0.x'
35+
- uses: microsoft/setup-msbuild@v2
36+
- name: Build
37+
run: msbuild build\Stride.VisualStudio.sln -restore -m:1 -nr:false -v:m -p:WarningLevel=0 -p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} -p:StrideSkipUnitTests=true -p:StrideSkipAutoPack=true -p:StrideEnableCodeAnalysis=true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Windows
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build-type:
7+
description: Build in Release or Debug?
8+
required: true
9+
default: Debug
10+
type: choice
11+
options:
12+
- Debug
13+
- Release
14+
workflow_call:
15+
inputs:
16+
build-type:
17+
required: true
18+
default: Debug
19+
type: string
20+
21+
jobs:
22+
#
23+
# Build Stride for Windows
24+
#
25+
Windows:
26+
name: Build (${{ github.event.inputs.build-type || inputs.build-type }})
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
lfs: true
32+
- uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: '8.0.x'
35+
- uses: microsoft/setup-msbuild@v2
36+
- name: Build
37+
run: msbuild build\Stride.build -t:BuildWindows -m:1 -nr:false -v:m -p:WarningLevel=0 -p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} -p:StrideSkipUnitTests=true -p:StrideSkipAutoPack=true -p:StrideEnableCodeAnalysis=true

.github/workflows/main.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- '.github/workflows/**'
9+
- 'build/**'
10+
- 'deps/**'
11+
- 'sources/**'
12+
- '!**/.all-contributorsrc'
13+
- '!**/.editorconfig'
14+
- '!**/.gitignore'
15+
- '!**/*.md'
16+
pull_request:
17+
branches:
18+
- master
19+
paths:
20+
- '.github/workflows/**'
21+
- 'build/**'
22+
- 'deps/**'
23+
- 'sources/**'
24+
- '!**/.all-contributorsrc'
25+
- '!**/.editorconfig'
26+
- '!**/.gitignore'
27+
- '!**/*.md'
28+
types: [opened, synchronize, reopened, ready_for_review]
29+
workflow_dispatch:
30+
31+
jobs:
32+
Setup:
33+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
- run: exit 0
37+
38+
Linux-Debug:
39+
needs: Setup
40+
uses: ./.github/workflows/build-linux.yml
41+
secrets: inherit
42+
with:
43+
build-type: Debug
44+
45+
Windows-Debug:
46+
needs: Setup
47+
uses: ./.github/workflows/build-windows.yml
48+
secrets: inherit
49+
with:
50+
build-type: Debug
51+
52+
Windows-Tests:
53+
needs: Setup
54+
uses: ./.github/workflows/test-windows.yml
55+
secrets: inherit
56+
with:
57+
build-type: Release
58+
test-category: Simple

.github/workflows/test-windows.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test Windows
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build-type:
7+
description: Build in Release or Debug?
8+
required: true
9+
default: Release
10+
type: choice
11+
options:
12+
- Debug
13+
- Release
14+
test-category:
15+
description: Which category of tests?
16+
required: false
17+
default: Simple
18+
type: choice
19+
options:
20+
- Simple
21+
- Game
22+
- VSPackage
23+
workflow_call:
24+
inputs:
25+
build-type:
26+
required: true
27+
default: Release
28+
type: string
29+
test-category:
30+
required: false
31+
default: Simple
32+
type: string
33+
34+
jobs:
35+
#
36+
# Test Stride on Windows
37+
#
38+
Windows:
39+
name: Test (${{ github.event.inputs.test-category || inputs.test-category }}, ${{ github.event.inputs.build-type || inputs.build-type }})
40+
runs-on: windows-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
with:
44+
lfs: true
45+
- uses: actions/setup-dotnet@v4
46+
with:
47+
dotnet-version: '8.0.x'
48+
- uses: microsoft/setup-msbuild@v2
49+
- name: Test
50+
run: msbuild build\Stride.build -t:RunTestsWindows -m:1 -nr:false -v:m -p:WarningLevel=0 -p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} -p:StrideTestCategories=${{ github.event.inputs.test-category || inputs.test-category }} -p:StrideGraphicsApis=Direct3D11

0 commit comments

Comments
 (0)