Skip to content

Commit 254aeb4

Browse files
authored
also build with clang on gha ubuntu job (#976)
* also build with clang on gha ubuntu job * code ql v2 deprecated
1 parent fdc768d commit 254aeb4

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.github/workflows/cmake_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
${{ runner.os }}-pip-
4444
4545
- name: Clone PHARE
46-
uses: actions/checkout@v3
46+
uses: actions/checkout@v4
4747
with:
4848
submodules: 'recursive'
4949

.github/workflows/cmake_ubuntu.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest]
18+
cc: [gcc, clang]
1819

1920
steps:
2021
- name: Build Info
@@ -40,7 +41,7 @@ jobs:
4041
${{ runner.os }}-pip-
4142
4243
- name: Clone PHARE
43-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
4445
with:
4546
submodules: 'recursive'
4647

@@ -68,10 +69,11 @@ jobs:
6869
run: cmake -E make_directory ${{runner.workspace}}/build
6970

7071
- name: Configure CMake
71-
# builds samrai with 2 threads as it does not OOM (yet)
7272
working-directory: ${{runner.workspace}}/build
7373
run: |
7474
set -ex
75+
export CC=gcc CXX=g++
76+
[ "${{ matrix.cc }}" = "clang" ] && export CC=clang CXX=clang++
7577
cmake $GITHUB_WORKSPACE
7678
cd ${{runner.workspace}}/PHARE/subprojects/samrai && mkdir build && cd build
7779
cmake .. -DENABLE_SAMRAI_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo
@@ -86,8 +88,7 @@ jobs:
8688
8789
- name: Build
8890
working-directory: ${{runner.workspace}}/build
89-
run: |
90-
cmake --build . # OOM if more threads
91+
run: cmake --build . -j 2
9192

9293
- name: Test
9394
working-directory: ${{runner.workspace}}/build

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
with:
3434
submodules: recursive
3535

@@ -38,21 +38,21 @@ jobs:
3838
run: mkdir build; cd build; cmake .. -Dphare_configurator=ON
3939

4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v2
41+
uses: github/codeql-action/init@v3
4242
with:
4343
config-file: ./.github/codeql-config.yml
4444
languages: ${{ matrix.language }}
4545
queries: +security-and-quality
4646

4747
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v2
48+
uses: github/codeql-action/autobuild@v3
4949
if: ${{ matrix.language == 'python' }}
5050

5151
- name: Build cpp
5252
if: ${{ matrix.language == 'cpp' }}
5353
run: cd build; make
5454

5555
- name: Perform CodeQL Analysis
56-
uses: github/codeql-action/analyze@v2
56+
uses: github/codeql-action/analyze@v3
5757
with:
5858
category: "/language:${{ matrix.language }}"

tests/amr/data/particles/copy/test_particledata_copyNd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ TYPED_TEST(AParticlesDataND, PreservesAllParticleAttributesAfterCopy)
142142
TYPED_TEST(AParticlesDataND, copiesDataWithOverlapNoTransform)
143143
{
144144
static constexpr auto dim = TypeParam{}();
145-
auto dimension = SAMRAI::tbox::Dimension{this->dim};
145+
auto dimension = SAMRAI::tbox::Dimension{dim};
146146

147147
// now, with an overlap as union of 2 boxes
148148
//

0 commit comments

Comments
 (0)