name: Build and Test on: # Manual trigger workflow_dispatch: # Run CI for all pushes to main push: branches: ["main"] # Run CI for pull requests to all branches, but only if code changed pull_request: paths: - ".github/workflows/ci-*.yml" - "*.sln" - "*.props" - "Makefile" - "global.json" - "package.json" - "package-lock.json" - "src/**" - "tests/**" - "samples/**" - "docs/**" permissions: contents: read jobs: build: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] configuration: [Debug, Release] fail-fast: false runs-on: ${{ matrix.os }} steps: - name: ๐Ÿ“ฅ Clone the repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: ๐Ÿ”ง Set up .NET uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 with: dotnet-version: | 10.0.x 9.0.x - name: ๐Ÿ”ง Set up Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: '22' - name: ๐Ÿ“ฆ Install pinned npm dependencies for tests run: npm ci - name: ๐Ÿ—๏ธ Build run: make build CONFIGURATION=${{ matrix.configuration }} - name: ๐Ÿงช Test run: make test CONFIGURATION=${{ matrix.configuration }} - name: ๐Ÿงช AOT Compatibility if: matrix.configuration == 'Release' run: make test-aot CONFIGURATION=${{ matrix.configuration }} - name: ๐Ÿ“ฆ Pack if: matrix.configuration == 'Release' run: make pack CONFIGURATION=${{ matrix.configuration }} - name: ๐Ÿ“š Generate docs run: make generate-docs CONFIGURATION=${{ matrix.configuration }} - name: ๐Ÿ“ค Upload test results artifact if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: testresults-${{ matrix.os }}-${{ matrix.configuration }} path: artifacts/testresults/** publish-coverage: if: github.actor != 'dependabot[bot]' needs: build uses: ./.github/workflows/ci-code-coverage.yml secrets: inherit