forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dotnet-8.yaml
214 lines (197 loc) · 6.44 KB
/
dotnet-8.yaml
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
package:
name: dotnet-8
version: 8.0.11
epoch: 2
description: ".NET SDK"
copyright:
- license: MIT
resources:
cpu: 2
memory: 32Gi
dependencies:
runtime:
- icu
environment:
contents:
packages:
- bash
- build-base
- busybox
- ca-certificates-bundle
- clang-15
- clang-15-default
- cmake
- curl
- dotnet-bootstrap-8
- glibc-locale-en
- icu-dev
- krb5-dev
- libunwind-dev
- llvm15
- llvm15-cmake-default
- llvm15-dev
- llvm15-tools
- lttng-ust-dev
- ncurses-dev
- openssf-compiler-options
- openssl-dev
- python3
- samurai
- wolfi-base
- zlib-dev
pipeline:
- uses: git-checkout
with:
repository: https://github.com/dotnet/dotnet
tag: v${{package.version}}
expected-commit: d5f3d652f9266d600777f626a9650a273419859b
destination: /home/build/src
- working-directory: /home/build/src
pipeline:
- runs: |
sed -i -E 's|( /p:BuildDebPackage=false)|\1 /p:EnablePackageValidation=false|' src/runtime/eng/SourceBuild.props
sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime/eng/SourceBuild.props
ln -sf /usr/share/dotnet-bootstrap-8/dotnet .dotnet
mkdir -p prereqs/packages/archive/
ln -sf /usr/share/dotnet-bootstrap-8/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz prereqs/packages/archive/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz
mkdir -p prereqs/packages/previously-source-built
tar -xzvf prereqs/packages/archive/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz -C prereqs/packages/previously-source-built/
- runs: |
./build.sh --clean-while-building \
-- \
/v:n \
/p:ContinueOnPrebuiltBaselineError=true \
/p:MinimalConsoleLogOutput=false \
/p:SkipPortableRuntimeBuild=true \
/p:BuildWithOnlineSources=false \
/p:CustomPrebuiltSourceBuiltPackagesPath=$(realpath prereqs/packages/previously-source-built)
- runs: |
mkdir -p "${{targets.destdir}}"/usr/share/dotnet
mkdir -p "${{targets.destdir}}"/usr/bin
- assertions:
required-steps: 1
pipeline:
- if: ${{build.arch}} == 'aarch64'
runs: |
tar zxf artifacts/arm64/Release/dotnet-sdk-*.tar.gz -C "${{targets.destdir}}"/usr/share/dotnet
- if: ${{build.arch}} == 'x86_64'
runs: |
tar zxf artifacts/x64/Release/dotnet-sdk-*.tar.gz -C "${{targets.destdir}}"/usr/share/dotnet
- runs: |
ln -s /usr/share/dotnet/dotnet "${{targets.destdir}}"/usr/bin/dotnet
- uses: strip
subpackages:
- name: dotnet-8-runtime
description: "The .NET Core Runtime, version 8"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/share/dotnet/shared
mv "${{targets.destdir}}"/usr/share/dotnet/shared/Microsoft.NETCore.App "${{targets.subpkgdir}}"/usr/share/dotnet/shared/
dependencies:
runtime:
- dotnet-8
- name: dotnet-8-runtime-default
dependencies:
runtime:
- dotnet-8-runtime
provides:
- dotnet-runtime=8
- name: aspnet-8-runtime
description: "The ASP.NET Core Runtime, version 8"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/share/dotnet/shared
mv "${{targets.destdir}}"/usr/share/dotnet/shared/Microsoft.AspNetCore.App "${{targets.subpkgdir}}"/usr/share/dotnet/shared/
dependencies:
runtime:
- dotnet-8-runtime
- name: aspnet-8-runtime-default
dependencies:
runtime:
- aspnet-8-runtime
provides:
- aspnet-runtime=8
- name: dotnet-8-targeting-pack
description: "The .NET Core targeting pack, version 8"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/share/dotnet/packs
mv "${{targets.destdir}}"/usr/share/dotnet/packs/NETStandard.Library.* "${{targets.subpkgdir}}"/usr/share/dotnet/packs/
mv "${{targets.destdir}}"/usr/share/dotnet/packs/Microsoft.NETCore.App.* "${{targets.subpkgdir}}"/usr/share/dotnet/packs/
- name: aspnet-8-targeting-pack
description: "The ASP.NET targeting pack, version 8"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/share/dotnet/packs
mv "${{targets.destdir}}"/usr/share/dotnet/packs/Microsoft.AspNetCore.App.* "${{targets.subpkgdir}}"/usr/share/dotnet/packs/
dependencies:
runtime:
- dotnet-8-targeting-pack
- name: dotnet-8-sdk
description: "The .NET Core SDK, version 8"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/share/dotnet
for i in sdk sdk-manifests templates; do
mv "${{targets.destdir}}"/usr/share/dotnet/$i "${{targets.subpkgdir}}"/usr/share/dotnet/
done
dependencies:
runtime:
- dotnet-8-runtime
- aspnet-8-runtime
- dotnet-8-targeting-pack
- aspnet-8-targeting-pack
- name: dotnet-8-sdk-default
dependencies:
runtime:
- dotnet-8-sdk
- dotnet-8-runtime-default
- aspnet-8-runtime-default
provides:
- dotnet-sdk=8
update:
enabled: true
github:
identifier: dotnet/dotnet
strip-prefix: v
use-tag: true
tag-filter: "v8"
test:
environment:
contents:
packages:
- dotnet-8-sdk
pipeline:
- name: Basic .NET command test
runs: |
dotnet --info
- name: Compile and run a simple .NET application
runs: |
cat <<'EOF' > HelloWorld.cs
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, World!");
}
}
EOF
dotnet new console -o HelloWorldApp --force
mv HelloWorld.cs HelloWorldApp/Program.cs
dotnet run --project HelloWorldApp
- name: Compile and run a .NET application with arguments
runs: |
cat <<'EOF' > ArgumentEcho.cs
using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Arguments: " + String.Join(", ", args));
}
}
EOF
dotnet new console -o ArgumentEchoApp --force
mv ArgumentEcho.cs ArgumentEchoApp/Program.cs
dotnet run --project ArgumentEchoApp -- arg1 arg2 arg3