Skip to content

Commit f1f18f6

Browse files
authored
Remove runner trimmed packages. (#3074)
1 parent ac39c4b commit f1f18f6

File tree

15 files changed

+5
-2450
lines changed

15 files changed

+5
-2450
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,6 @@ jobs:
5858
${{ matrix.devScript }} layout Release ${{ matrix.runtime }}
5959
working-directory: src
6060

61-
# Check runtime/externals hash
62-
- name: Compute/Compare runtime and externals Hash
63-
shell: bash
64-
run: |
65-
echo "Current dotnet runtime hash result: $DOTNET_RUNTIME_HASH"
66-
echo "Current Externals hash result: $EXTERNALS_HASH"
67-
68-
NeedUpdate=0
69-
if [ "$EXTERNALS_HASH" != "$(cat ./src/Misc/contentHash/externals/${{ matrix.runtime }})" ] ;then
70-
echo Hash mismatch, Update ./src/Misc/contentHash/externals/${{ matrix.runtime }} to $EXTERNALS_HASH
71-
NeedUpdate=1
72-
fi
73-
74-
if [ "$DOTNET_RUNTIME_HASH" != "$(cat ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }})" ] ;then
75-
echo Hash mismatch, Update ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }} to $DOTNET_RUNTIME_HASH
76-
NeedUpdate=1
77-
fi
78-
79-
exit $NeedUpdate
80-
env:
81-
DOTNET_RUNTIME_HASH: ${{hashFiles('**/_layout_trims/runtime/**/*')}}
82-
EXTERNALS_HASH: ${{hashFiles('**/_layout_trims/externals/**/*')}}
83-
8461
# Run tests
8562
- name: L0
8663
run: |
@@ -103,6 +80,3 @@ jobs:
10380
name: runner-package-${{ matrix.runtime }}
10481
path: |
10582
_package
106-
_package_trims/trim_externals
107-
_package_trims/trim_runtime
108-
_package_trims/trim_runtime_externals

.github/workflows/dotnet-upgrade.yml

