Skip to content

Commit 48813ff

Browse files
committed
CI
1 parent 8b54448 commit 48813ff

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,13 @@ jobs:
155155
ls -la "$TEST_OUTPUT/runtimes/osx-arm64/native/"
156156
157157
- name: Run tests
158-
run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=TestResults.trx" --results-directory artifacts/test-results
158+
run: |
159+
dotnet test \
160+
--configuration Release \
161+
--no-build \
162+
--logger "trx;LogFileName=TestResults.trx" \
163+
--logger "console;verbosity=detailed" \
164+
--results-directory artifacts/test-results
159165
env:
160166
MLXSHARP_MODEL_PATH: ${{ github.workspace }}/models/Qwen1.5-0.5B-Chat-4bit
161167

@@ -240,6 +246,13 @@ jobs:
240246
name: test-results
241247
path: artifacts/test-results
242248

249+
- name: Publish test results
250+
if: always()
251+
uses: actions/upload-test-results@v1
252+
with:
253+
test-results: artifacts/test-results/TestResults.trx
254+
check-name: dotnet tests
255+
243256
release:
244257
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
245258
needs: package-test
@@ -249,6 +262,27 @@ jobs:
249262
steps:
250263
- name: Checkout repository
251264
uses: actions/checkout@v4
265+
with:
266+
fetch-depth: 0
267+
submodules: recursive
268+
269+
- name: Determine MLX version
270+
id: mlx_version
271+
run: |
272+
git submodule update --init --recursive
273+
git -C extern/mlx fetch --tags
274+
275+
if MLX_TAG=$(git -C extern/mlx describe --tags --abbrev=0 2>/dev/null); then
276+
echo "Detected MLX tag: ${MLX_TAG}"
277+
else
278+
echo "::warning::Unable to determine MLX tag; falling back to commit hash"
279+
MLX_TAG="unknown"
280+
fi
281+
282+
MLX_COMMIT=$(git -C extern/mlx rev-parse --short HEAD)
283+
284+
echo "tag=${MLX_TAG}" >> "$GITHUB_OUTPUT"
285+
echo "commit=${MLX_COMMIT}" >> "$GITHUB_OUTPUT"
252286
253287
- name: Extract version from Directory.Build.props
254288
id: version
@@ -297,6 +331,10 @@ jobs:
297331
- name: Generate release notes
298332
if: steps.check_tag.outputs.exists == 'false'
299333
id: release_notes
334+
env:
335+
RELEASE_VERSION: ${{ steps.version.outputs.version }}
336+
MLX_TAG: ${{ steps.mlx_version.outputs.tag }}
337+
MLX_COMMIT: ${{ steps.mlx_version.outputs.commit }}
300338
run: |
301339
PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1) 2>/dev/null || echo "")
302340
if [ -z "$PREVIOUS_TAG" ]; then
@@ -309,9 +347,13 @@ jobs:
309347
echo "" >> release_notes.md
310348
echo "$COMMITS" >> release_notes.md
311349
echo "" >> release_notes.md
350+
echo "## Upstream MLX" >> release_notes.md
351+
echo "- Version: ${MLX_TAG}" >> release_notes.md
352+
echo "- Commit: ${MLX_COMMIT}" >> release_notes.md
353+
echo "" >> release_notes.md
312354
echo "## NuGet Packages" >> release_notes.md
313-
echo "- [MLXSharp v${{ steps.version.outputs.version }}](https://www.nuget.org/packages/MLXSharp/${{ steps.version.outputs.version }})" >> release_notes.md
314-
echo "- [MLXSharp.SemanticKernel v${{ steps.version.outputs.version }}](https://www.nuget.org/packages/MLXSharp.SemanticKernel/${{ steps.version.outputs.version }})" >> release_notes.md
355+
echo "- [MLXSharp v${RELEASE_VERSION}](https://www.nuget.org/packages/MLXSharp/${RELEASE_VERSION})" >> release_notes.md
356+
echo "- [MLXSharp.SemanticKernel v${RELEASE_VERSION}](https://www.nuget.org/packages/MLXSharp.SemanticKernel/${RELEASE_VERSION})" >> release_notes.md
315357
316358
cat release_notes.md
317359

0 commit comments

Comments
 (0)