Skip to content

Compile with clang 18 #1574

Compile with clang 18

Compile with clang 18 #1574

Workflow file for this run

name: Ubuntu
on:
push:
branches:
- main
pull_request:
jobs:
ubuntu-build:
name: Build on Ubuntu
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [g++-11, clang++-18]
buildmode: [Debug, Release]
steps:
- name: Checkout repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install libssl-dev libcurl4-gnutls-dev ninja-build -y --no-install-recommends
- name: Install gcc
run: |
sudo apt install ${{matrix.compiler}} -y --no-install-recommends
if: startsWith(matrix.compiler, 'g++')
- name: Install clang
run: |

Check failure on line 33 in .github/workflows/ubuntu.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ubuntu.yml

Invalid workflow file

You have an error in your yaml syntax on line 33
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
CLANG_VERSION=$(echo ${{matrix.compiler}} | cut -d- -f2)
sudo ./llvm.sh ${CLANG_VERSION}
if: startsWith(matrix.compiler, 'clang++')
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.buildmode}} -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -GNinja
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: ninja
- name: Local Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --exclude-regex api_test
- name: Public API Tests # Tries several times to avoid random timeout errors not coming from coincenter
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --tests-regex api_test --repeat until-pass:10