Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/actions/build-linux/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 'build-linux-runtime'
description: 'Build Linux runtime'
inputs:
version-runtime:
description: 'Base version of the runtime (e.g. 8.0.10)'
required: true
version-patch:
description: 'Patch version (like criteo1)'
required: true
build-configuration:
description: 'Configuration to build (Debug, Release) Note the capital letter'
required: true
output-artifact-name:
description: 'Name of the artifact that will be uploaded (to be retrieved later in the workflow)'
required: true
#outputs:
# random-number:
# description: "Random number"
# value: ${{ steps.random-number-generator.outputs.random-number }}
runs:
using: "composite"
steps:
- name: Build for Linux (${{ inputs.build-configuration }})
shell: bash
run: ./build.sh -c ${{ inputs.build-configuration }} /p:VersionSuffix=${{ inputs.version-patch }} /p:StabilizePackageVersion=false /p:OfficialBuildId=20201010.1 /p:NativeOptimizationDataSupported=false /p:SkipArchivesBuild=false
- name : Download dotnet install scripts
shell: bash
run: wget https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
- name: Retrieve official ASP.Net Core runtime
shell: bash
run: |
chmod u+x ./dotnet-install.sh
mkdir -p artifacts/packages/${{ inputs.build-configuration }}/Shipping/aspnetcore-runtime
./dotnet-install.sh --runtime aspnetcore --version ${{ inputs.version-runtime }} --os linux --install-dir artifacts/packages/${{ inputs.build-configuration }}/Shipping/aspnetcore-runtime
- name: Extract generated runtime artifact, add crossgen, symbols, and AspNetCore runtime
shell: bash
run: |
FULL_VERSION=${{ inputs.version-runtime }}-${{ inputs.version-patch }}
cd artifacts/packages/${{ inputs.build-configuration }}/Shipping
mkdir -p dotnet-runtime
cd dotnet-runtime
tar -xzvf ../dotnet-runtime-${FULL_VERSION}-linux-x64.tar.gz
cd shared/Microsoft.NETCore.App/${FULL_VERSION}
tar -xzvf ../../../../dotnet-crossgen2-${FULL_VERSION}-linux-x64.tar.gz
tar -xzvf ../../../../dotnet-runtime-symbols-linux-x64-${FULL_VERSION}.tar.gz
cd ../../../..
cp -R aspnetcore-runtime/shared/Microsoft.AspNetCore.App dotnet-runtime/shared/Microsoft.AspNetCore.App
mv dotnet-runtime/shared/Microsoft.AspNetCore.App/${{env.RUNTIME_VERSION}} dotnet-runtime/shared/Microsoft.AspNetCore.App/${FULL_VERSION}
dotnet tool install dotnet-symbol -g
cd dotnet-runtime/shared/Microsoft.AspNetCore.App/${FULL_VERSION}
dotnet-symbol --symbols *
cd ../../../..
sed -i "s/${{env.RUNTIME_VERSION}}/${FULL_VERSION}/g" dotnet-runtime/shared/Microsoft.AspNetCore.App/${FULL_VERSION}/Microsoft.AspNetCore.App.runtimeconfig.json
cd dotnet-runtime
tar -zcvf ../aspnetcore-runtime-${FULL_VERSION}-linux-x64.tar.gz .
- name: Upload runtime artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.output-artifact-name }}
path: artifacts/packages/${{ inputs.build-configuration }}/Shipping/aspnetcore-runtime-${{ inputs.version-runtime }}-${{ inputs.version-patch }}-linux-x64.tar.gz
26 changes: 26 additions & 0 deletions .github/actions/build-windows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'build-windows-runtime'
description: 'Build Windos runtime'
inputs:
version-runtime:
description: 'Base version of the runtime (e.g. 8.0.10)'
required: true
version-patch:
description: 'Patch version (like criteo1)'
required: true
build-configuration:
description: 'Configuration to build (Debug, Release) Note the capital letter'
required: true
output-artifact-name:
description: 'Name of the artifact that will be uploaded (to be retrieved later in the workflow)'
required: true
runs:
using: "composite"
steps:
- name: Build for Windows (${{ inputs.build-configuration }})
shell: powershell
run: .\build.cmd -c ${{ inputs.build-configuration }} /p:VersionSuffix=${{ inputs.version-patch }} /p:StabilizePackageVersion=false /p:OfficialBuildId=20201010.1 /p:NativeOptimizationDataSupported=false
- name: Upload runtime artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.output-artifact-name }}
path: artifacts/packages/${{ inputs.build-configuration }}/Shipping/dotnet-runtime-${{ inputs.version-runtime }}-${{ inputs.version-patch }}-win-x64.zip
95 changes: 52 additions & 43 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,65 +54,72 @@ jobs:

