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
13 changes: 7 additions & 6 deletions .github/workflows/ci-stage-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-24.10
- ubuntu-26.04
- ubuntu-26.10
- debian-testing
- fedora-39
- fedora-40
- rockylinux-8
- fedora-44
- fedora-45
- fedora-46
- rockylinux-9
- rockylinux-10

runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: recursive

Expand Down
10 changes: 5 additions & 5 deletions docker/pythia-testenv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


ARG BASE_IMAGE
from ${BASE_IMAGE} as setup
FROM ${BASE_IMAGE} AS setup
ARG TEST_COVERAGE=no
ARG PYTHON_COVERAGE=coverage3
ENV TEST_COVERAGE=${TEST_COVERAGE} PYTHON_COVERAGE=${PYTHON_COVERAGE}
Expand All @@ -12,7 +12,7 @@ LABEL maintainer="Brad Aagaard <baagaard@usgs.gov>"
USER ${TEST_USER}

# ------------------------------------------------------------------------------
from setup as configure
FROM setup AS configure

ENV src_dir=${TOPSRC_DIR}/pythia build_dir=${TOPBUILD_DIR}/pythia
COPY --chown=pylith-tester:pylith-tester . ${src_dir}
Expand All @@ -25,15 +25,15 @@ WORKDIR ${build_dir}
RUN ${src_dir}/configure --enable-testing --prefix=${INSTALL_DIR} --enable-test-coverage=${TEST_COVERAGE} --with-python-coverage=${PYTHON_COVERAGE} CPPFLAGS=-I${INSTALL_DIR}/include LDFLAGS="-L${INSTALL_DIR}/lib -L${INSTALL_DIR}/lib64 --coverage" CXXFLAGS="-g -O --coverage"

# ------------------------------------------------------------------------------
from configure as build
FROM configure AS build

RUN make -j$(nproc) && make install

# Want source directory as current directory for running test coverage script via test runner.
# Want source directory AS current directory for running test coverage script via test runner.
WORKDIR ${src_dir}

# ------------------------------------------------------------------------------
from build as test
FROM build AS test

WORKDIR ${build_dir}
RUN make check VERBOSE=1
Expand Down
4 changes: 3 additions & 1 deletion tests/pytests/mpi/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ def test_constructor(self):
self.assertEqual("mpiapp", app.name)

def test_run(self):
max_cores = 2
app = MPIApp()
app.nodes = 3
n_cores = len(os.sched_getaffinity(0))
app.nodes = min(max_cores, n_cores) if n_cores > 0 else max_cores
app.run(argv=["mpiapp", "--launcher.command=mpiexec -n ${nodes} -host localhost:${nodes}"])
for node in range(app.nodes):
filename = app.log_filename(node)
Expand Down
Loading