Skip to content

Commit 973fc44

Browse files
committed
add pytest after build, minor variable rename
1 parent ce5b1c4 commit 973fc44

File tree

1 file changed

+52
-23
lines changed

1 file changed

+52
-23
lines changed

.github/workflows/nestbuildmatrix.yml

+52-23
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,24 @@ jobs:
209209
210210
pytest-linux:
211211
runs-on: "ubuntu-20.04"
212-
needs: [test_linux]
212+
needs: [build_linux]
213+
strategy:
214+
fail-fast: true
215+
matrix:
216+
os: ["ubuntu-20.04"]
217+
cpp_compiler: ["gcc"]
218+
NEST_BUILD_TYPE: ["FULL"]
213219
steps:
214220
- name: "Checkout repository content"
215221
uses: actions/checkout@v2
216222
with:
217223
fetch-depth: 0
218224

225+
- name: Download last build...
226+
uses: actions/download-artifact@v3
227+
with:
228+
name: "${{ matrix.NEST_BUILD_TYPE }}-build-${{ matrix.os }}-${{ matrix.cpp_compiler }}"
229+
219230
- name: "Set up Python 3.x"
220231
uses: actions/setup-python@v2
221232
with:
@@ -231,7 +242,7 @@ jobs:
231242
232243
pytest-mac:
233244
runs-on: "macos-latest"
234-
needs: [test_macos]
245+
needs: [build_macos]
235246
steps:
236247
- name: "Checkout repository content"
237248
uses: actions/checkout@v2
@@ -322,7 +333,7 @@ jobs:
322333
make html |& tee sphinx-output.log
323334
324335
- name: Upload artifacts
325-
uses: actions/upload-artifact@v2.3.0
336+
uses: actions/upload-artifact@v3
326337
with:
327338
path: |
328339
build/sphinx-output.log
@@ -361,7 +372,7 @@ jobs:
361372
make html |& tee sphinx-output.log
362373
363374
- name: Upload artifacts
364-
uses: actions/upload-artifact@v2.3.0
375+
uses: actions/upload-artifact@v3
365376
with:
366377
path: |
367378
build/sphinx-output.log
@@ -445,7 +456,7 @@ jobs:
445456
xNEST_BUILD_TYPE: 'STATIC_CODE_ANALYSIS'
446457
CHANGED_FILES: ${{ env.CHANGED_FILES }}
447458

448-
test_linux:
459+
build_linux:
449460
if: ${{ always() && !contains(github.event.head_commit.message, 'ci skip') }}
450461
runs-on: ${{ matrix.os }}
451462
needs: [clang-format, cppcheck, mypy, copyright_headers, unused_names, forbidden_types, pylint, flake8]
@@ -456,18 +467,18 @@ jobs:
456467
matrix:
457468
os: ["ubuntu-20.04"]
458469
cpp_compiler: ["gcc", "clang"]
459-
xNEST_BUILD_TYPE: ["MINIMAL", "MPI_ONLY", "OPENMP_ONLY", "FULL"]
470+
NEST_BUILD_TYPE: ["MINIMAL", "MPI_ONLY", "OPENMP_ONLY", "FULL"]
460471
exclude:
461-
- xNEST_BUILD_TYPE: "MINIMAL"
472+
- NEST_BUILD_TYPE: "MINIMAL"
462473
cpp_compiler: "clang"
463474
os: "ubuntu-20.04"
464-
- xNEST_BUILD_TYPE: "MPI_ONLY"
475+
- NEST_BUILD_TYPE: "MPI_ONLY"
465476
cpp_compiler: "clang"
466477
os: "ubuntu-20.04"
467-
- xNEST_BUILD_TYPE: "OPENMP_ONLY"
478+
- NEST_BUILD_TYPE: "OPENMP_ONLY"
468479
cpp_compiler: "clang"
469480
os: "ubuntu-20.04"
470-
- xNEST_BUILD_TYPE: "FULL"
481+
- NEST_BUILD_TYPE: "FULL"
471482
cpp_compiler: "clang"
472483
os: "ubuntu-20.04"
473484
steps:
@@ -523,9 +534,9 @@ jobs:
523534
$HOME/.ccache
524535
.ccache
525536
/home/runner/.ccache
526-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.xNEST_BUILD_TYPE }}
537+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.NEST_BUILD_TYPE }}
527538
restore-keys: |
528-
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.xNEST_BUILD_TYPE }}
539+
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.NEST_BUILD_TYPE }}
529540
${{ runner.os }}-${{ env.cache-name }}
530541
${{ runner.os }}
531542
@@ -559,35 +570,44 @@ jobs:
559570
python build_support/parse_build_log.py ci_build.sh.log ${{ github.workspace }}
560571
ccache -s
561572
env:
562-
xNEST_BUILD_TYPE: ${{ matrix.xNEST_BUILD_TYPE }}
573+
xNEST_BUILD_TYPE: ${{ matrix.NEST_BUILD_TYPE }}
563574
CMAKE_C_COMPILER_LAUNCHER: ccache
564575
CMAKE_CXX_COMPILER_LAUNCHER: ccache
565576
CHANGED_FILES: ${{ env.CHANGED_FILES }}
566577
#get changed files: https://github.com/marketplace/actions/get-changed-files
567578

