Skip to content

Commit

Permalink
Feature/ci gcc versions (LLNL#269)
Browse files Browse the repository at this point in the history
* Adding newer versions of GCC to Github actions

* Fixing gcc version in CI

* Fixing indentation

* Trying to fix gcc-13

* Attempting to fix gcc versions

* Includes algorithm in ygm_traits to be able to use

* Adds safeguards against running on one rank in test_collective and removes mpich tests on ubuntu24.04 from CI
  • Loading branch information
steiltre authored and ryan-dozier committed Nov 6, 2024
1 parent 7f802da commit e132bd6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-22.04]
gcc-version: [11, 12]
os: [ubuntu-24.04, ubuntu-22.04]
gcc-version: [11, 12, 13, 14]
mpi-type: [mpich, openmpi]
exclude:
- os: ubuntu-latest
gcc-version: 8
- os: ubuntu-22.04
gcc-version: 13
- os: ubuntu-22.04
gcc-version: 14
- os: ubuntu-24.04
mpi-type: mpich
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Update apt
run: |
sudo add-apt-repository -y universe
sudo apt-get update
- name: Cache boost
uses: actions/cache@v4
id: cache-boost
Expand All @@ -49,8 +57,8 @@ jobs:
if: matrix.mpi-type == 'openmpi'
run: sudo apt-get install openmpi-bin libopenmpi-dev
- name: Install GCC-${{ matrix.gcc-version }}
if: matrix.gcc-version == '8'
run: sudo apt-get install gcc-8 g++-8
if: (matrix.gcc-version == '11' && matrix.os == 'ubuntu-24.04')
run: sudo apt-get install gcc-11 g++-11
- name: Make
run: |
echo Run 'make'
Expand Down
1 change: 1 addition & 0 deletions include/ygm/detail/ygm_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// SPDX-License-Identifier: MIT

#pragma once
#include <algorithm>
#include <type_traits>

namespace ygm::detail {
Expand Down
10 changes: 7 additions & 3 deletions test/test_collective.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ int main(int argc, char** argv) {
string_set.insert("Aggs");
}

YGM_ASSERT_RELEASE(not is_same(string_set, world));
if (world.size() > 1) {
YGM_ASSERT_RELEASE(not is_same(string_set, world));
}
string_set.insert("Howdy");
string_set.insert("Aggs");
YGM_ASSERT_RELEASE(is_same(string_set, world));

YGM_ASSERT_RELEASE(not is_same(world.rank(), world));
if (world.size() > 1) {
YGM_ASSERT_RELEASE(not is_same(world.rank(), world));
}

return 0;
}
}

0 comments on commit e132bd6

Please sign in to comment.