Repository navigation
130 lines (103 loc) · 3.54 KB
/
Copy pathci.yml
File metadata and controls
130 lines (103 loc) · 3.54 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CI
on:
push:
branches: [ main, master, develop ]
paths:
- 'Sources/**'
- 'release.sh'
- 'release.test.sh'
- '.github/workflows/ci.yml'
- '.github/workflows/publish-nuget.yml'
- '.github/workflows/release.yml'
- '.github/scripts/**'
pull_request:
branches: [ main, master, develop ]
paths:
- 'Sources/**'
- 'release.sh'
- 'release.test.sh'
- '.github/workflows/ci.yml'
- '.github/workflows/publish-nuget.yml'
- '.github/workflows/release.yml'
- '.github/scripts/**'
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['9.0.x', '10.0.x']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
working-directory: ./Sources
run: dotnet restore
- name: Build
working-directory: ./Sources
run: dotnet build --configuration Release --no-restore
- name: Test
working-directory: ./Sources
run: dotnet test --configuration Release --no-build --verbosity normal --logger:"console;verbosity=detailed"
- name: Tests must not write into the repository
run: '[ -z "$(git status --porcelain)" ] || { git status --porcelain; echo "::error::tests wrote into the repository"; exit 1; }'
- name: Pack (dry run)
if: matrix.dotnet-version == '10.0.x'
working-directory: ./Sources/ModelingEvolution.Drawing
run: dotnet pack --configuration Release --no-build --output ./test-nupkg
- name: Validate package
if: matrix.dotnet-version == '10.0.x'
run: |
# Check that package was created
ls -la Sources/ModelingEvolution.Drawing/test-nupkg/
# Extract and inspect package contents
cd Sources/ModelingEvolution.Drawing/test-nupkg
unzip -l ModelingEvolution.Drawing.*.nupkg | head -20
- name: Summary
if: always()
run: |
echo "## CI Build Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **.NET Version**: ${{ matrix.dotnet-version }}" >> $GITHUB_STEP_SUMMARY
echo "- **Build**: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
build-and-test-arm64:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
working-directory: ./Sources
run: dotnet restore
- name: Build
working-directory: ./Sources
run: dotnet build --configuration Release --no-restore
- name: Test
working-directory: ./Sources
run: dotnet test --configuration Release --no-build --verbosity normal
- name: Tests must not write into the repository
run: '[ -z "$(git status --porcelain)" ] || { git status --porcelain; echo "::error::tests wrote into the repository"; exit 1; }'
release-script:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Syntax check
run: |
bash -n release.sh
bash -n release.test.sh
- name: Test release.sh
run: ./release.test.sh
grep-gate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Grep gate (epic-129 TS-129-48 rows; each must find 0 lines)
run: ./.github/scripts/grep-gate.sh