Repository navigation
125 lines (106 loc) · 3.89 KB
/
Copy pathbuild.yml
File metadata and controls
125 lines (106 loc) · 3.89 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
# Builds and runs tests on Ubuntu. The full OS matrix runs in publish and release.
# Pushes CI feed if secrets.SLEET_CONNECTION is provided
name: build
on:
workflow_dispatch:
push:
branches: [ main, dev, 'feature/*', 'rel/*' ]
paths-ignore:
- changelog.md
- readme.md
pull_request:
types: [opened, synchronize, reopened]
env:
DOTNET_NOLOGO: true
defaults:
run:
shell: bash
jobs:
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: ⚙ dotnet
uses: devlooped/actions-dotnet-env@v1
- name: ✓ ensure format
run: |
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget
build:
name: build-ubuntu-latest
needs: dotnet-format
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: ⚙ dotnet
uses: devlooped/actions-dotnet-env@v1
- name: 🙏 build
run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
- name: 🧪 test
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m -d $GITHUB_WORKSPACE/logs/ubuntu-latest.txt --results-directory $GITHUB_WORKSPACE/logs
- name: 📦 pack
run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
- name: 🔼 packages
uses: actions/upload-artifact@v4
with:
name: bin-ubuntu-latest
path: bin/*.nupkg
# Push the CI package to the sleet feed when a connection is configured
- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
if: env.SLEET_CONNECTION != ''
run: |
dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r)
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
native-aot:
name: native-aot-${{ matrix.framework }}
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
framework: [net8.0, net10.0]
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: dotnet
uses: devlooped/actions-dotnet-env@v1
- name: packages
uses: actions/download-artifact@v4
with:
name: bin-ubuntu-latest
path: bin
- name: publish and execute
run: |
dotnet publish src/Acceptance/CompiledAot/CompiledAot.csproj -c Release -f ${{ matrix.framework }} -r linux-x64 -p:UseSharedCompilation=false -warnaserror -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
src/Acceptance/CompiledAot/bin/Release/${{ matrix.framework }}/linux-x64/publish/CompiledAot
acceptance:
name: acceptance
runs-on: ubuntu-latest
needs: build
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
- name: ⚙ dotnet
uses: devlooped/actions-dotnet-env@v1
- name: 🔽 packages
uses: actions/download-artifact@v4
with:
name: bin-ubuntu-latest
path: bin
- name: 🏗 generate comparison stunts
run: dotnet run --file GenerateReferenceStunts.cs
working-directory: src/Acceptance
- name: 🧪 test
run: dotnet test Acceptance.slnx -f net10.0 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
working-directory: src/Acceptance