-
-
Notifications
You must be signed in to change notification settings - Fork 232
85 lines (65 loc) · 2.59 KB
/
bit.ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: bit platform CI
on:
workflow_dispatch:
pull_request:
paths:
- 'src/**'
jobs:
build-release:
if: startsWith(github.event.pull_request.title, 'Prerelease') || startsWith(github.event.pull_request.title, 'Release') || startsWith(github.event.pull_request.title, 'Version')
name: build and test for release
runs-on: ubuntu-24.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: src/global.json
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install wasm and maui
run: cd src && dotnet workload install maui-android wasm-tools wasm-tools-net8
- name: Run BeforeBuildTasks
continue-on-error: true # Error MSB4057, not all csproj files have BeforeBuildTasks target.
run: dotnet build src/Bit-CI-release.sln -t:BeforeBuildTasks -m:1 -f net9.0
- name: MSBuild prerelease
run: dotnet build src/Bit-CI-release.sln
- name: Test
run: dotnet test --no-build --verbosity normal src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj
build:
if: startsWith(github.event.pull_request.title, 'Prerelease') != true && startsWith(github.event.pull_request.title, 'Release') != true && startsWith(github.event.pull_request.title, 'Version') != true
name: build and test
runs-on: ubuntu-24.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: src/global.json
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install wasm and maui
run: cd src && dotnet workload install maui-android wasm-tools wasm-tools-net8
- name: Install Android Sdk platform tools
run: ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools"
- name: Run BeforeBuildTasks
continue-on-error: true # Error MSB4057, not all csproj files have BeforeBuildTasks target.
run: dotnet build src/Bit-CI.sln -t:BeforeBuildTasks -m:1 -f net9.0
- name: Build
run: dotnet build src/Bit-CI.sln -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: Test
run: dotnet test --no-build --verbosity normal src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj