|
| 1 | +name: Test AMUSE framework |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +jobs: |
| 13 | + test: |
| 14 | + runs-on: ${{ matrix.os }} |
| 15 | + |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + os: |
| 20 | + - ubuntu-latest |
| 21 | + - macos-latest |
| 22 | + |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + shell: bash -el {0} |
| 26 | + |
| 27 | + steps: |
| 28 | + - name: Set up conda |
| 29 | + uses: conda-incubator/setup-miniconda@v3 |
| 30 | + with: |
| 31 | + auto-update-conda: true |
| 32 | + channels: conda-forge |
| 33 | + channel-priority: strict |
| 34 | + |
| 35 | + - name: Show conda info |
| 36 | + run: | |
| 37 | + conda info |
| 38 | + conda list |
| 39 | +
|
| 40 | + - name: Install dependencies |
| 41 | + run: | |
| 42 | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake openmpi gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest |
| 43 | +
|
| 44 | + - name: Configure OpenMPI |
| 45 | + run: | |
| 46 | + mkdir -p "$HOME/.openmpi" |
| 47 | + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" |
| 48 | + mkdir -p "$HOME/.prte" |
| 49 | + echo "rmaps_default_mapping_policy = :oversubscribe" >>"$HOME/.prte/mca-params.conf" |
| 50 | +
|
| 51 | + - name: Checkout |
| 52 | + uses: actions/checkout@v4 |
| 53 | + with: |
| 54 | + fetch-depth: 100 |
| 55 | + fetch-tags: true |
| 56 | + |
| 57 | + - name: Build framework |
| 58 | + run: | |
| 59 | + ./setup install amuse-framework |
| 60 | +
|
| 61 | + - name: Test framework |
| 62 | + env: |
| 63 | + OMPI_MCA_rmaps_base_oversubscribe: 1 |
| 64 | + PRTE_MCA_rmaps_base_oversubscribe: 1 |
| 65 | + PRTE_MCA_rmaps_default_mapping_policy: ':oversubscribe' |
| 66 | + OMPI_MCA_btl_tcp_if_include: lo |
| 67 | + OMPI_MCA_pmix_server_max_wait: 10 |
| 68 | + run: | |
| 69 | + ./setup test amuse-framework |
| 70 | +
|
| 71 | + - name: Save build logs |
| 72 | + run: | |
| 73 | + tar czf logs-${{ matrix.os }}.tar.gz support/logs |
| 74 | +
|
| 75 | + - name: Archive build logs |
| 76 | + uses: actions/upload-artifact@v4 |
| 77 | + with: |
| 78 | + name: logs-${{ matrix.os }}.tar.gz |
| 79 | + path: logs-${{ matrix.os }}.tar.gz |
0 commit comments