Speed up methods in State
#1830
Workflow file for this run
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: Windows | |
| on: | |
| pull_request: | |
| push: | |
| branches: ['**'] | |
| tags-ignore: ['**'] # Don't trigger on tag pushes | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: 'x64' | |
| suffix: '' | |
| - arch: 'arm64' | |
| suffix: 'arm64' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install dependencies | |
| run: choco install re2c | |
| - name: Build ninja | |
| shell: bash | |
| run: | | |
| cmake -Bbuild -A ${{ matrix.arch }} -DCMAKE_COMPILE_WARNING_AS_ERROR=1 | |
| cmake --build build --parallel --config Debug | |
| cmake --build build --parallel --config Release | |
| - name: Test ninja (Debug) | |
| if: matrix.arch != 'arm64' | |
| run: .\ninja_test.exe | |
| working-directory: build/Debug | |
| - name: Test ninja (Release) | |
| if: matrix.arch != 'arm64' | |
| run: .\ninja_test.exe | |
| working-directory: build/Release | |
| - name: Create ninja archive | |
| shell: bash | |
| run: | | |
| mkdir artifact | |
| 7z a artifact/ninja-win${{ matrix.suffix }}.zip ./build/Release/ninja.exe | |
| # Upload ninja binary archive as an artifact | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ninja-binary-archives${{ matrix.suffix }} | |
| path: artifact | |
| - name: Upload release asset | |
| if: github.event.action == 'published' | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true # if release exists it will edit it. | |
| artifactContentType: "application/zip" # if empty defaults to raw | |
| replacesArtifacts: true # will update existing release assets if needed. | |
| omitBodyDuringUpdate: true # don't edit release body when published via webui | |
| artifacts: ./artifact/ninja-win${{ matrix.suffix }}.zip # release asset |