diff --git a/.github/workflows/ci-stage-2.yml b/.github/workflows/ci-stage-2.yml index 510cfd95..1f137615 100644 --- a/.github/workflows/ci-stage-2.yml +++ b/.github/workflows/ci-stage-2.yml @@ -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 diff --git a/docker/pythia-testenv b/docker/pythia-testenv index c58bfb81..fd68bbef 100644 --- a/docker/pythia-testenv +++ b/docker/pythia-testenv @@ -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} @@ -12,7 +12,7 @@ LABEL maintainer="Brad Aagaard " 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} @@ -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 diff --git a/tests/pytests/mpi/test_application.py b/tests/pytests/mpi/test_application.py index c372b2aa..457a3618 100644 --- a/tests/pytests/mpi/test_application.py +++ b/tests/pytests/mpi/test_application.py @@ -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)