|
| 1 | +# For documentation on the github environment, see |
| 2 | +# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners |
| 3 | +# |
| 4 | +# For documentation on the syntax of this file, see |
| 5 | +# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions |
| 6 | +--- |
| 7 | +name: CPP CI |
| 8 | + |
| 9 | +on: |
| 10 | + pull_request: |
| 11 | + |
| 12 | +concurrency: |
| 13 | + # Cancel any CI/CD workflow currently in progress for the same PR. |
| 14 | + # Allow running concurrently with any other commits. |
| 15 | + group: build-${{ github.event.pull_request.number || github.sha }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | + |
| 21 | +jobs: |
| 22 | + build_windows: |
| 23 | + permissions: |
| 24 | + actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs |
| 25 | + contents: read # for actions/checkout to fetch code |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + configurations: [Debug, Release] |
| 29 | + runs-on: windows-latest |
| 30 | + env: |
| 31 | + # Configuration type to build. For documentation on how build matrices work, see |
| 32 | + # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 33 | + BUILD_CONFIGURATION: ${{matrix.configurations}} |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Harden Runner |
| 37 | + uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 |
| 38 | + with: |
| 39 | + egress-policy: audit |
| 40 | + |
| 41 | + - id: skip_check |
| 42 | + uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1 |
| 43 | + with: |
| 44 | + cancel_others: 'false' |
| 45 | + paths_ignore: '["**.md"]' |
| 46 | + |
| 47 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 48 | + if: steps.skip_check.outputs.should_skip != 'true' |
| 49 | + with: |
| 50 | + submodules: 'recursive' |
| 51 | + |
| 52 | + - name: Build |
| 53 | + if: steps.skip_check.outputs.should_skip != 'true' |
| 54 | + run: | |
| 55 | + dotnet build OrcaHelloProxy.sln /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform="Any CPU" |
0 commit comments