From bd5d24536d34db5834eafcd54b78e6fdccb5e318 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 11:49:44 +0200 Subject: [PATCH 01/16] Create build-linux.yml --- .github/actions/build-linux.yml | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/actions/build-linux.yml diff --git a/.github/actions/build-linux.yml b/.github/actions/build-linux.yml new file mode 100644 index 00000000000000..3092f5384a8083 --- /dev/null +++ b/.github/actions/build-linux.yml @@ -0,0 +1,52 @@ +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 }}) + run: ./build.sh -c ${{ inputs.build-configuration }} /p:VersionSuffix=${{ inputs.version-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/${{ 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 + 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-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 + 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 From d63846f1cff6d37a6cc9b88582e395d6c466d98c Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 11:55:11 +0200 Subject: [PATCH 02/16] Update build_and_release.yml --- .github/workflows/build_and_release.yml | 63 +++++++++++-------------- 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index fcfb5690dd8f66..b2d6bba1e0bda9 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -54,13 +54,9 @@ jobs: echo runtime-version=${RUNTIME_VERSION} >> $GITHUB_OUTPUT echo runtime-patch=${RUNTIME_PATCH} >> $GITHUB_OUTPUT - build-linux: + build-linux-debug: 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: @@ -68,36 +64,32 @@ jobs: 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.yml with: - name: linux-runtime - path: artifacts/packages/Release/Shipping/aspnetcore-runtime-${{env.RUNTIME_VERSION}}-${{env.RUNTIME_PATCH}}-linux-x64.tar.gz + 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-release: + 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.yml + 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: runs-on: windows-latest needs: env-variables @@ -121,7 +113,8 @@ jobs: RUNTIME_PATCH: ${{needs.env-variables.outputs.runtime-patch}} needs: - env-variables - - build-linux + - build-linux-debug + - build-linux-release - build-windows steps: - name: Download .Net runtime artifact From 00953008c268fc992b399e0955a513fbb59c8c64 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 12:47:05 +0200 Subject: [PATCH 03/16] Rename .github/actions/build-linux.yml to .github/actions/build-linux/action.yml --- .github/actions/{build-linux.yml => build-linux/action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/{build-linux.yml => build-linux/action.yml} (100%) diff --git a/.github/actions/build-linux.yml b/.github/actions/build-linux/action.yml similarity index 100% rename from .github/actions/build-linux.yml rename to .github/actions/build-linux/action.yml From 9a487780886d33900321392cf03b79197e5b5342 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 12:47:47 +0200 Subject: [PATCH 04/16] Update build_and_release.yml --- .github/workflows/build_and_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index b2d6bba1e0bda9..8931982637b984 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -65,7 +65,7 @@ jobs: with: ref: ${{env.CODE_VERSION}} - name: Build - uses: ./.github/actions/build-linux.yml + uses: ./.github/actions/build-linux with: version-runtime: ${{needs.env-variables.outputs.runtime-version}} version-patch: ${{needs.env-variables.outputs.runtime-patch}} @@ -82,7 +82,7 @@ jobs: with: ref: ${{env.CODE_VERSION}} - name: Build - uses: ./.github/actions/build-linux.yml + uses: ./.github/actions/build-linux with: version-runtime: ${{needs.env-variables.outputs.runtime-version}} version-patch: ${{needs.env-variables.outputs.runtime-patch}} From 67e3698aca5ec73961ed8ed08b4ae55c533cc646 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 12:50:51 +0200 Subject: [PATCH 05/16] Update action.yml --- .github/actions/build-linux/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-linux/action.yml b/.github/actions/build-linux/action.yml index 3092f5384a8083..e63c90302aa994 100644 --- a/.github/actions/build-linux/action.yml +++ b/.github/actions/build-linux/action.yml @@ -2,13 +2,13 @@ name: 'build-linux-runtime' description: 'Build Linux runtime' inputs: version-runtime: - description: 'Base version of the runtime (e.g. 8.0.10) + 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 + 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)' From 9e5844a86b741d9acb355235e780e71e67a304ad Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 13:20:22 +0200 Subject: [PATCH 06/16] Update action.yml --- .github/actions/build-linux/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-linux/action.yml b/.github/actions/build-linux/action.yml index e63c90302aa994..9972e95ef029c0 100644 --- a/.github/actions/build-linux/action.yml +++ b/.github/actions/build-linux/action.yml @@ -20,7 +20,7 @@ inputs: runs: using: "composite" steps: - - name: Build for Linux (${{ inputs.build-configuration }}) + - name: Build for Linux run: ./build.sh -c ${{ inputs.build-configuration }} /p:VersionSuffix=${{ inputs.version-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 From df13d762294665f88efa4a248ab2abca567fe95c Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 13:26:23 +0200 Subject: [PATCH 07/16] Update action.yml --- .github/actions/build-linux/action.yml | 60 +++++++++++++------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/actions/build-linux/action.yml b/.github/actions/build-linux/action.yml index 9972e95ef029c0..bbc460e662ff52 100644 --- a/.github/actions/build-linux/action.yml +++ b/.github/actions/build-linux/action.yml @@ -20,33 +20,33 @@ inputs: runs: using: "composite" steps: - - name: Build for Linux - run: ./build.sh -c ${{ inputs.build-configuration }} /p:VersionSuffix=${{ inputs.version-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/${{ 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 - 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-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 - 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 + - name: Build for Linux (${{ inputs.build-configuration }}) + run: ./build.sh -c ${{ inputs.build-configuration }} /p:VersionSuffix=${{ inputs.version-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/${{ 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 + 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-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 + 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 From ffd0cde3039629bf3f416313de3f4c5d7ba6ea9a Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 13:40:38 +0200 Subject: [PATCH 08/16] Update action.yml --- .github/actions/build-linux/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/build-linux/action.yml b/.github/actions/build-linux/action.yml index bbc460e662ff52..4392b8e0e2b289 100644 --- a/.github/actions/build-linux/action.yml +++ b/.github/actions/build-linux/action.yml @@ -21,15 +21,19 @@ 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 - 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 From 23bb5e4a1ea05cc51717c38cb095d87be3167342 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 15:14:00 +0200 Subject: [PATCH 09/16] Update build_and_release.yml --- .github/workflows/build_and_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 8931982637b984..3ec685b3252a1b 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -54,7 +54,7 @@ jobs: echo runtime-version=${RUNTIME_VERSION} >> $GITHUB_OUTPUT echo runtime-patch=${RUNTIME_PATCH} >> $GITHUB_OUTPUT - build-linux-debug: + build-linux-release: runs-on: ubuntu-latest needs: env-variables container: @@ -71,7 +71,7 @@ jobs: version-patch: ${{needs.env-variables.outputs.runtime-patch}} build-configuration: Release output-artifact-name: 'linux-runtime-release' - build-linux-release: + build-linux-linux: runs-on: ubuntu-latest needs: env-variables container: From ec2c9466f4bbe19f0aadd3c2c2281d4f0f22c680 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 15:30:34 +0200 Subject: [PATCH 10/16] Update build_and_release.yml --- .github/workflows/build_and_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 3ec685b3252a1b..d875d27e971481 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -54,7 +54,7 @@ jobs: echo runtime-version=${RUNTIME_VERSION} >> $GITHUB_OUTPUT echo runtime-patch=${RUNTIME_PATCH} >> $GITHUB_OUTPUT - build-linux-release: + build-linux-debug: runs-on: ubuntu-latest needs: env-variables container: From d68073520bf033788a90cf8cfec99e0c80e5c7d6 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 16:09:05 +0200 Subject: [PATCH 11/16] Update build_and_release.yml --- .github/workflows/build_and_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index d875d27e971481..30b27e86739dc5 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -54,7 +54,7 @@ jobs: echo runtime-version=${RUNTIME_VERSION} >> $GITHUB_OUTPUT echo runtime-patch=${RUNTIME_PATCH} >> $GITHUB_OUTPUT - build-linux-debug: + build-linux-release: runs-on: ubuntu-latest needs: env-variables container: @@ -71,7 +71,7 @@ jobs: version-patch: ${{needs.env-variables.outputs.runtime-patch}} build-configuration: Release output-artifact-name: 'linux-runtime-release' - build-linux-linux: + build-linux-debug: runs-on: ubuntu-latest needs: env-variables container: From b5790862e651efd83d9fdc5657ab9e66c5aed91a Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 16:51:42 +0200 Subject: [PATCH 12/16] Create action.yml --- .github/actions/build-windows/action.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/actions/build-windows/action.yml diff --git a/.github/actions/build-windows/action.yml b/.github/actions/build-windows/action.yml new file mode 100644 index 00000000000000..8c8e2041adbbba --- /dev/null +++ b/.github/actions/build-windows/action.yml @@ -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: 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/aspnetcore-runtime-${{ inputs.version-runtime }}-${{ inputs.version-patch }}-linux-x64.tar.gz From 066d5b39701ad71d3c30bc5ca4672d274efe5d29 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 16:54:48 +0200 Subject: [PATCH 13/16] Update build_and_release.yml --- .github/workflows/build_and_release.yml | 32 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 30b27e86739dc5..b9fff4438a7154 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -90,7 +90,7 @@ jobs: output-artifact-name: 'linux-runtime-debug' - build-windows: + build-windows-debug: runs-on: windows-latest needs: env-variables steps: @@ -98,13 +98,28 @@ jobs: 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' @@ -115,7 +130,8 @@ jobs: - env-variables - build-linux-debug - build-linux-release - - build-windows + - build-windows-debug + - build-windows-release steps: - name: Download .Net runtime artifact uses: actions/download-artifact@v4 From d320b1c1a1045a3735893efa822937b7a02c6aeb Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 16:56:20 +0200 Subject: [PATCH 14/16] Update action.yml --- .github/actions/build-windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-windows/action.yml b/.github/actions/build-windows/action.yml index 8c8e2041adbbba..91bc82f2813ec4 100644 --- a/.github/actions/build-windows/action.yml +++ b/.github/actions/build-windows/action.yml @@ -23,4 +23,4 @@ runs: 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 + path: artifacts/packages/${{ inputs.build-configuration }}/Shipping/dotnet-runtime-${{ inputs.version-runtime }}-${{ inputs.version-patch }}-win-x64.zip From ac21caed090090e823eb25d4dcc5622f6e349041 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Wed, 23 Oct 2024 17:06:04 +0200 Subject: [PATCH 15/16] Update action.yml --- .github/actions/build-windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-windows/action.yml b/.github/actions/build-windows/action.yml index 91bc82f2813ec4..85756fe88f4fbe 100644 --- a/.github/actions/build-windows/action.yml +++ b/.github/actions/build-windows/action.yml @@ -18,7 +18,7 @@ runs: steps: - name: Build for Windows (${{ inputs.build-configuration }}) shell: powershell - run: run: .\build.cmd -c ${{ inputs.build-configuration }} /p:VersionSuffix=${{ inputs.version-patch }} /p:StabilizePackageVersion=false /p:OfficialBuildId=20201010.1 /p:NativeOptimizationDataSupported=false + 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: From c6ae561b33630b0de022919df19ace589ca4dfc3 Mon Sep 17 00:00:00 2001 From: JP Durot Date: Tue, 12 Nov 2024 09:28:28 +0100 Subject: [PATCH 16/16] Update action.yml --- .github/actions/build-linux/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-linux/action.yml b/.github/actions/build-linux/action.yml index 4392b8e0e2b289..1a9c9e9fd1130e 100644 --- a/.github/actions/build-linux/action.yml +++ b/.github/actions/build-linux/action.yml @@ -22,7 +22,7 @@ runs: 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 + 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 @@ -42,10 +42,14 @@ runs: 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 + 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 .