Skip to content

Commit 45a23fa

Browse files
alhad-deshpandeiii-i
authored andcommitted
Updated scripts to cross build without installer as .NET 9 Preview 5 SDK is delivered out of installer
Signed-off-by: Alhad Deshpande <[email protected]>
1 parent c6b6d47 commit 45a23fa

12 files changed

+80
-173
lines changed

.github/workflows/dotnet.yml

+12-58
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
local-downloads/
143143
local-packages/
144144
output/
145-
sdk:
145+
aspnetcore:
146146
needs: roslyn
147147
runs-on: ubuntu-latest
148148
strategy:
@@ -175,51 +175,6 @@ jobs:
175175
uses: actions/download-artifact@v3 # Newer versions are not compatible with Ubuntu 18.04
176176
with:
177177
name: roslyn-${{ matrix.arch }}
178-
- name: Prepare
179-
run: ./dotnet-prepare sdk
180-
- name: Build
181-
run: ARCH=${{ matrix.arch }} ./dotnet-build sdk
182-
- name: Upload the intermediate results
183-
uses: actions/upload-artifact@v3 # Newer versions are not compatible with Ubuntu 18.04
184-
with:
185-
name: sdk-${{ matrix.arch }}
186-
path: |
187-
local-downloads/
188-
local-packages/
189-
output/
190-
aspnetcore:
191-
needs: sdk
192-
runs-on: ubuntu-latest
193-
strategy:
194-
matrix:
195-
# TODO: aspnetcore build fails on x64 with:
196-
# EXEC : error : Failed to load assembly 'System.Private.CoreLib'
197-
arch: [ppc64le, s390x]
198-
isV6:
199-
- ${{ startsWith(github.ref, 'refs/tags/v6.') }}
200-
exclude:
201-
- arch: ppc64le
202-
isV6: true
203-
container:
204-
image: ghcr.io/ibm/dotnet-${{ matrix.arch }}-toolchain:latest
205-
credentials:
206-
username: ${{ github.actor }}
207-
password: ${{ secrets.GITHUB_TOKEN }}
208-
# Workaround for the following:
209-
# fatal: detected dubious ownership in repository at '/__w/dotnet-s390x/dotnet-s390x'
210-
options: --user root
211-
steps:
212-
- name: Configure git
213-
run: git config --global user.email [email protected] &&
214-
git config --global user.name "dotnet-s390x bot"
215-
- name: Checkout
216-
uses: actions/checkout@v1 # Newer versions are not compatible with Ubuntu 18.04
217-
- name: Fix the repository ownership
218-
run: chown -R "$(id -u):$(id -g)" .
219-
- name: Download the previous stage's artifacts
220-
uses: actions/download-artifact@v3 # Newer versions are not compatible with Ubuntu 18.04
221-
with:
222-
name: sdk-${{ matrix.arch }}
223178
- name: Prepare
224179
run: ./dotnet-prepare aspnetcore
225180
- name: Build
@@ -232,7 +187,7 @@ jobs:
232187
local-downloads/
233188
local-packages/
234189
output/
235-
installer:
190+
sdk:
236191
needs: aspnetcore
237192
runs-on: ubuntu-latest
238193
strategy:
@@ -266,20 +221,19 @@ jobs:
266221
with:
267222
name: aspnetcore-${{ matrix.arch }}
268223
- name: Prepare
269-
run: ./dotnet-prepare installer
224+
run: ./dotnet-prepare sdk
270225
- name: Build
271-
run: ARCH=${{ matrix.arch }} ./dotnet-build installer
226+
run: ARCH=${{ matrix.arch }} ./dotnet-build sdk
272227
- name: Upload the intermediate results
273228
uses: actions/upload-artifact@v3 # Newer versions are not compatible with Ubuntu 18.04
274229
with:
275-
name: installer-${{ matrix.arch }}
230+
name: sdk-${{ matrix.arch }}
276231
path: |
277-
# Use a dummy file to preserve the directory structure.
278-
# See https://github.com/actions/upload-artifact/issues/174 for details.
279-
dotnet-versions
232+
local-downloads/
233+
local-packages/
280234
output/
281235
release:
282-
needs: installer
236+
needs: sdk
283237
runs-on: ubuntu-latest
284238
strategy:
285239
matrix:
@@ -301,15 +255,15 @@ jobs:
301255
uses: actions/checkout@v1 # Newer versions are not compatible with Ubuntu 18.04
302256
- name: Fix the repository ownership
303257
run: chown -R "$(id -u):$(id -g)" .
304-
- name: Download the ppc64le installer artifacts
258+
- name: Download the ppc64le sdk artifacts
305259
uses: actions/download-artifact@v3 # Newer versions are not compatible with Ubuntu 18.04
306260
with:
307-
name: installer-ppc64le
261+
name: sdk-ppc64le
308262
if: ${{ !startsWith(github.ref, 'refs/tags/v6.') }}
309-
- name: Download the s390x installer artifacts
263+
- name: Download the s390x sdk artifacts
310264
uses: actions/download-artifact@v3 # Newer versions are not compatible with Ubuntu 18.04
311265
with:
312-
name: installer-s390x
266+
name: sdk-s390x
313267
- name: Create a release
314268
run: gh release create --notes "" "${{ github.ref_name }}" output/*
315269
env:

.github/workflows/dotnet.yml.j2

+4-10
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
{%- set arches = ['ppc64le', 's390x'] -%}
1919

20-
{%- set projects = ['runtime', 'msbuild', 'roslyn', 'sdk', 'aspnetcore', 'installer'] %}
20+
{%- set projects = ['runtime', 'msbuild', 'roslyn', 'aspnetcore', 'sdk'] %}
2121

2222
{%- set matrix -%}
2323
strategy:
@@ -79,18 +79,12 @@ jobs:
7979
with:
8080
name: {{ projects[i] }}-{% raw %}${{ matrix.arch }}{% endraw %}
8181
path: |
82-
{%- if projects[i] != 'installer' %}
8382
local-downloads/
8483
local-packages/
85-
{%- else %}
86-
# Use a dummy file to preserve the directory structure.
87-
# See https://github.com/actions/upload-artifact/issues/174 for details.
88-
dotnet-versions
89-
{%- endif %}
9084
output/
9185
{%- endfor %}
9286
release:
93-
needs: installer
87+
needs: sdk
9488
runs-on: ubuntu-latest
9589
strategy:
9690
matrix:
@@ -100,10 +94,10 @@ jobs:
10094
steps:
10195
{{ checkout_steps }}
10296
{%- for arch in arches %}
103-
- name: Download the {{ arch }} installer artifacts
97+
- name: Download the {{ arch }} sdk artifacts
10498
uses: actions/download-artifact@v3 # Newer versions are not compatible with Ubuntu 18.04
10599
with:
106-
name: installer-{{ arch }}
100+
name: sdk-{{ arch }}
107101
{%- if arch == 'ppc64le' %}
108102
if: {% raw %}${{ !startsWith(github.ref, 'refs/tags/v6.') }}{% endraw %}
109103
{%- endif %}

aspnetcore

Submodule aspnetcore updated 470 files

dotnet-build

+11-38
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runtime_flavor=Mono
3030
msbuild_conf=Release
3131
roslyn_conf=Release
3232
aspnetcore_conf=Release
33-
installer_conf=Release
33+
sdk_conf=Release
3434

3535
function build_runtime {
3636
runtime_build_flags=(
@@ -167,13 +167,21 @@ function build_sdk {
167167
--pack
168168
--configuration "$SDK_CONF"
169169
"/p:Architecture=$ARCH"
170+
"/p:HostRid=linux-x64"
171+
"/p:BundleRuntimePacks=true"
172+
"/p:PublicBaseURL=file://$DOWNLOADDIR/"
173+
"/p:CoreSetupBlobRootUrl=file://$DOWNLOADDIR/"
174+
"/p:DotnetToolsetBlobRootUrl=file://$DOWNLOADDIR/"
170175
)
171176
if [ "$sdk_build_id" != "" ]; then
172177
sdk_build_flags+=(
173178
"/p:ContinuousIntegrationBuild=true"
174179
"/p:OfficialBuildId=$sdk_build_id"
175180
)
176181
fi
182+
if [ "$runtime_flavor" = Mono ]; then
183+
sdk_build_flags+=("/p:DISABLE_CROSSGEN=true")
184+
fi
177185
if [ "$sdk_version_suffix" != "" ]; then
178186
SDK_VERSION=$SDK_VERSION-$sdk_version_suffix
179187
fi
@@ -184,6 +192,7 @@ function build_sdk {
184192
if [ -z ${SKIP_PACKAGE_SDK+x} ] && [ ! -e .skip-package ]; then
185193
mkdir -p "$DOWNLOADDIR/Sdk/$SDK_VERSION"
186194
cp "artifacts/packages/Release/NonShipping/dotnet-toolset-internal-$SDK_VERSION.zip" "$DOWNLOADDIR/Sdk/$SDK_VERSION"
195+
cp "artifacts/packages/$sdk_conf/Shipping/dotnet-sdk-$SDK_VERSION-linux-$ARCH.tar.gz" "$OUTPUTDIR"
187196
fi
188197
popd
189198
}
@@ -253,46 +262,10 @@ function build_aspnetcore {
253262
popd
254263
}
255264

256-
function build_installer {
257-
INSTALLER_VERSION=$installer_version_prefix
258-
installer_build_flags=(
259-
--ci
260-
--configuration "$installer_conf"
261-
"/p:HostRid=linux-x64"
262-
"/p:Architecture=$ARCH"
263-
"/p:BundleRuntimePacks=true"
264-
"/p:PublicBaseURL=file://$DOWNLOADDIR/"
265-
"/p:CoreSetupBlobRootUrl=file://$DOWNLOADDIR/"
266-
"/p:DotnetToolsetBlobRootUrl=file://$DOWNLOADDIR/"
267-
)
268-
if [ "$installer_build_id" != "" ]; then
269-
installer_build_flags+=(
270-
"/p:ContinuousIntegrationBuild=true"
271-
"/p:OfficialBuildId=$installer_build_id"
272-
)
273-
fi
274-
if [ "$runtime_flavor" = Mono ]; then
275-
installer_build_flags+=("/p:DISABLE_CROSSGEN=true")
276-
fi
277-
if [ "$installer_version_suffix" != "" ]; then
278-
INSTALLER_VERSION=$INSTALLER_VERSION-$installer_version_suffix
279-
fi
280-
pushd installer
281-
if [ -z ${SKIP_BUILD_INSTALLER+x} ] && [ ! -e .skip-build ]; then
282-
rm -rf artifacts
283-
# Setting HostRid to linux- instead of ubuntu- avoids requiring Debian installer packages
284-
./build.sh "${installer_build_flags[@]}"
285-
fi
286-
if [ -z ${SKIP_PACKAGE_INSTALLER+x} ] && [ ! -e .skip-package ]; then
287-
cp "artifacts/packages/$installer_conf/Shipping/dotnet-sdk-$INSTALLER_VERSION-linux-$ARCH.tar.gz" "$OUTPUTDIR"
288-
fi
289-
popd
290-
}
291-
292265
if [ "$#" -gt 0 ]; then
293266
projects=("$@")
294267
else
295-
projects=(runtime msbuild roslyn sdk aspnetcore installer)
268+
projects=(runtime msbuild roslyn aspnetcore sdk)
296269
fi
297270

298271
for project in "${projects[@]}"; do

dotnet-bump

+20-20
Original file line numberDiff line numberDiff line change
@@ -62,41 +62,41 @@ while [ $# -gt 0 ]; do
6262
shift
6363
done
6464
if [ $# -gt 0 ]; then
65-
installer_version=$1
65+
sdk_version=$1
6666
shift
6767
fi
6868
git submodule update --init --recursive
69-
cd installer
70-
if [[ -z ${installer_version+x} ]]; then
69+
cd sdk
70+
if [[ -z ${sdk_version+x} ]]; then
7171
url=https://aka.ms/dotnet/$platform/daily/productCommit-linux-x64.txt
7272
else
73-
url=https://dotnetbuilds.azureedge.net/public/Sdk/$installer_version/productCommit-linux-x64.txt
73+
url=https://dotnetbuilds.azureedge.net/public/Sdk/$sdk_version/productCommit-linux-x64.txt
7474
fi
7575
manifest=$(curl -L "$url")
7676
# installer:e0c95ad21e5eac311e454c65335008161b3e4763, 7.0.103
7777
# installer_commit="c8d103ed3c46cca9bb78098da723037e2be73bce" installer_version="8.0.100-alpha.1.23061.8"
78-
if [[ "$manifest" =~ installer:([0-9a-f]+),\ ([^[:space:]]+) ]] ||
79-
[[ "$manifest" =~ installer_commit=\"([0-9a-f]+)\"\ installer_version=\"([^\"]+)\" ]]; then
80-
installer_sha=${BASH_REMATCH[1]}
81-
installer_version=${BASH_REMATCH[2]}
78+
if [[ "$manifest" =~ sdk:([0-9a-f]+),\ ([^[:space:]]+) ]] ||
79+
[[ "$manifest" =~ sdk_commit=\"([0-9a-f]+)\"\ sdk_version=\"([^\"]+)\" ]]; then
80+
sdk_sha=${BASH_REMATCH[1]}
81+
sdk_version=${BASH_REMATCH[2]}
8282
git fetch --tags
83-
git checkout --force "$installer_sha"
83+
git checkout --force "$sdk_sha"
8484
else
8585
git fetch --tags
86-
git checkout --force "v$installer_version"
86+
git checkout --force "v$sdk_version"
8787
fi
8888
repos=(
89-
runtime:installer:Microsoft.NETCore.App.Ref:true
90-
msbuild:installer:Microsoft.Build:true
91-
roslyn:installer:Microsoft.Net.Compilers.Toolset:true
92-
sdk:installer:Microsoft.NET.Sdk:true
93-
aspnetcore:installer:Microsoft.AspNetCore.App.Ref:true
94-
aspnetcore_internal:installer:Microsoft.AspNetCore.App.Ref.Internal:false
89+
runtime:sdk:Microsoft.NETCore.App.Ref:true
90+
msbuild:sdk:Microsoft.Build:true
91+
roslyn:sdk:Microsoft.Net.Compilers.Toolset:true
92+
#sdk:sdk:Microsoft.NET.Sdk:true
93+
aspnetcore:sdk:Microsoft.AspNetCore.App.Ref:true
94+
aspnetcore_internal:sdk:Microsoft.AspNetCore.App.Ref.Internal:false
9595
templating:sdk:Microsoft.TemplateEngine.Abstractions:true
9696
)
9797
cd ..
98-
echo_version installer "$installer_version" >dotnet-versions
99-
git add installer
98+
echo_version sdk "$sdk_version" >dotnet-versions
99+
git add sdk
100100
for repo in "${repos[@]}"; do
101101
IFS=: read -r -a path_name <<<"$repo"
102102
xpath="string(/Dependencies/ProductDependencies/Dependency[@Name=\"${path_name[2]}\"]/@Version)"
@@ -131,5 +131,5 @@ done
131131
} >>dotnet-versions
132132

133133
git add dotnet-versions
134-
git commit --allow-empty --message="v$installer_version" --signoff
135-
git tag "v$installer_version"
134+
git commit --allow-empty --message="v$sdk_version" --signoff
135+
git tag "v$sdk_version"

dotnet-prepare

+1-9
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,10 @@ function prepare_aspnetcore {
164164
popd
165165
}
166166

167-
function prepare_installer {
168-
pushd installer
169-
update_nuget_config
170-
# https://github.com/dotnet/installer/pull/14173
171-
backport "" 5501c7f23811
172-
popd
173-
}
174-
175167
if [ "$#" -gt 0 ]; then
176168
projects=("$@")
177169
else
178-
projects=(runtime msbuild roslyn sdk aspnetcore installer)
170+
projects=(runtime msbuild roslyn sdk aspnetcore)
179171
fi
180172

181173
git submodule update --init --recursive -- "${projects[@]}"

0 commit comments

Comments
 (0)