Skip to content

win2025

win2025 #277

Workflow file for this run

name: main
on:
push:
branches: [master]
paths: [src/**, tests/**, .github/workflows/main.yml]
workflow_dispatch:
env:
TEST_PROJECTS: "Sdcb.PaddleInference.Tests \
Sdcb.PaddleNLP.Lac.Tests \
Sdcb.PaddleOCR.Tests \
Sdcb.RotationDetector.Tests"
jobs:
build:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Setup NuGet Source
run: |
dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --name github --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet nuget list source
- name: Build code
run: dotnet build -c Debug -p:Optimize=true
- name: Create test artifacts
run: |
for proj in ${{ env.TEST_PROJECTS }}; do
echo "::group::Create artifacts for $proj"
mkdir -p test-artifacts/$proj
mv tests/$proj/bin/Debug/net10.0/* test-artifacts/$proj/
echo "::endgroup::"
done
- name: Compress test artifacts
run: |
7z a -t7z -mx=1 -ms=on -mmt=on test-artifacts.7z test-artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts
compression-level: 0
path: test-artifacts.7z
run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025,
ubuntu-22.04, ubuntu-24.04,
ubuntu-22.04-arm, ubuntu-24.04-arm,
macos-14, macos-15]
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: test-artifacts
- name: Extract test artifacts
shell: bash
run: |
7z x test-artifacts.7z
ls -lR test-artifacts
- name: Test
shell: bash
run: |
for proj in ${{ env.TEST_PROJECTS }}; do
echo "::group::Run $proj"
dotnet test --verbosity detailed ./test-artifacts/$proj/$proj.dll
echo "::endgroup::"
done