Merge pull request #2 from actions-ext/tkp/dependabot-composite-actions #6
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: Build Status | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: ./setup | |
| - uses: ./setup-vcpkg-cache | |
| id: vcpkg-cache | |
| with: | |
| manifest: tests/vcpkg.json | |
| overlay_ports: tests/vcpkg-overlays | |
| - name: Verify vcpkg cache | |
| run: | | |
| test -n "${{ steps.vcpkg-cache.outputs.vcpkg-revision }}" | |
| test -d "$VCPKG_DEFAULT_BINARY_CACHE" | |
| git -C vcpkg rev-parse --verify HEAD | |
| shell: bash | |
| - name: Verify tools (Linux / macOS) | |
| run: | | |
| clang-format --dry-run --Werror tests/hello.cpp | |
| ccache c++ tests/hello.cpp -o hello | |
| ./hello | |
| ccache --show-stats | |
| shell: bash | |
| if: runner.os != 'Windows' | |
| - name: Verify tools (Windows) | |
| run: | | |
| if not "%CC%"=="sccache cl" exit /b 1 | |
| where cl | |
| where sccache | |
| clang-format --dry-run --Werror tests\hello.cpp | |
| sccache cl /nologo /EHsc tests\hello.cpp /Fe:hello.exe | |
| hello.exe | |
| sccache --show-stats | |
| shell: cmd | |
| if: runner.os == 'Windows' |