CI: Updated LLVM ver and removed using cache
This commit is contained in:
parent
8aecc897d7
commit
72f96c2a86
1 changed files with 45 additions and 45 deletions
|
@ -5,7 +5,7 @@ jobs:
|
||||||
on-push-commit-check:
|
on-push-commit-check:
|
||||||
runs-on: archlinux-latest
|
runs-on: archlinux-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup environment
|
- name: Setup environment - Install pacman packages
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
pacman -Syyu --noconfirm
|
pacman -Syyu --noconfirm
|
||||||
|
@ -13,6 +13,28 @@ jobs:
|
||||||
pacman -S --noconfirm cmake make gcc ninja meson
|
pacman -S --noconfirm cmake make gcc ninja meson
|
||||||
pacman -S --noconfirm gtk4 gtkmm-4.0 boost spdlog fmt libxml++-5.0
|
pacman -S --noconfirm gtk4 gtkmm-4.0 boost spdlog fmt libxml++-5.0
|
||||||
|
|
||||||
|
- name: Setup environment - Install LLVM-19.1.1
|
||||||
|
run: |
|
||||||
|
echo "" >> ~/.bashrc
|
||||||
|
echo "export LLVM_VER='LLVM-19.1.1'" >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
echo "::group::Download $LLVM_VER"
|
||||||
|
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.1/LLVM-19.1.1-Linux-X64.tar.xz -O /$LLVM_VER-Linux-X64.tar.xz
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Extracting $LLVM_VER"
|
||||||
|
mkdir -p /home/$LLVM_VER/
|
||||||
|
tar -xf /$LLVM_VER-Linux-X64.tar.xz -C "/home/$LLVM_VER/" --strip-components=1 $LLVM_VER-Linux-X64/bin/clang-19 $LLVM_VER-Linux-X64/bin/clang $LLVM_VER-Linux-X64/bin/clang++ $LLVM_VER-Linux-X64/bin/clang-scan-deps $LLVM_VER-Linux-X64/bin/clang-format $LLVM_VER-Linux-X64/bin/clang-tidy $LLVM_VER-Linux-X64/include/ $LLVM_VER-Linux-X64/lib/ $LLVM_VER-Linux-X64/libexec/ $LLVM_VER-Linux-X64/local/ $LLVM_VER-Linux-X64/share/
|
||||||
|
rm /$LLVM_VER-Linux-X64.tar.xz
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "" >> ~/.bashrc
|
||||||
|
echo "export PATH='/home/$LLVM_VER/bin:${PATH}'" >> ~/.bashrc
|
||||||
|
|
||||||
|
echo "Available LLVM binaries:"
|
||||||
|
ls -la /home/$LLVM_VER/bin/
|
||||||
|
|
||||||
- name: List CI environment variables
|
- name: List CI environment variables
|
||||||
run: |
|
run: |
|
||||||
echo "Runner OS: ${{ runner.os }}"
|
echo "Runner OS: ${{ runner.os }}"
|
||||||
|
@ -50,47 +72,25 @@ jobs:
|
||||||
#- name: Delete cache
|
#- name: Delete cache
|
||||||
# run: |
|
# run: |
|
||||||
# rm -rf ${{ runner.tool_cache }}/cache-llvm-19-restore
|
# rm -rf ${{ runner.tool_cache }}/cache-llvm-19-restore
|
||||||
|
#
|
||||||
- name: Try restore LLVM-19 binaries from cache
|
#- name: Try restore LLVM-19 binaries from cache
|
||||||
id: cache-llvm-19-bins-restore
|
# id: cache-llvm-19-bins-restore
|
||||||
uses: actions/cache@v4
|
# uses: actions/cache@v4
|
||||||
with:
|
# with:
|
||||||
path: /LLVM-19.1.0-Linux-X64-small.tar.xz
|
# path: /$LLVM_VER-Linux-X64-small.tar.xz
|
||||||
key: LLVM-19.1.0-Linux-X64-small
|
# key: $LLVM_VER-Linux-X64-small
|
||||||
|
#
|
||||||
- name: Download and unzip LLVM-19 if not in cache
|
#- name: Save LLVM-19 to cache
|
||||||
if: steps.cache-llvm-19-bins-restore.outputs.cache-hit != 'true'
|
# if: steps.cache-llvm-19-bins-restore.outputs.cache-hit != 'true'
|
||||||
run: |
|
# id: cache-llvm-19-save
|
||||||
echo "::group::Download LLVM-19.1.0"
|
# uses: actions/cache/save@v4
|
||||||
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-Linux-X64.tar.xz -O /LLVM-19.1.0-Linux-X64.tar.xz
|
# with:
|
||||||
echo "::endgroup::"
|
# path: /$LLVM_VER-Linux-X64-small.tar.xz
|
||||||
|
# key: $LLVM_VER-Linux-X64-small
|
||||||
echo "::group::Extracting LLVM-19.1.0"
|
|
||||||
mkdir -p /home/LLVM-19.1.0/
|
|
||||||
tar -xf /LLVM-19.1.0-Linux-X64.tar.xz -C "/home/LLVM-19.1.0/" --strip-components=1 LLVM-19.1.0-Linux-X64/bin/clang-19 LLVM-19.1.0-Linux-X64/bin/clang LLVM-19.1.0-Linux-X64/bin/clang++ LLVM-19.1.0-Linux-X64/bin/clang-scan-deps LLVM-19.1.0-Linux-X64/bin/clang-format LLVM-19.1.0-Linux-X64/bin/clang-tidy LLVM-19.1.0-Linux-X64/include/ LLVM-19.1.0-Linux-X64/lib/ LLVM-19.1.0-Linux-X64/libexec/ LLVM-19.1.0-Linux-X64/local/ LLVM-19.1.0-Linux-X64/share/
|
|
||||||
rm /LLVM-19.1.0-Linux-X64.tar.xz
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
tar -cf /LLVM-19.1.0-Linux-X64-small.tar.xz /home/LLVM-19.1.0/
|
|
||||||
|
|
||||||
- name: Save LLVM-19 to cache
|
|
||||||
if: steps.cache-llvm-19-bins-restore.outputs.cache-hit != 'true'
|
|
||||||
id: cache-llvm-19-save
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: /LLVM-19.1.0-Linux-X64-small.tar.xz
|
|
||||||
key: LLVM-19.1.0-Linux-X64-small
|
|
||||||
|
|
||||||
- name: Install LLVM
|
|
||||||
run: |
|
|
||||||
mkdir -p /home/LLVM-19.1.0
|
|
||||||
tar -xf /LLVM-19.1.0-Linux-X64-small.tar.xz -C "/home/LLVM-19.1.0/" --strip-components=2
|
|
||||||
ls -la /home/LLVM-19.1.0/bin/
|
|
||||||
export PATH="/home/LLVM-19.1.0/bin:${PATH}"
|
|
||||||
|
|
||||||
- name: Check clang-format
|
- name: Check clang-format
|
||||||
run: |
|
run: |
|
||||||
export PATH="/home/LLVM-19.1.0/bin:${PATH}"
|
export PATH="/home/$LLVM_VER/bin:${PATH}"
|
||||||
cd ${{ github.workspace }}
|
cd ${{ github.workspace }}
|
||||||
find -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.c" -o -name "*.cpp" \) > repo_sources_to_check.txt
|
find -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.c" -o -name "*.cpp" \) > repo_sources_to_check.txt
|
||||||
export REPO_FILES=$(cat repo_sources_to_check.txt)
|
export REPO_FILES=$(cat repo_sources_to_check.txt)
|
||||||
|
@ -105,13 +105,13 @@ jobs:
|
||||||
|
|
||||||
- name: Clang build with -fsanitize=address
|
- name: Clang build with -fsanitize=address
|
||||||
environment:
|
environment:
|
||||||
CC: /home/LLVM-19.1.0/bin/clang
|
CC: /home/$LLVM_VER/bin/clang
|
||||||
CXX: /home/LLVM-19.1.0/bin/clang++
|
CXX: /home/$LLVM_VER/bin/clang++
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ${{ github.workspace }}/build_clang
|
mkdir -p ${{ github.workspace }}/build_clang
|
||||||
cmake -Wno-dev \
|
cmake -Wno-dev \
|
||||||
-DCMAKE_C_COMPILER=/home/LLVM-19.1.0/bin/clang \
|
-DCMAKE_C_COMPILER=/home/$LLVM_VER/bin/clang \
|
||||||
-DCMAKE_CXX_COMPILER=/home/LLVM-19.1.0/bin/clang++ \
|
-DCMAKE_CXX_COMPILER=/home/$LLVM_VER/bin/clang++ \
|
||||||
-S ${{ github.workspace }} \
|
-S ${{ github.workspace }} \
|
||||||
-B ${{ github.workspace }}/build_clang \
|
-B ${{ github.workspace }}/build_clang \
|
||||||
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
-GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
@ -124,11 +124,11 @@ jobs:
|
||||||
- name: Clang unit tests with -fsanitize=address
|
- name: Clang unit tests with -fsanitize=address
|
||||||
run: |
|
run: |
|
||||||
cd ${{ github.workspace }}/build_clang
|
cd ${{ github.workspace }}/build_clang
|
||||||
ASAN_SYMBOLIZER_PATH=/home/LLVM-19.1.0/bin/llvm-symbolizer ASAN_OPTIONS=detect_stack_use_after_return=1:check_initialization_order=1:detect_leaks=1:atexit=1:abort_on_error=1 ./larra_xmpp_tests
|
ASAN_SYMBOLIZER_PATH=/home/$LLVM_VER/bin/llvm-symbolizer ASAN_OPTIONS=detect_stack_use_after_return=1:check_initialization_order=1:detect_leaks=1:atexit=1:abort_on_error=1 ./larra_xmpp_tests
|
||||||
|
|
||||||
- name: Check clang-tidy
|
- name: Check clang-tidy
|
||||||
run: |
|
run: |
|
||||||
export PATH="/home/LLVM-19.1.0/bin:${PATH}"
|
export PATH="/home/$LLVM_VER/bin:${PATH}"
|
||||||
wget https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
|
wget https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
|
||||||
python run-clang-tidy.py -use-color -exclude-header-filter .*build.* -header-filter .hpp -p ${{ github.workspace }}/build_clang/ -config-file ${{ github.workspace }}/.clang-tidy ${{ github.workspace }}/examples ${{ github.workspace }}/library/ ${{ github.workspace }}/src/
|
python run-clang-tidy.py -use-color -exclude-header-filter .*build.* -header-filter .hpp -p ${{ github.workspace }}/build_clang/ -config-file ${{ github.workspace }}/.clang-tidy ${{ github.workspace }}/examples ${{ github.workspace }}/library/ ${{ github.workspace }}/src/
|
||||||
echo "::warning::TODO Fix warnings and add '-warnings-as-errors' flags to report clang-tidy errors"
|
echo "::warning::TODO Fix warnings and add '-warnings-as-errors' flags to report clang-tidy errors"
|
||||||
|
|
Loading…
Reference in a new issue