fix for external lib with gcc error# #20
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: llarm-cpu build | |
| on: | |
| push: | |
| paths: | |
| - 'llarm-cpu/**/*.cpp' | |
| - 'llarm-cpu/**/*.hpp' | |
| - 'llarm-cpu/**/CMakeLists.txt' | |
| - 'llarm-cpu/**/*.cmake' | |
| - 'llarm-cpu/**/*.cmake.in' | |
| - 'llarm-cpu/tests/**' | |
| - 'cmake/**' | |
| - 'shared/**' | |
| - '.github/workflows/llarm-cpu.yml' | |
| pull_request: | |
| paths: | |
| - 'llarm-cpu/**/*.cpp' | |
| - 'llarm-cpu/**/*.hpp' | |
| - 'llarm-cpu/**/CMakeLists.txt' | |
| - 'llarm-cpu/**/*.cmake' | |
| - 'llarm-cpu/**/*.cmake.in' | |
| - 'llarm-cpu/tests/**' | |
| - 'cmake/**' | |
| - 'shared/**' | |
| - '.github/workflows/llarm-cpu.yml' | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install CMake 3.29 | |
| run: | | |
| wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc \ | |
| | gpg --dearmor \ | |
| | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg > /dev/null | |
| echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main' \ | |
| | sudo tee /etc/apt/sources.list.d/kitware.list > /dev/null | |
| sudo apt-get update -q | |
| sudo apt-get install -y cmake | |
| - name: Install ARM toolchain and QEMU | |
| run: | | |
| sudo apt-get install -y \ | |
| g++-arm-linux-gnueabi \ | |
| qemu-user | |
| - name: Configure | |
| run: | | |
| cmake -S llarm-cpu -B llarm-cpu/build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| - name: Build | |
| run: cmake --build llarm-cpu/build --parallel | |
| - name: Test | |
| run: bash llarm-cpu/tests/run_tests.sh | |
| - name: Install clang-tidy | |
| run: sudo apt-get install -y clang-tidy clang-tools | |
| - name: Resolve changed files | |
| id: changed | |
| run: | | |
| CHANGED=$(git diff HEAD~1 --name-only) | |
| CPPS=$(echo "$CHANGED" | grep -E "^llarm-cpu/src/.*\.cpp$" || true) | |
| HPPS=$(echo "$CHANGED" | grep -E "^llarm-cpu/.*\.hpp$" || true) | |
| if [ -n "$HPPS" ]; then | |
| echo "filter=llarm-cpu/src/.*\\.cpp" >> "$GITHUB_OUTPUT" | |
| elif [ -n "$CPPS" ]; then | |
| echo "filter=$(echo "$CPPS" | tr '\n' '|' | sed 's/|$//')" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "filter=" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: clang-tidy | |
| if: steps.changed.outputs.filter != '' | |
| continue-on-error: true | |
| run: | | |
| run-clang-tidy \ | |
| -p llarm-cpu/build \ | |
| -extra-arg=-Wno-unknown-warning-option \ | |
| -header-filter="llarm-cpu/src/.*\\.hpp" \ | |
| "${{ steps.changed.outputs.filter }}" |