From 947279b282d431e6d3c4fa7546a51356d596777d Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 19 Jun 2024 14:15:27 -0400 Subject: [PATCH] Migrate from docker images to micromamba. --- .github/workflows/unit-test.yaml | 35 +++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 52fcd61..2358d7d 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -9,18 +9,25 @@ env: ############################################################################################# # HOOMD-blue version to build. - HOOMD_BLUE_VERSION: 4.7.0 + HOOMD_BLUE_VERSION: trunk-minor # prevent deadlocked MPI tests from causing the job to cancel MPIEXEC_TIMEOUT: 3000 # allow mpirun to execute as root in the tests OMPI_ALLOW_RUN_AS_ROOT: 1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 # allow openmpi to oversubscribe cores - OMPI_MCA_rmaps_base_oversubscribe: 1 + PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe" + OMPI_MCA_rmaps_base_oversubscribe: "true" # prevent errors from mis-configured openib systems OMPI_MCA_btl: "vader,self" + # skip running the CPU tests in GPU builds + _HOOMD_SKIP_CPU_TESTS_WHEN_GPUS_PRESENT_: 1 + # Require GPU tests in GPU builds. + _HOOMD_REQUIRE_GPU_TESTS_IN_GPU_BUILDS_: 1 # import HOOMD out of the build directory PYTHONPATH: ${{ github.workspace }}/install + CONDA_PREFIX: ${{ github.workspace }}/micromamba/envs/test + CMAKE_PREFIX_PATH: ${{ github.workspace }}/micromamba/envs/test concurrency: @@ -41,9 +48,9 @@ defaults: jobs: build_test: name: Build and test [${{ matrix.name }}] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: - image: glotzerlab/ci:2023.11.27-cuda120_gcc11_py310 + image: nvidia/cuda:12.5.0-devel-ubuntu22.04 strategy: fail-fast: false matrix: @@ -67,15 +74,29 @@ jobs: uses: actions/cache/restore@v4 with: path: install - key: hoomd-blue-${{ env.HOOMD_BLUE_VERSION }}-2023.11.27-cuda120_gcc11_py310-mpi-${{ matrix.enable_mpi }}-gpu-${{ matrix.enable_gpu }} + key: hoomd-blue-${{ env.HOOMD_BLUE_VERSION }}-${{ job.container.image }}-${{ matrix.enable_mpi }}-gpu-${{ matrix.enable_gpu }} + - name: Install git + run: | + apt-get update + apt-get install git --yes - name: Checkout HOOMD-blue - if: steps.cache.outputs.cache-hit != 'true' uses: actions/checkout@v4 with: repository: glotzerlab/hoomd-blue path: hoomd-blue submodules: true ref: v${{ env.HOOMD_BLUE_VERSION }} + - name: Create Python Environment + uses: mamba-org/setup-micromamba@v1 + with: + environment-name: test + environment-file: hoomd-blue/.github/workflows/environments/py312-conda-lock.yml + micromamba-root-path: ${{ github.workspace }}/micromamba + + - name: Configure conda environment variables + run: | + echo "$CONDA_PREFIX/bin" >> $GITHUB_PATH - name: Configure HOOMD-blue + - name: Configure HOOMD-blue if: steps.cache.outputs.cache-hit != 'true' run: | @@ -100,7 +121,7 @@ jobs: uses: actions/cache/save@v4 with: path: install - key: hoomd-blue-${{ env.HOOMD_BLUE_VERSION }}-2023.11.27-cuda120_gcc11_py310-mpi-${{ matrix.enable_mpi }}-gpu-${{ matrix.enable_gpu }} + key: hoomd-blue-${{ env.HOOMD_BLUE_VERSION }}-${{ job.container.image }}-${{ matrix.enable_mpi }}-gpu-${{ matrix.enable_gpu }} - name: Checkout component uses: actions/checkout@v4