Skip to content

Commit d50863e

Browse files
prathikrPrathik Rao
andauthored
[sdk_v2] upload flcore logs to github artifacts for easier debugging (#425)
* upload logs * format * c# too --------- Co-authored-by: Prathik Rao <prathikrao@microsoft.com>
1 parent 5d1d140 commit d50863e

4 files changed

Lines changed: 19 additions & 5 deletions

File tree

.github/workflows/build-cs-steps.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,13 @@ jobs:
121121
- name: Upload NuGet packages
122122
uses: actions/upload-artifact@v4
123123
with:
124-
name: cs-sdk-${{ inputs.platform }}${{ inputs.useWinML == true && '-winml' }}
124+
name: cs-sdk-${{ inputs.platform }}${{ inputs.useWinML == true && '-winml' || '' }}
125125
path: |
126126
sdk_v2/cs/bin/*.nupkg
127-
sdk_v2/cs/bin/*.snupkg
127+
sdk_v2/cs/bin/*.snupkg
128+
129+
- name: Upload flcore logs
130+
uses: actions/upload-artifact@v4
131+
with:
132+
name: cs-sdk-${{ inputs.platform }}${{ inputs.useWinML == true && '-winml' || '' }}-logs
133+
path: sdk_v2/cs/logs/**

.github/workflows/build-js-steps.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,11 @@ jobs:
131131
- name: Upload npm packages
132132
uses: actions/upload-artifact@v4
133133
with:
134-
name: js-sdk-${{ inputs.platform }}${{ inputs.useWinML == true && '-winml' }}
134+
name: js-sdk-${{ inputs.platform }}${{ inputs.useWinML == true && '-winml' || '' }}
135135
path: sdk_v2/js/*.tgz
136+
137+
- name: Upload flcore logs
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: js-sdk-${{ inputs.platform }}${{ inputs.useWinML == true && '-winml' || '' }}-logs
141+
path: sdk_v2/js/logs/**

sdk_v2/cs/test/FoundryLocal.Tests/Utils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public static void AssemblyInit(AssemblyHookContext _)
8686
{
8787
Urls = "http://127.0.0.1:0"
8888
},
89-
ModelCacheDir = testDataSharedPath
89+
ModelCacheDir = testDataSharedPath,
90+
LogsDir = Path.Combine(GetRepoRoot(), "sdk_v2", "cs", "logs")
9091
};
9192

9293
// Initialize the singleton instance.

sdk_v2/js/test/testUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export const IS_RUNNING_IN_CI = isRunningInCI();
3333
export const TEST_CONFIG: FoundryLocalConfig = {
3434
appName: 'FoundryLocalTest',
3535
modelCacheDir: getTestDataSharedPath(),
36-
logLevel: 'warn'
36+
logLevel: 'warn',
37+
logsDir: path.join(getGitRepoRoot(), 'sdk_v2', 'js', 'logs')
3738
};
3839

3940
export const TEST_MODEL_ALIAS = 'qwen2.5-0.5b';

0 commit comments

Comments
 (0)