echo runtime-version=${RUNTIME_VERSION} >> $GITHUB_OUTPUT
echo runtime-patch=${RUNTIME_PATCH} >> $GITHUB_OUTPUT
build-linux:
build-linux-release:
runs-on: ubuntu-latest
needs: env-variables
env:
RUNTIME_VERSION: ${{needs.env-variables.outputs.runtime-version}}
RUNTIME_PATCH: ${{needs.env-variables.outputs.runtime-patch}}
CODE_VERSION: ${{needs.env-variables.outputs.code-version}}
container:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
steps:
- name: Check out runtime source code
uses: actions/checkout@v4
with:
ref: ${{env.CODE_VERSION}}
- name: Build for Linux
run: ./build.sh -c Release /p:VersionSuffix=${{env.RUNTIME_PATCH}} /p:StabilizePackageVersion=false /p:OfficialBuildId=20201010.1 /p:NativeOptimizationDataSupported=false
- name : Download dotnet install scripts
run: wget https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
- name: Retrieve official ASP.Net Core runtime
run: |
chmod u+x ./dotnet-install.sh
mkdir -p artifacts/packages/Release/Shipping/aspnetcore-runtime
./dotnet-install.sh --runtime aspnetcore --version ${{env.RUNTIME_VERSION}} --os linux --install-dir artifacts/packages/Release/Shipping/aspnetcore-runtime
- name: Extract generated runtime artifact, add crossgen, symbols, and AspNetCore runtime
run: |
FULL_VERSION=${{env.RUNTIME_VERSION}}-${{env.RUNTIME_PATCH}}
cd artifacts/packages/Release/Shipping
mkdir -p dotnet-runtime
cd dotnet-runtime
tar -xzvf ../dotnet-runtime-${FULL_VERSION}-linux-x64.tar.gz
cd shared/Microsoft.NETCore.App/${FULL_VERSION}
tar -xzvf ../../../../dotnet-crossgen2-${FULL_VERSION}-linux-x64.tar.gz
tar -xzvf ../../../../dotnet-nethost-symbols-linux-x64-${FULL_VERSION}.tar.gz
cd ../../../..
cp -R aspnetcore-runtime/shared/Microsoft.AspNetCore.App dotnet-runtime/shared/Microsoft.AspNetCore.App
mv dotnet-runtime/shared/Microsoft.AspNetCore.App/${{env.RUNTIME_VERSION}} dotnet-runtime/shared/Microsoft.AspNetCore.App/${FULL_VERSION}
sed -i "s/${{env.RUNTIME_VERSION}}/${FULL_VERSION}/g" dotnet-runtime/shared/Microsoft.AspNetCore.App/${FULL_VERSION}/Microsoft.AspNetCore.App.runtimeconfig.json
cd dotnet-runtime
tar -zcvf ../aspnetcore-runtime-${FULL_VERSION}-linux-x64.tar.gz .
- name: Upload runtime artifact
uses: actions/upload-artifact@v4
- name: Build
uses: ./.github/actions/build-linux
with:
name: linux-runtime
path: artifacts/packages/Release/Shipping/aspnetcore-runtime-${{env.RUNTIME_VERSION}}-${{env.RUNTIME_PATCH}}-linux-x64.tar.gz
build-windows:
version-runtime: ${{needs.env-variables.outputs.runtime-version}}
version-patch: ${{needs.env-variables.outputs.runtime-patch}}
build-configuration: Release
output-artifact-name: 'linux-runtime-release'
build-linux-debug:
runs-on: ubuntu-latest
needs: env-variables
container:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
steps:
- name: Check out runtime source code
uses: actions/checkout@v4
with:
ref: ${{env.CODE_VERSION}}
- name: Build
uses: ./.github/actions/build-linux
with:
version-runtime: ${{needs.env-variables.outputs.runtime-version}}
version-patch: ${{needs.env-variables.outputs.runtime-patch}}
build-configuration: Debug
output-artifact-name: 'linux-runtime-debug'


build-windows-debug:
runs-on: windows-latest
needs: env-variables
steps:
- name: Check out runtime source code
uses: actions/checkout@v4
with:
ref: ${{env.CODE_VERSION}}
- name: Build CLR for Windows
run: .\build.cmd clr -c Release /p:OfficialBuildId=20201010.1
- name: Upload mscordaccore artifact
uses: actions/upload-artifact@v4
- name: Build
uses: ./.github/actions/build-windows
with:
name: mscordaccore.dll
path: artifacts/bin/coreclr/Linux.x64.Release/x64/mscordaccore.dll
version-runtime: ${{needs.env-variables.outputs.runtime-version}}
version-patch: ${{needs.env-variables.outputs.runtime-patch}}
build-configuration: Debug
output-artifact-name: 'windows-runtime-debug'
build-windows-release:
runs-on: windows-latest
needs: env-variables
steps:
- name: Check out runtime source code
uses: actions/checkout@v4
with:
ref: ${{env.CODE_VERSION}}
- name: Build
uses: ./.github/actions/build-windows
with:
version-runtime: ${{needs.env-variables.outputs.runtime-version}}
version-patch: ${{needs.env-variables.outputs.runtime-patch}}
build-configuration: Release
output-artifact-name: 'windows-runtime-release'
package-and-release:
runs-on: ubuntu-latest
if: needs.env-variables.outputs.runtime-patch != 'dev'
Expand All @@ -121,8 +128,10 @@ jobs:
RUNTIME_PATCH: ${{needs.env-variables.outputs.runtime-patch}}
needs:
- env-variables
- build-linux
- build-windows
- build-linux-debug
- build-linux-release
- build-windows-debug
- build-windows-release
steps:
- name: Download .Net runtime artifact
uses: actions/download-artifact@v4
Expand Down