-
-
Notifications
You must be signed in to change notification settings - Fork 401
77 lines (63 loc) · 2.13 KB
/
ci.yaml
File metadata and controls
77 lines (63 loc) · 2.13 KB
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
name: main
on:
push:
branches: [ main, v7.x, v8.x, v9.x ]
paths: ['Source/**', '.github/workflows/**']
pull_request:
branches: [ main, v7.x, v8.x, v9.x ]
paths: ['Source/**', '.github/workflows/**']
jobs:
build:
runs-on: windows-latest
outputs:
run_maui: ${{ steps.check_files.outputs.run_maui }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0'
- name: Build
run: dotnet build Source\csla.test.sln
- name: Test
run: dotnet test Source\csla.test.sln --no-build --verbosity normal --filter TestCategory!=SkipOnCIServer --settings Source/test.runsettings
- name: check for MAUI modified files
id: check_files
shell: bash
run: |
echo "=============== list modified files ==============="
git diff --name-only HEAD^ HEAD
echo "========== check paths of modified files =========="
git diff --name-only HEAD^ HEAD > files.txt
while IFS= read -r file
do
echo $file
if [[ $file = Source/Csla.Xaml.Maui/* || $file = Source/Csla.Xaml.Shared/* || $file = Source/csla.maui.test.sln ]]; then
echo "found a MAUI modified file."
echo "run_maui=true" >> $GITHUB_OUTPUT
break
else
echo "run_maui=false" >> $GITHUB_OUTPUT
fi
done < files.txt
Build_CSLA_MAUI:
name: 'Build MAUI'
needs: build
if: needs.build.outputs.run_maui == 'true'
runs-on: macos-15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0'
- name: Install MAUI workload
run: dotnet workload install maui
- name: "Select a specific version of Xcode"
run: sudo xcode-select -s /Applications/Xcode_16.4.app
- name: Build Solution
run: dotnet build Source/csla.maui.test.sln --configuration Debug