[Release 0.70.0] ~85% NumPy 2.x API coverage: 100+ new np.* APIs, new nuget packages (OpenBLAS & pythonnet), 3 living dashboards #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Docs | |
| on: | |
| push: | |
| branches: ["master", "main"] | |
| paths: | |
| - 'src/**' | |
| - 'coverage/**' | |
| - 'benchmark/**' | |
| - 'test/**' | |
| - 'docs/website-src/**' | |
| - '.github/workflows/docs.yml' | |
| pull_request: | |
| branches: ["master", "main"] | |
| paths: | |
| - 'src/**' | |
| - 'coverage/**' | |
| - 'benchmark/**' | |
| - 'test/**' | |
| - 'docs/website-src/**' | |
| - '.github/workflows/docs.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| api-coverage: | |
| name: NumPy API + Tests & Oracle inventories | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install pinned NumPy reference | |
| run: python -m pip install numpy==2.4.2 | |
| - name: Generate coverage artifact | |
| run: python coverage/generate_coverage.py --output artifacts/numpy-numsharp-coverage | |
| - name: Audit latest NumPy documentation links | |
| run: python coverage/audit_documentation.py artifacts/numpy-numsharp-coverage/coverage.json | |
| - name: Verify checked-in dashboard data | |
| run: diff --recursive --unified coverage/generated artifacts/numpy-numsharp-coverage | |
| - name: Generate Tests & Oracle inventory | |
| run: python test/inventory/generate_test_inventory.py --output artifacts/tests-oracle-inventory | |
| - name: Verify checked-in Tests & Oracle dashboard data | |
| run: diff --recursive --unified test/inventory/generated artifacts/tests-oracle-inventory | |
| - name: Verify benchmark API coverage artifact | |
| run: python benchmark/scripts/audit_coverage.py --check | |
| - name: Verify benchmark NumPy twin join keys | |
| run: | | |
| mkdir -p benchmark/results/smoke | |
| for suite in arithmetic unary reduction broadcast creation manipulation slicing comparison bitwise logic statistics sorting linalg selection fft random ndarray api; do | |
| python benchmark/NumSharp.Benchmark.Python/numpy_benchmark.py \ | |
| --suite "$suite" --quick --size small \ | |
| --output "benchmark/results/smoke/$suite.json" >/dev/null | |
| done | |
| python benchmark/scripts/check_smoke_joins.py | |
| - name: Execute every official C# benchmark body once | |
| run: dotnet run -c Release -f net8.0 --no-cache benchmark/scripts/smoke_benchmark_bodies.cs | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: numpy-numsharp-api-coverage | |
| path: artifacts/numpy-numsharp-coverage/ | |
| if-no-files-found: error | |
| retention-days: 14 | |
| - name: Upload Tests & Oracle inventory artifact | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: numsharp-tests-oracle-inventory | |
| path: artifacts/tests-oracle-inventory/ | |
| if-no-files-found: error | |
| retention-days: 14 | |
| build-and-deploy: | |
| needs: api-coverage | |
| if: github.event_name != 'pull_request' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use generated coverage artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: numpy-numsharp-api-coverage | |
| path: coverage/generated | |
| - name: Use generated Tests & Oracle inventory artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: numsharp-tests-oracle-inventory | |
| path: test/inventory/generated | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Install DocFX | |
| run: dotnet tool install -g docfx | |
| - name: Build docs | |
| run: docfx docs/website-src/docfx.json | |
| - name: Generate AI-friendly docs (llms.txt) | |
| run: | | |
| cd docs/website-src | |
| chmod +x scripts/generate-llms-txt.sh | |
| ./scripts/generate-llms-txt.sh ../website | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'docs/website' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |