Repository navigation
Merge pull request #890 from OpenVicProject/add/consteval-string-view… #7932
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: 🖥️ Builds | |
| on: | |
| push: | |
| branches: ['master'] | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}|${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: {} | |
| jobs: | |
| static-checks-builds: | |
| name: 📊 Code style, file formatting, and docs | |
| runs-on: ubuntu-latest | |
| if: github.run_attempt > 1 || github.event_name == 'workflow_dispatch' || !vars.DISABLE_BUILDS | |
| outputs: | |
| changed-files: '"${{ steps.changed-files.outputs.clangd_all_changed_files }}"' # Wrap with quotes to bookend internal quote separators. | |
| sources-changed: ${{ steps.changed-files.outputs.sources_any_changed }} | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 # Treeless clone. Slightly less performant than a shallow clone, but makes finding diffs instantaneous. | |
| filter: tree:0 # See: https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/ | |
| persist-credentials: false | |
| - name: Install APT dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 | |
| with: | |
| packages: libxml2-utils | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 | |
| with: | |
| safe_output: false # Output passed to environment variable to avoid command injection. | |
| separator: '" "' # To account for paths with spaces, ensure our items are split by quotes internally. | |
| skip_initial_fetch: true | |
| files_yaml_from_source_file: .github/changed-files.yml | |
| - name: Style checks via prek | |
| if: steps.changed-files.outputs.pre-commit-config_any_changed != 'true' | |
| uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0 | |
| env: | |
| CHANGED_FILES: '"${{ steps.changed-files.outputs.pre-commit_all_changed_files }}"' # Wrap with quotes to bookend internal quote separators | |
| with: | |
| extra-args: --files ${{ env.CHANGED_FILES }} | |
| - name: Style checks via prek for all files | |
| if: steps.changed-files.outputs.pre-commit-config_any_changed == 'true' | |
| uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0 | |
| build-master: | |
| name: 🛠️ Build | |
| needs: static-checks-builds | |
| if: needs.static-checks-builds.outputs.sources-changed == 'true' || github.event_name != 'pull_request' | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/build-matrix.yml | |
| merge-library-files: | |
| name: 📚 Merge Library Files | |
| runs-on: ubuntu-latest | |
| needs: build-master | |
| steps: | |
| - name: Merge Artifacts | |
| uses: actions/upload-artifact/merge@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| delete-merged: true | |
| name: ${{ github.event.repository.name }}-library | |
| pattern: ${{ github.event.repository.name }}-*-library | |
| validate-master: | |
| name: ✅ Validate Success | |
| if: always() | |
| needs: [static-checks-builds, build-master, merge-library-files] | |
| runs-on: Ubuntu-latest | |
| steps: | |
| - name: Check | |
| uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 | |
| with: | |
| allowed-skips: static-checks-builds, build-master, merge-library-files | |
| jobs: ${{ toJson(needs) }} |