-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (34 loc) · 1.45 KB
/
build.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
name: Build .NET SDK
on: [workflow_dispatch]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Get Docker image
run: |
docker image pull mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-riscv64-net9.0
- name: Maximize build space
uses: AdityaGarg8/[email protected]
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-cached-tools: 'true'
- name: Clone repository
run: |
git clone --depth 1 -b v9.0.0-rc.2.24473.5 https://github.com/dotnet/dotnet
- name: Apply patches
run: |
wget https://patch-diff.githubusercontent.com/raw/dotnet/sdk/pull/42158.diff
patch -d dotnet/src/sdk -p1 -i ${{ github.workspace }}/42158.diff
- name: Build
run: |
docker run --platform linux/amd64 --rm -v${{ github.workspace }}/dotnet:/dotnet -e ROOTFS_DIR=/crossrootfs/riscv64 -e DISABLE_CROSSGEN=1 \
mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-riscv64-net9.0 \
sh -c 'cd /dotnet && ./prep-source-build.sh && ./build.sh -sb --clean-while-building /p:TargetOS=linux /p:TargetArchitecture=riscv64 /p:Crossbuild=true'
- name: Upload .NET
uses: actions/upload-artifact@v4
with:
name: dotnet-sdk-linux-riscv64
path: "${{ github.workspace }}/dotnet/artifacts/assets/Release/dotnet-sdk-*"