Skip to content

Commit

Permalink
update ci: use clang-format-18 and install numpy before configuring
Browse files Browse the repository at this point in the history
  • Loading branch information
Puerling committed Sep 6, 2024
1 parent 90c4f45 commit eaed621
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:

lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
env:
Expand All @@ -18,10 +18,15 @@ jobs:

- name: πŸ“š Install required system packages
run: |
wget --no-verbose -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
sudo apt update
sudo apt install xorg-dev libglu1-mesa-dev libgtk-3-dev clang-format-15 clang-tidy-15
sudo apt install xorg-dev libglu1-mesa-dev libgtk-3-dev clang-format-18 clang-tidy-18
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: πŸ“š Install python packages
run: pip install --user numpy pylint black

- name: πŸ“ Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -35,8 +40,8 @@ jobs:
if: always()
shell: bash
run: |
clang-format-15 --version
OUTPUT=$($SOURCES | xargs clang-format-15 -n 2>&1)
clang-format-18 --version
OUTPUT=$($SOURCES | xargs clang-format-18 -n 2>&1)
if [[ $OUTPUT ]]; then
echo "$OUTPUT"
exit 1
Expand All @@ -46,14 +51,7 @@ jobs:
if: always()
shell: bash
run: |
clang-tidy-15 --version
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: πŸ“š Install python packages
run: pip install --user numpy pylint black
clang-tidy-18 --version
- name: πŸ§ͺ Python code formatting check
shell: bash
Expand All @@ -77,7 +75,7 @@ jobs:
parallelisation: "openmp"
env:
BUILD_TYPE: Release
CMAKE_FLAGS: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSPIRIT_UI_USE_IMGUI=ON -DSPIRIT_UI_CXX_USE_QT=OFF
CMAKE_FLAGS: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSPIRIT_UI_USE_IMGUI=ON -DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_BUILD_TEST=ON
OMP_NUM_THREADS: 4

steps:
Expand All @@ -89,6 +87,9 @@ jobs:
sudo apt update
sudo apt install xorg-dev libglu1-mesa-dev libgtk-3-dev
- name: πŸ“š Install python packages
run: pip install --user numpy

- name: πŸ“ Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build

Expand All @@ -109,9 +110,6 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE -j 2

- name: πŸ“š Install python packages
run: pip install --user numpy

- name: πŸ§ͺ Test
shell: bash
working-directory: ${{runner.workspace}}/build
Expand Down Expand Up @@ -152,7 +150,7 @@ jobs:
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 http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo add-apt-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo apt update
sudo apt 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
Expand Down Expand Up @@ -344,6 +342,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: πŸ“š Install python packages
run: pip install --user numpy

- name: πŸ“ Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build

Expand All @@ -364,9 +365,6 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE -j 2

- name: πŸ“š Install python packages
run: pip install --user numpy

- name: πŸ§ͺ Test regular debug build
if: matrix.coverage != true
shell: bash
Expand Down Expand Up @@ -435,6 +433,9 @@ jobs:
with:
python-version: '3.x'

- name: πŸ“š Install python packages
run: pip install --user numpy

- name: πŸ“š Install required system packages
if: matrix.os == 'ubuntu-22.04'
run: |
Expand All @@ -461,9 +462,6 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE -j 2

- name: πŸ“š Install python packages
run: pip install --user numpy

- name: πŸ§ͺ Test
shell: bash
working-directory: ${{runner.workspace}}/build
Expand Down

0 comments on commit eaed621

Please sign in to comment.