568579
- name: "Upload install and test results"
569-
uses: actions/upload-artifact@v2
580+
uses: actions/upload-artifact@v3
570581
if: always()
571582
with:
572-
name: "test_linux-${{ matrix.os }}-${{ matrix.cpp_compiler }}-${{ matrix.xNEST_BUILD_TYPE }}-logs"
583+
name: "${{ matrix.NEST_BUILD_TYPE }}-build-logs-${{ matrix.os }}-${{ matrix.cpp_compiler }}"
573584
path: |
574585
ci_build.sh.log
575586
install_manifest.txt
576587
**.log
577588
build/reports/**
578589
579-
test_macos:
590+
- name: "Upload binary artifacts"
591+
uses: actions/upload-artifact@v3
592+
if: '${{ matrix.NEST_BUILD_TYPE }} == "FULL"'
593+
with:
594+
name: "${{ matrix.NEST_BUILD_TYPE }}-build-${{ matrix.os }}-${{ matrix.cpp_compiler }}"
595+
path: |
596+
build/**
597+
result/**
598+
599+
build_macos:
580600
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
581601
runs-on: ${{ matrix.os }}
582-
needs: [clang-format, cppcheck, mypy, copyright_headers, unused_names, forbidden_types, test_linux]
602+
needs: [clang-format, cppcheck, mypy, copyright_headers, unused_names, forbidden_types, build_linux]
583603
env:
584604
CXX_FLAGS: "-pedantic -Wextra -Woverloaded-virtual -Wno-unknown-pragmas"
585605
strategy:
586606
fail-fast: false
587607
matrix:
588608
os: [macos-latest]
589609
cpp_compiler: ["clang"]
590-
xNEST_BUILD_TYPE: ["FULL_MACOS"]
610+
NEST_BUILD_TYPE: ["FULL_MACOS"]
591611
steps:
592612
- name: "Checkout repository content"
593613
uses: actions/checkout@v2
@@ -627,7 +647,7 @@ jobs:
627647
run: |
628648
python -m pip install --upgrade pip setuptools
629649
python -c "import setuptools; print('package location:', setuptools.__file__)"
630-
python -m pip install --force-reinstall --upgrade scipy "junitparser>=2" numpy pytest pytest-timeout pytest-xdist mpi4py cython matplotlib terminaltables pandoc
650+
python -m pip install --force-reinstall --upgrade scipy 'junitparser>=2' numpy pytest pytest-timeout pytest-xdist mpi4py cython matplotlib terminaltables pandoc
631651
python -c "import pytest; print('package location:', pytest.__file__)"
632652
pip list
633653
@@ -636,24 +656,33 @@ jobs:
636656
./build_support/ci_build.sh 2>&1 | tee ci_build.sh.log
637657
python build_support/parse_build_log.py ci_build.sh.log ${{ github.workspace }}
638658
env:
639-
xNEST_BUILD_TYPE: ${{ matrix.xNEST_BUILD_TYPE }}
659+
xNEST_BUILD_TYPE: ${{ matrix.NEST_BUILD_TYPE }}
640660
CHANGED_FILES: ${{ env.CHANGED_FILES }}
641661
#get changed files: https://github.com/marketplace/actions/get-changed-files
642662

643663
- name: "Upload install and test results"
644-
uses: actions/upload-artifact@v2
664+
uses: actions/upload-artifact@v3
645665
if: ${{ always() }}
646666
with:
647-
name: "test_macos-${{ matrix.os }}-${{ matrix.cpp_compiler }}-${{ matrix.xNEST_BUILD_TYPE }}-logs"
667+
name: "${{ matrix.NEST_BUILD_TYPE }}-build-logs-${{ matrix.os }}-${{ matrix.cpp_compiler }}"
648668
path: |
649669
ci_build.sh.log
650670
install_manifest.txt
651671
**.log
652672
build/reports/**
653673
674+
- name: "Upload binary artifacts"
675+
uses: actions/upload-artifact@v3
676+
#if: '${{ matrix.NEST_BUILD_TYPE }} == "FULL"'
677+
with:
678+
name: "${{ matrix.NEST_BUILD_TYPE }}-build-${{ matrix.os }}-${{ matrix.cpp_compiler }}"
679+
path: |
680+
build/**
681+
result/**
682+
654683
build_conda:
655684
if: false
656-
needs: [test_linux]
685+
needs: [build_linux]
657686
uses: conda-forge/nest-simulator-feedstock/.github/workflows/nest_trigger.yml@f9a89c898b4481931fe6b587c05547b42e758e46
658687
with:
659688
# see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

0 commit comments

Comments
 (0)