From a4ea43a0bd5deede1deb5bd3d717bbd569ac47c6 Mon Sep 17 00:00:00 2001 From: Lin Tianshu <54425948+oxygen-dioxide@users.noreply.github.com> Date: Sun, 30 Nov 2025 08:43:34 +0800 Subject: [PATCH 1/5] Add GitHub Actions workflow for PR testing --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..a1d5508f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +on: + pull_request: {} + workflow_dispatch: {} + +jobs: + pr-test: + runs-on: ${{ matrix.os.runs-on }} + + strategy: + fail-fast: false + matrix: + os: + - runs-on: windows-latest + arch: win-x64 + - runs-on: windows-11-arm + arch: win-arm64 + - runs-on: macos-13 + arch: osx-x64 + - runs-on: macos-15 + arch: osx-arm64 + - runs-on: ubuntu-latest + arch: linux-x64 + - runs-on: ubuntu-24.04-arm + arch: linux-arm64 + + steps: + - uses: actions/checkout@v1 + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.0.x + 8.0.x + + - name: restore + run: dotnet restore + + - name: test + run: dotnet test From b643bda15b06e71c5822bee6ba5725462f506b5c Mon Sep 17 00:00:00 2001 From: Lin Tianshu <54425948+oxygen-dioxide@users.noreply.github.com> Date: Sun, 30 Nov 2025 08:50:04 +0800 Subject: [PATCH 2/5] Fix project paths to use lowercase 'examples' --- SciSharp.NumSharp.sln | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SciSharp.NumSharp.sln b/SciSharp.NumSharp.sln index fb5e466a..60be7fc4 100644 --- a/SciSharp.NumSharp.sln +++ b/SciSharp.NumSharp.sln @@ -9,9 +9,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NumSharp.Benchmark", "test\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NumSharp.Core", "src\NumSharp.Core\NumSharp.Core.csproj", "{190A2514-31CD-4738-AF20-3492DD47DE8C}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{FB0CB349-D4C7-4C09-BCC5-679F2ABEC6B4}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "examples", "{FB0CB349-D4C7-4C09-BCC5-679F2ABEC6B4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NeuralNetwork.NumSharp", "Examples\NeuralNetwork.NumSharp\NeuralNetwork.NumSharp.csproj", "{B9253A77-0652-4091-A7F5-14E9FE2630FF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NeuralNetwork.NumSharp", "examples\NeuralNetwork.NumSharp\NeuralNetwork.NumSharp.csproj", "{B9253A77-0652-4091-A7F5-14E9FE2630FF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NumSharp.Bitmap", "src\NumSharp.Bitmap\NumSharp.Bitmap.csproj", "{16C45DA5-D006-4229-B457-4F5E36D5DC55}" EndProject From 68b6f886940a1f1112f0977fa5e2acc9190ef17c Mon Sep 17 00:00:00 2001 From: Lin Tianshu <54425948+oxygen-dioxide@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:22:22 +0800 Subject: [PATCH 3/5] Update .github/workflows/test.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1d5508f..14ce98e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: arch: linux-arm64 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: From 07718b35148170208b7614f086bbbdd5c9240b5c Mon Sep 17 00:00:00 2001 From: Lin Tianshu <54425948+oxygen-dioxide@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:24:20 +0800 Subject: [PATCH 4/5] Add name --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 14ce98e5..4051ddac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,3 +1,4 @@ +name: PR Tests on: pull_request: {} workflow_dispatch: {} From 6817c364ae2e6ec0fee6586ac847a5869cad0f00 Mon Sep 17 00:00:00 2001 From: Lin Tianshu <54425948+oxygen-dioxide@users.noreply.github.com> Date: Tue, 2 Dec 2025 19:34:36 +0800 Subject: [PATCH 5/5] Add build step to GitHub Actions workflow --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4051ddac..64d4683b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,5 +36,8 @@ jobs: - name: restore run: dotnet restore + - name: build + run: dotnet build + - name: test run: dotnet test