Skip to content

Commit

Permalink
Install and use C++ compiler for testing too.
Browse files Browse the repository at this point in the history
  • Loading branch information
insertinterestingnamehere committed Oct 24, 2023
1 parent c18efd0 commit 5191afa
Showing 1 changed file with 68 additions and 13 deletions.
81 changes: 68 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,78 @@ on:
branches: [ main ]

jobs:
linux_make_check:
linux-gcc:
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
compiler: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang-11, clang-12, clang-13, clang-14, clang-15, clang-16, clang-17]
gcc_version: [9, 10, 11, 12, 13]
scheduler: [nemesis, sherwood]
topology: [hwloc, binders, no]
env:
CC: ${{ matrix.compiler }}
CC: gcc-${{ matrix.gcc_version }}
CXX: g++-${{ matrix.gcc_version }}
steps:
- uses: actions/checkout@v3
- if: ${{ matrix.compiler == 'gcc-13' }}
- if: ${{ matrix.gcc_version == '13' }}
run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1
- if: ${{ matrix.compiler == 'clang-16' }}
- name: install compiler
run: sudo apt-get install gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }}
- if: ${{ matrix.topology != 'no' }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' && break || sleep 1
- if: ${{ matrix.compiler == 'clang-17' }}
sudo apt-get install hwloc libhwloc-dev
hwloc-ls --version
- name: build qthreads
run: |
./autogen.sh
./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }}
make -j2
- name: make check
run: |
timeout --foreground 3m make check
linux-clang:
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
clang_version: [11, 12, 13, 14, 15, 16, 17]
scheduler: [nemesis, sherwood]
topology: [hwloc, binders, no]
use_libcxx: [true, false] # check with libc++ too since there are plans to expand the use of C++ in qthreads
include:
- clang_version: 11
gcc_version: 10
- clang_version: 12
gcc_version: 11
- clang_version: 13
gcc_version: 11
- clang_version: 14
gcc_version: 11
- clang_version: 15
gcc_version: 12
- clang_version: 16
gcc_version: 13
- clang_version: 17
gcc_version: 13
env:
CC: clang-${{ matrix.clang_version }}
CXX: clang++${{ matrix.clang_version }}
CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }}
steps:
- uses: actions/checkout@v3
- if: ${{ matrix.clang_version == '16' || matrix.clang_version == 17 }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1
- name: install compiler
run: sudo apt-get install ${{ matrix.compiler }}
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.clang_version }} main' && break || sleep 1
- if: ${{ matrix.gcc_version == '13' && ! matrix.use_libcxx }}
run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1
- if: ${{ ! matrix.use_libcxx }}
run: sudo apt-get install gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }}
- name: install clang
run: sudo apt-get install clang-${{ matrix.clang_version }}
- if: ${{ matrix.use_libcxx }}
run: sudo apt-get install libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev
- if: ${{ matrix.topology != 'no' }}
run: |
sudo apt-get install hwloc libhwloc-dev
Expand All @@ -44,7 +92,7 @@ jobs:
run: |
timeout --foreground 3m make check
mac_build:
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -72,19 +120,26 @@ jobs:
sanitizer: [address, memory, thread, undefined]
scheduler: [nemesis, sherwood]
topology: [hwloc, binders, no]
use_libcxx: [true, false]
env:
CC: clang-17
CXX: clang++-17
CFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
CXXFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -fsanitize={0}', matrix.sanitizer) || format('-fsanitize={0}', matrix.sanitizer) }}
LDFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
steps:
- uses: actions/checkout@v3
- if: ${{ ! matrix.use_libcxx }}
run: |
sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1
sudo apt-get install gcc-13 g++-13
- name: install compiler
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1
sudo apt-get install clang-17
- if: ${{ matrix.use_libcxx }}
run: sudo apt-get install libc++-${{ matrix.clang_version }}-dev libc++abi-${{ matrix.clang_version }}-dev
- if: ${{ matrix.topology != 'no' }}
run: |
sudo apt-get install hwloc libhwloc-dev
Expand Down

0 comments on commit 5191afa

Please sign in to comment.