Skip to content

Build 9.0.0 release #46

Build 9.0.0 release

Build 9.0.0 release #46

Workflow file for this run

name: Build .NET SDK
on: [workflow_dispatch, pull_request]
jobs:
run:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-riscv64
env:
PACKAGESDIR: ${{ github.workspace }}/packages
DOWNLOADDIR: ${{ github.workspace }}/downloads
OUTPUTDIR: ${{ github.workspace }}/output
RUNTIME_VERSION: 9.0.0-alpha.1.24061.26
SDK_VERSION: 9.0.100-alpha.1.24062.7
ASPNETCORE_VERSION: 9.0.0-alpha.1.24061.8
ROOTFS_DIR: /crossrootfs/riscv64
volumes:
- ${{ github.workspace }}/output:${{ github.workspace }}/output
steps:
- name: Clone repositories
run: |
git clone https://github.com/dotnet/runtime
git clone https://github.com/dotnet/aspnetcore
git clone https://github.com/dotnet/sdk
git clone https://github.com/dotnet/installer
- name: Update Node.js
run: |
apt-get update
apt-get autoremove -y nodejs
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
- name: Build runtime
run: |
mkdir -p ${PACKAGESDIR}
mkdir -p ${DOWNLOADDIR}
mkdir -p ${OUTPUTDIR}
cd runtime && git checkout 22ba7d607bb1d9caa0db9afcdc47eb5cef641fcb
sed -i 's|ppc64le|riscv64|' eng/Subsets.props
./build.sh -s host+libs+clr --ci -c Release --cross --arch riscv64 /p:Version=${RUNTIME_VERSION}
mkdir package && cd package
mkdir -p dotnet/host/fxr/9.0.0
cp ../artifacts/bin/linux-riscv64.Release/corehost/libhostfxr.so dotnet/host/fxr/9.0.0
cp -r ../artifacts/bin/testhost/net9.0-linux-Release-riscv64/shared .
tar -czvf dotnet-runtime-9.0.0-linux-riscv64.tar.gz *
cp dotnet-runtime-9.0.0-linux-riscv64.tar.gz ../artifacts/packages/Release/Shipping
cd ..
cp artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Host.linux-riscv64.*.nupkg ${PACKAGESDIR}
cp artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-riscv64.*.nupkg ${PACKAGESDIR}
mkdir -p ${DOWNLOADDIR}/Runtime/${RUNTIME_VERSION}
cp artifacts/packages/Release/Shipping/dotnet-runtime-*-linux-riscv64.tar.gz ${DOWNLOADDIR}/Runtime/${RUNTIME_VERSION}
cp artifacts/packages/Release/Shipping/dotnet-runtime-*-linux-riscv64.tar.gz ${OUTPUTDIR}
cp artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Host.linux-riscv64.*.nupkg ${OUTPUTDIR}
cp artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-riscv64.*.nupkg ${OUTPUTDIR}
cp artifacts/packages/Release/Shipping/runtime.linux-riscv64.Microsoft.NETCore.DotNetAppHost.*.nupkg ${OUTPUTDIR}
cp artifacts/packages/Release/Shipping/runtime.linux-riscv64.Microsoft.NETCore.ILAsm.*.nupkg ${OUTPUTDIR}
cp artifacts/packages/Release/Shipping/runtime.linux-riscv64.Microsoft.NETCore.ILDAsm.*.nupkg ${OUTPUTDIR}
cd .. && rm -r runtime
- name: Build SDK
run: |
cd sdk && git checkout 231e921dd53cb4f57acfae42b5984e4103d6b557
./build.sh --pack --ci -c Release /p:Architecture=riscv64
mkdir -p ${DOWNLOADDIR}/Sdk/${SDK_VERSION}
cp artifacts/packages/Release/NonShipping/dotnet-toolset-internal-*.zip ${DOWNLOADDIR}/Sdk/${SDK_VERSION}/dotnet-toolset-internal-${SDK_VERSION}.zip
cp artifacts/packages/Release/Shipping/Microsoft.DotNet.Common.*.nupkg ${PACKAGESDIR}
cd .. && rm -r sdk
- name: Build aspnetcore
run: |
cd aspnetcore && git checkout a19c70eba3f89c7cbe9447f029b4c63322f47846
git submodule init
git submodule update --recursive
sed -i "s|ppc64le|riscv64|" src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
sed -i "s|\$(BaseIntermediateOutputPath)\$(DotNetRuntimeArchiveFileName)|${DOWNLOADDIR}/Runtime/${RUNTIME_VERSION}/dotnet-runtime-${RUNTIME_VERSION}-linux-riscv64.tar.gz|" src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
./eng/build.sh --pack --ci -c Release -arch riscv64 /p:DotNetAssetRootUrl=file://${DOWNLOADDIR}/
cp artifacts/packages/Release/Shipping/Microsoft.AspNetCore.App.Runtime.linux-riscv64.*.nupkg ${PACKAGESDIR}
mkdir -p ${DOWNLOADDIR}/aspnetcore/Runtime/${ASPNETCORE_VERSION}
cp artifacts/installers/Release/aspnetcore-runtime-*-linux-riscv64.tar.gz ${DOWNLOADDIR}/aspnetcore/Runtime/${ASPNETCORE_VERSION}
cp artifacts/installers/Release/aspnetcore_base_runtime.version ${DOWNLOADDIR}/aspnetcore/Runtime/${ASPNETCORE_VERSION}
cp artifacts/packages/Release/Shipping/Microsoft.AspNetCore.App.Runtime.linux-riscv64.*.nupkg ${OUTPUTDIR}
cp artifacts/packages/Release/Shipping/Microsoft.DotNet.Web.*.nupkg ${PACKAGESDIR}
cd .. && rm -r aspnetcore
- name: Build installer
run: |
cd installer && git checkout 3ea0b6b9632340ead4036fbedee4597daac29a8d
cp ${DOWNLOADDIR}/aspnetcore/Runtime/${ASPNETCORE_VERSION}/aspnetcore-runtime-*-linux-riscv64.tar.gz ${DOWNLOADDIR}/aspnetcore/Runtime/${ASPNETCORE_VERSION}/aspnetcore-runtime-${ASPNETCORE_VERSION}-linux-riscv64.tar.gz
sed -i "s|linux-arm64|linux-riscv64|" src/redist/targets/GenerateBundledVersions.targets
sed -i "s|linux-arm64|linux-riscv64|" src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj
sed -i s'|ppc64le|riscv64|' Directory.Build.props
sed -i s'|ppc64le|riscv64|' src/SourceBuild/content/Directory.Build.props
sed -i s'|ppc64le|riscv64|' src/redist/targets/Crossgen.targets
sed -i s"|<clear />|<clear />\n<add key='local' value='${PACKAGESDIR}' />|" NuGet.config
./build.sh --ci -c Release -a riscv64 /p:HostRid=linux-x64 /p:PublicBaseURL=file://${DOWNLOADDIR}/
cp artifacts/packages/Release/Shipping/dotnet-sdk-*-linux-riscv64.tar.gz ${OUTPUTDIR}
cp artifacts/packages/Release/Shipping/dotnet-sdk-*-linux-riscv64.tar.gz.sha512 ${OUTPUTDIR}
- name: Upload .NET
uses: actions/upload-artifact@v4
with:
name: dotnet-sdk-linux-riscv64
path: "${{ github.workspace }}/output/dotnet-sdk-*-linux-riscv64.tar.gz*"