Skip to content

Commit 876c75f

Browse files
radicalCopilot
andauthored
[CI] Build Cli native archives on GH runs (#10741)
* [CI] Build Cli native archives on GH runs * Retain the cli archives for 15 days * retain built-nugets for 15 days * Update .github/workflows/tests.yml Co-authored-by: Copilot <[email protected]> * address review feedback --------- Co-authored-by: Copilot <[email protected]>
1 parent 547c9aa commit 876c75f

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/tests.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,70 @@ jobs:
7272
includeIntegrations: true
7373
includeTemplates: true
7474

75+
# Build CLI native archives
76+
build_cli_archives:
77+
name: Build CLI (${{ matrix.targets.os }})
78+
runs-on: ${{ matrix.targets.os }}
79+
strategy:
80+
matrix:
81+
targets:
82+
- os: ubuntu-latest
83+
rids: linux-x64
84+
- os: windows-latest
85+
rids: win-x64
86+
- os: macos-latest
87+
rids: osx-arm64
88+
89+
steps:
90+
- name: Checkout code
91+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
92+
93+
- name: Build CLI packages (Windows)
94+
env:
95+
CI: false
96+
if: ${{ matrix.targets.os == 'windows-latest' }}
97+
shell: pwsh
98+
run: >
99+
.\build.cmd
100+
-ci
101+
-build
102+
-restore
103+
/bl:${{ github.workspace }}/artifacts/log/Debug/BuildCli.binlog
104+
/p:ContinuousIntegrationBuild=true
105+
/p:SkipManagedBuild=true
106+
/p:TargetRids=${{ matrix.targets.rids }}
107+
108+
- name: Build CLI packages (Unix)
109+
env:
110+
CI: false
111+
if: ${{ matrix.targets.os != 'windows-latest' }}
112+
shell: bash
113+
run: >
114+
./build.sh
115+
--ci
116+
--build
117+
--restore
118+
/bl:${{ github.workspace }}/artifacts/log/Debug/BuildCli.binlog
119+
/p:ContinuousIntegrationBuild=true
120+
/p:SkipManagedBuild=true
121+
/p:TargetRids=${{ matrix.targets.rids }}
122+
123+
- name: Upload logs
124+
if: always()
125+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
126+
with:
127+
name: cli-native-logs-${{ matrix.targets.rids }}
128+
path: artifacts/log/**
129+
130+
- name: Upload CLI archives
131+
if: always()
132+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
133+
with:
134+
name: cli-native-archives-${{ matrix.targets.rids }}
135+
path: artifacts/packages/**/aspire-cli*
136+
retention-days: 15
137+
if-no-files-found: error
138+
75139
build_packages:
76140
name: Build packages
77141
if: ${{ github.repository_owner == 'dotnet' }}
@@ -90,6 +154,7 @@ jobs:
90154
with:
91155
name: built-nugets
92156
path: artifacts/packages
157+
retention-days: 15
93158

94159
- name: Upload logs
95160
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
@@ -229,6 +294,7 @@ jobs:
229294
runs-on: ubuntu-latest
230295
name: Final Results
231296
needs: [
297+
build_cli_archives,
232298
endtoend_tests,
233299
extension_tests_win,
234300
integrations_test_lin,

0 commit comments

Comments
 (0)