- Remove usages of the non-existent `ignore-forks` field, conditions in jobs already exist to prevent the jobs from running in forks. - Don't use variables in the `printf` format string. Use `printf "..%s.." "$foo"`. ([SC2059](https://www.shellcheck.net/wiki/SC2059)) - Double quote variable expansion to prevent globbing and word splitting. ([SC2086](https://www.shellcheck.net/wiki/SC2086)) - Prefer `[ p ] || [ q ]` as `[ p -o q ]` is not well defined. ([SC2166](https://www.shellcheck.net/wiki/SC2166)) - Consider `{ cmd1; cmd2; } >> file` instead of individual redirects. ([SC2129](https://www.shellcheck.net/wiki/SC2129)) - Use `$(...)` notation instead of legacy notation `...`. ([SC2006](https://www.shellcheck.net/wiki/SC2006)) - Use `./*glob*` or `-- *glob*` so names with dashes won't become options. ([SC2035](https://www.shellcheck.net/wiki/SC2035)) - Refactor JavaScript code in certain workflows. - Change workflow variable substitution style of some workflows to be consistent with others.
32 lines
728 B
YAML
32 lines
728 B
YAML
name: LLVM Project Version Check
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'release/**'
|
|
pull_request:
|
|
branches:
|
|
- 'release/**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
version_check:
|
|
if: github.repository_owner == 'llvm'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Fetch LLVM sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r ./llvm/utils/git/requirements.txt
|
|
|
|
- name: Version Check
|
|
run: |
|
|
version=$(grep -o 'LLVM_VERSION_\(MAJOR\|MINOR\|PATCH\) [0-9]\+' llvm/CMakeLists.txt | cut -d ' ' -f 2 | tr "\n" "." | sed 's/.$//g')
|
|
.github/workflows/version-check.py "$version"
|