try to fix ci
This commit is contained in:
parent
04a2e769fd
commit
85602da335
1 changed files with 9 additions and 9 deletions
18
.github/workflows/ci.yaml
vendored
18
.github/workflows/ci.yaml
vendored
|
|
@ -14,14 +14,7 @@ jobs:
|
|||
tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz
|
||||
sudo cp clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/bin/clang-format /usr/local/bin/
|
||||
- name: Check clang-format
|
||||
run: |
|
||||
set -e
|
||||
FILES=$(git ls-files | grep -E '\.(cc|hh|hpp|cpp|cxx)$' || true)
|
||||
if [ -z "$FILES" ]; then exit 0; fi
|
||||
clang-format --version
|
||||
for f in $FILES; do
|
||||
clang-format --style=google --dry-run -Werror "$f"
|
||||
done
|
||||
run: clang-format --style=google --dry-run -Werror **/*.{hpp,hh,hxx,h,cpp,cc,cxx,c}
|
||||
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -31,7 +24,14 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install compiler
|
||||
run: sudo apt-get update && sudo apt-get install -y g++ cmake
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y software-properties-common
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc-13 g++-13 cmake
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
|
||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
|
||||
- name: Configure CMake
|
||||
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||
- name: Build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue