diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e588245..2809fe4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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