Lines changed: 5 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -84,221 +84,20 @@ jobs:
8484
git commit -a -m "Upgrade dotnet sdk to v${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}"
8585
git push --set-upstream origin $branch_name
8686
87-
build-hashes:
88-
if: ${{ needs.dotnet-update.outputs.SHOULD_UPDATE == 1 && needs.dotnet-update.outputs.BRANCH_EXISTS == 0 }}
89-
needs: [dotnet-update]
90-
outputs:
91-
# pass outputs from this job to create-pr for use
92-
DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION: ${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
93-
DOTNET_CURRENT_MAJOR_MINOR_VERSION: ${{ needs.dotnet-update.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }}
94-
NEEDS_HASH_UPDATE: ${{ steps.compute-hash.outputs.NEED_UPDATE }}
95-
strategy:
96-
fail-fast: false
97-
matrix:
98-
runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, win-arm64, osx-x64, osx-arm64 ]
99-
include:
100-
- runtime: linux-x64
101-
os: ubuntu-latest
102-
devScript: ./dev.sh
103-
104-
- runtime: linux-arm64
105-
os: ubuntu-latest
106-
devScript: ./dev.sh
107-
108-
- runtime: linux-arm
109-
os: ubuntu-latest
110-
devScript: ./dev.sh
111-
112-
- runtime: osx-x64
113-
os: macOS-latest
114-
devScript: ./dev.sh
115-
116-
- runtime: osx-arm64
117-
os: macOS-latest
118-
devScript: ./dev.sh
119-
120-
- runtime: win-x64
121-
os: windows-2019
122-
devScript: ./dev
123-
124-
- runtime: win-arm64
125-
os: windows-latest
126-
devScript: ./dev
127-
128-
runs-on: ${{ matrix.os }}
129-
steps:
130-
- uses: actions/checkout@v3
131-
with:
132-
ref: feature/dotnetsdk-upgrade/${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
133-
134-
# Build runner layout
135-
- name: Build & Layout Release
136-
run: |
137-
${{ matrix.devScript }} layout Release ${{ matrix.runtime }}
138-
working-directory: src
139-
140-
# Check runtime/externals hash
141-
- name: Compute/Compare runtime and externals Hash
142-
id: compute-hash
143-
continue-on-error: true
144-
shell: bash
145-
run: |
146-
echo "Current dotnet runtime hash result: $DOTNET_RUNTIME_HASH"
147-
echo "Current Externals hash result: $EXTERNALS_HASH"
148-
149-
NeedUpdate=0
150-
if [ "$EXTERNALS_HASH" != "$(cat ./src/Misc/contentHash/externals/${{ matrix.runtime }})" ] ;then
151-
echo Hash mismatch, Update ./src/Misc/contentHash/externals/${{ matrix.runtime }} to $EXTERNALS_HASH
152-
153-
echo "EXTERNAL_HASH=$EXTERNALS_HASH" >> $GITHUB_OUTPUT
154-
NeedUpdate=1
155-
fi
156-
157-
if [ "$DOTNET_RUNTIME_HASH" != "$(cat ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }})" ] ;then
158-
echo Hash mismatch, Update ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }} to $DOTNET_RUNTIME_HASH
159-
160-
echo "DOTNET_RUNTIME_HASH=$DOTNET_RUNTIME_HASH" >> $GITHUB_OUTPUT
161-
NeedUpdate=1
162-
fi
163-
164-
echo "NEED_UPDATE=$NeedUpdate" >> $GITHUB_OUTPUT
165-
env:
166-
DOTNET_RUNTIME_HASH: ${{hashFiles('**/_layout_trims/runtime/**/*')}}
167-
EXTERNALS_HASH: ${{hashFiles('**/_layout_trims/externals/**/*')}}
168-
- name: update hash
169-
if: ${{ steps.compute-hash.outputs.NEED_UPDATE == 1 }}
170-
shell: bash
171-
run: |
172-
ExternalHash=${{ steps.compute-hash.outputs.EXTERNAL_HASH }}
173-
DotNetRuntimeHash=${{ steps.compute-hash.outputs.DOTNET_RUNTIME_HASH }}
174-
175-
if [ -n "$ExternalHash" ]; then
176-
echo "$ExternalHash" > ./src/Misc/contentHash/externals/${{ matrix.runtime }}
177-
fi
178-
179-
if [ -n "$DotNetRuntimeHash" ]; then
180-
echo "$DotNetRuntimeHash" > ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }}
181-
fi
182-
- name: cache updated hashes
183-
if: ${{ steps.compute-hash.outputs.NEED_UPDATE == 1 }}
184-
uses: actions/cache/save@v3
185-
with:
186-
enableCrossOsArchive: true
187-
path: |
188-
./src/Misc/contentHash/externals/${{ matrix.runtime }}
189-
./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }}
190-
key: compute-hashes-${{ matrix.runtime }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
191-
192-
193-
hash-update:
194-
needs: [build-hashes]
195-
if: ${{ needs.build-hashes.outputs.NEEDS_HASH_UPDATE == 1 }}
196-
outputs:
197-
# pass outputs from this job to create-pr for use
198-
DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION: ${{ needs.build-hashes.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
199-
DOTNET_CURRENT_MAJOR_MINOR_VERSION: ${{ needs.build-hashes.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }}
200-
runs-on: ubuntu-latest
201-
steps:
202-
- uses: actions/checkout@v3
203-
with:
204-
ref: feature/dotnetsdk-upgrade/${{ needs.build-hashes.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
205-
- name: Restore cached hashes - linux-x64
206-
id: cache-restore-linux-x64
207-
uses: actions/cache/restore@v3
208-
with:
209-
enableCrossOsArchive: true
210-
path: |
211-
./src/Misc/contentHash/externals/linux-x64
212-
./src/Misc/contentHash/dotnetRuntime/linux-x64
213-
key: compute-hashes-linux-x64-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
214-
- name: Restore cached hashes - linux-arm64
215-
id: cache-restore-linux-arm64
216-
uses: actions/cache/restore@v3
217-
with:
218-
enableCrossOsArchive: true
219-
path: |
220-
./src/Misc/contentHash/externals/linux-arm64
221-
./src/Misc/contentHash/dotnetRuntime/linux-arm64
222-
key: compute-hashes-linux-arm64-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
223-
- name: Restore cached hashes - linux-arm
224-
id: cache-restore-linux-arm
225-
uses: actions/cache/restore@v3
226-
with:
227-
enableCrossOsArchive: true
228-
path: |
229-
./src/Misc/contentHash/externals/linux-arm
230-
./src/Misc/contentHash/dotnetRuntime/linux-arm
231-
key: compute-hashes-linux-arm-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
232-
- name: Restore cached hashes - osx-x64
233-
id: cache-restore-osx-x64
234-
uses: actions/cache/restore@v3
235-
with:
236-
enableCrossOsArchive: true
237-
path: |
238-
./src/Misc/contentHash/externals/osx-x64
239-
./src/Misc/contentHash/dotnetRuntime/osx-x64
240-
key: compute-hashes-osx-x64-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
241-
- name: Restore cached hashes - osx-arm64
242-
id: cache-restore-osx-arm64
243-
uses: actions/cache/restore@v3
244-
with:
245-
enableCrossOsArchive: true
246-
path: |
247-
./src/Misc/contentHash/externals/osx-arm64
248-
./src/Misc/contentHash/dotnetRuntime/osx-arm64
249-
key: compute-hashes-osx-arm64-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
250-
- name: Restore cached hashes - win-x64
251-
id: cache-restore-win-x64
252-
uses: actions/cache/restore@v3
253-
with:
254-
enableCrossOsArchive: true
255-
path: |
256-
./src/Misc/contentHash/externals/win-x64
257-
./src/Misc/contentHash/dotnetRuntime/win-x64
258-
key: compute-hashes-win-x64-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
259-
- name: Restore cached hashes - win-arm64
260-
id: cache-restore-win-arm64
261-
uses: actions/cache/restore@v3
262-
with:
263-
enableCrossOsArchive: true
264-
path: |
265-
./src/Misc/contentHash/externals/win-arm64
266-
./src/Misc/contentHash/dotnetRuntime/win-arm64
267-
key: compute-hashes-win-arm64-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
268-
- name: Fetch cached computed hashes
269-
if: steps.cache-restore-linux-x64.outputs.cache-hit == 'true' ||
270-
steps.cache-restore-linux-arm64.outputs.cache-hit == 'true' ||
271-
steps.cache-restore-linux-arm.outputs.cache-hit == 'true' ||
272-
steps.cache-restore-win-x64.outputs.cache-hit == 'true' ||
273-
steps.cache-restore-win-arm64.outputs.cache-hit == 'true' ||
274-
steps.cache-restore-osx-x64.outputs.cache-hit == 'true' ||
275-
steps.cache-restore-osx-arm64.outputs.cache-hit == 'true'
276-
shell: bash
277-
run: |
278-
Environments=( "linux-x64" "linux-arm64" "linux-arm" "win-x64" "win-arm64" "osx-x64" "osx-arm64" )
279-
280-
git config --global user.name "github-actions[bot]"
281-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
282-
git commit -a -m "Update computed hashes"
283-
git push --set-upstream origin feature/dotnetsdk-upgrade/${{ needs.build-hashes.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
284-
28587
create-pr:
286-
needs: [hash-update]
287-
outputs:
288-
# pass outputs from this job to run-tests for use
289-
DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION: ${{ needs.hash-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
290-
DOTNET_CURRENT_MAJOR_MINOR_VERSION: ${{ needs.hash-update.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }}
88+
needs: [dotnet-update]
89+
if: ${{ needs.dotnet-update.outputs.SHOULD_UPDATE == 1 && needs.dotnet-update.outputs.BRANCH_EXISTS == 0 }}
29190
runs-on: ubuntu-latest
29291
steps:
29392
- uses: actions/checkout@v3
29493
with:
295-
ref: feature/dotnetsdk-upgrade/${{ needs.hash-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
94+
ref: feature/dotnetsdk-upgrade/${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}
29695
- name: Create Pull Request
29796
env:
29897
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29998
run: |
300-
gh pr create -B main -H feature/dotnetsdk-upgrade/${{ needs.hash-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }} --title "Update dotnet sdk to latest version @${{ needs.hash-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}" --body "
301-
https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${{ needs.hash-update.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }}/latest.version
99+
gh pr create -B main -H feature/dotnetsdk-upgrade/${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }} --title "Update dotnet sdk to latest version @${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}" --body "
100+
https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${{ needs.dotnet-update.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }}/latest.version
302101
303102
304103
---

0 commit comments

Comments
 (0)