Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,performance-*,modernize-*,llvm-namespace-comment,google-explicit-constructor,bugprone-*,misc-*,readability-*, -readability-named-parameter,-modernize-use-trailing-return-type,-modernize-use-using'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
Expand Down
86 changes: 48 additions & 38 deletions .github/workflows/basic-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,22 @@ env:

jobs:
format-check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main" | sudo tee /etc/apt/sources.list.d/llvm-18.list

- name: Update apt
run: sudo apt-get update

- name: Install clang-format
run: |
sudo apt-get remove clang-format-*
sudo apt-get install -t llvm-toolchain-noble-18 clang-format-18

- name: Format source code
run: |
Expand All @@ -24,7 +36,7 @@ jobs:
-a \( -name "*.c" -o -name "*.cpp" -o -name "*.h" \) \
-not -path "*/lulesh/*" -not -path "*/CallSite.h" \
-print0 \
| xargs -0 clang-format-14 -i
| xargs -0 clang-format-18 -i

- name: Format check
run: |
Expand All @@ -35,16 +47,13 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
- uses: actions/checkout@v6
- uses: codespell-project/actions-codespell@v2.2

lit-suite:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, ubuntu-24.04 ]
llvm-version: [ 14, 18, 19 ]
typeart-typegen-legacy: [ 0, 1 ]
preset:
- name: ci-thread-safe-safeptr
- name: ci-thread-safe
Expand All @@ -58,44 +67,41 @@ jobs:
- name: ci-libcxx
libcxx: true
skip_test: true
exclude:
- llvm-version: 14
os: ubuntu-24.04
- llvm-version: 18
os: ubuntu-22.04
- llvm-version: 18
typeart-typegen-legacy: 1
- llvm-version: 19
os: ubuntu-22.04
- llvm-version: 19
typeart-typegen-legacy: 1

runs-on: ${{ matrix.os }}
platform:
- { os: ubuntu-22.04, llvm-version: 14, typeart-typegen-legacy: 0 }
- { os: ubuntu-22.04, llvm-version: 14, typeart-typegen-legacy: 1 }
- { os: ubuntu-24.04, llvm-version: 18, typeart-typegen-legacy: 0 }
- { os: ubuntu-24.04, llvm-version: 19, typeart-typegen-legacy: 0 }
- { os: ubuntu-24.04, llvm-version: 20, typeart-typegen-legacy: 0 }
- { os: ubuntu-24.04, llvm-version: 21, typeart-typegen-legacy: 0 }
- { os: ubuntu-24.04, llvm-version: 22, typeart-typegen-legacy: 0 }

runs-on: ${{ matrix.platform.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: LLVM apt
if: ${{ matrix.llvm-version == 19 }}
if: ${{ matrix.platform.llvm-version >= 19 }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main" | sudo tee /etc/apt/sources.list.d/llvm-19.list
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ matrix.platform.llvm-version }} main" | sudo tee /etc/apt/sources.list.d/llvm-${{ matrix.platform.llvm-version }}.list

- name: Update apt
run: sudo apt-get update

- name: Install LLVM
run: sudo apt-get install libllvm${{ matrix.llvm-version }} llvm-${{ matrix.llvm-version }} llvm-${{ matrix.llvm-version }}-dev
run: sudo apt-get install libllvm${{ matrix.platform.llvm-version }} llvm-${{ matrix.platform.llvm-version }} llvm-${{ matrix.platform.llvm-version }}-dev

- name: Install LLVM OpenMP runtime
run: sudo apt-get install libomp-${{ matrix.llvm-version }}-dev libomp5-${{ matrix.llvm-version }}
run: sudo apt-get install libomp-${{ matrix.platform.llvm-version }}-dev

- name: Install Clang
run: sudo apt-get install clang-${{ matrix.llvm-version }} clang-tidy-${{ matrix.llvm-version }}
run: sudo apt-get install clang-${{ matrix.platform.llvm-version }} clang-tidy-${{ matrix.platform.llvm-version }}

- name: Install libc++
if: matrix.preset.libcxx
run: sudo apt-get install --no-install-recommends libc++-${{ matrix.llvm-version }}-dev libc++abi-${{ matrix.llvm-version }}-dev
run: sudo apt-get install --no-install-recommends libc++-${{ matrix.platform.llvm-version }}-dev libc++abi-${{ matrix.platform.llvm-version }}-dev

- name: Install OpenMPI
run: sudo apt-get install libopenmpi-dev openmpi-bin
Expand All @@ -104,13 +110,17 @@ jobs:
if: matrix.preset.coverage
run: sudo apt-get install lcov

- name: Setup Mold Linker
if: ${{ matrix.platform.llvm-version > 14 }}
uses: rui314/setup-mold@v1

- name: Setup env
run: |
sudo ln -f -s /usr/bin/clang-${{ matrix.llvm-version }} /usr/bin/clang
sudo ln -f -s /usr/bin/clang++-${{ matrix.llvm-version }} /usr/bin/clang++
echo "LLVM_CMAKE_DIR=/usr/lib/llvm-${{ matrix.llvm-version }}/cmake" >> $GITHUB_ENV
echo "EXTERNAL_LIT=/usr/lib/llvm-${{ matrix.llvm-version }}/build/utils/lit/lit.py" >> $GITHUB_ENV
echo "TYPEART_TYPEGEN_IR=${{ matrix.typeart-typegen-legacy }}" >> $GITHUB_ENV
sudo ln -f -s /usr/bin/clang-${{ matrix.platform.llvm-version }} /usr/bin/clang
sudo ln -f -s /usr/bin/clang++-${{ matrix.platform.llvm-version }} /usr/bin/clang++
echo "LLVM_CMAKE_DIR=/usr/lib/llvm-${{ matrix.platform.llvm-version }}/cmake" >> $GITHUB_ENV
echo "EXTERNAL_LIT=/usr/lib/llvm-${{ matrix.platform.llvm-version >= 20 && 18 || matrix.platform.llvm-version }}/build/utils/lit/lit.py" >> $GITHUB_ENV
echo "TYPEART_TYPEGEN_IR=${{ matrix.platform.typeart-typegen-legacy }}" >> $GITHUB_ENV

- name: Configure TypeART
run: cmake -B build --preset ${{ matrix.preset.name }} -DLLVM_DIR=${LLVM_CMAKE_DIR} -DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT}
Expand All @@ -132,19 +142,19 @@ jobs:

- name: Coveralls (parallel)
if: matrix.preset.coverage
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: build/typeart.coverage
flag-name: ${{ matrix.preset.name }}-${{ matrix.llvm-version }}-${{ matrix.typeart-typegen-legacy }}
flag-name: ${{ matrix.preset.name }}-${{ matrix.platform.llvm-version }}-${{ matrix.platform.typeart-typegen-legacy }}
parallel: true

finish-coverage:
needs: lit-suite
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
parallel-finished: true
Loading