Skip to content

Commit

Permalink
pin clang-format version in CI to the same version as in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Puerling committed Sep 6, 2024
1 parent c2187ba commit 1230b08
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ jobs:
- name: 📚 Install required system packages
run: |
sudo apt-get update
sudo apt-get install xorg-dev libglu1-mesa-dev libgtk-3-dev clang-format-18 clang-tidy-18
sudo apt-get install xorg-dev libglu1-mesa-dev libgtk-3-dev tree
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: 📚 Install python packages
run: pip install --user numpy pylint black
run: >
pip install --user numpy pylint
"black==22.10.0"
"clang-format==18.1.8"
"clang-tidy==18.1.8"
- name: 📁 Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -40,8 +44,8 @@ jobs:
if: always()
shell: bash
run: |
clang-format-18 --version
OUTPUT=$($SOURCES | xargs clang-format-18 -n 2>&1)
clang-format --version
OUTPUT=$($SOURCES | xargs clang-format -n 2>&1)
if [[ $OUTPUT ]]; then
echo "$OUTPUT"
exit 1
Expand All @@ -51,13 +55,13 @@ jobs:
if: always()
shell: bash
run: |
clang-tidy-18 --version
clang-tidy --version
- name: 🧪 Python code formatting check
shell: bash
run: |
black core/python --check
black ui-python --check
git ls-files core/python/{,**/}*.py | xargs black --check
git ls-files ui-python/{,**/}*.py | xargs black --check
- name: 🧪 Python code quality checks, linting
shell: bash
Expand Down Expand Up @@ -122,11 +126,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
parallelisation: ""
- os: ubuntu-22.04
- os: ubuntu-24.04
parallelisation: "openmp"
- os: ubuntu-22.04
- os: ubuntu-24.04
parallelisation: "cuda"
- os: macos-13
parallelisation: ""
Expand All @@ -145,16 +149,14 @@ jobs:
- uses: actions/checkout@v3

- name: 📚 Install LLVM 17 and some libs (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
sudo apt-get --purge remove "clang*"
wget --no-verbose -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo apt-get update
sudo apt-get install xorg-dev libglu1-mesa-dev libgtk-3-dev clang-17 lldb-17 lld-17 libomp-17-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 10
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 10
clang --version
- name: 📚 Install CUDA Toolkit
if: matrix.parallelisation == 'cuda'
Expand Down Expand Up @@ -184,6 +186,10 @@ jobs:
choco upgrade llvm
"CMAKE_FLAGS=$env:CMAKE_FLAGS -G Ninja" >> $env:GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: 📁 Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build

Expand Down

0 comments on commit 1230b08

Please sign in to comment.