2222 - ubuntu-latest
2323 arch :
2424 - x64
25+
26+ env :
27+ DEVITO_LANGUAGE : " openmp"
28+ DEVITO_ARCH : " gcc"
29+ OMP_NUM_THREADS : " 2"
30+ DEVITO_AUTOPADDING : " 0"
31+ RDMAV_FORK_SAFE : 1
32+
2533 steps :
2634 - uses : actions/checkout@v4
2735 - uses : julia-actions/setup-julia@v2
@@ -30,43 +38,48 @@ jobs:
3038 arch : ${{ matrix.arch }}
3139 - uses : julia-actions/cache@v1
3240
33- - name : install mpi
34- run : sudo apt-get update
35- - run : sudo apt-get install -y mpich libmpich-dev
41+ - name : Setup MPI
42+ uses : mpi4py/setup-mpi@v1
43+ with :
44+ mpi : ' mpich'
3645
3746 - name : download miniconda manually
3847 run : wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh
39-
48+
4049 - name : run install
4150 run : bash Miniconda3-py312_24.5.0-0-Linux-x86_64.sh -b -p $HOME/miniconda
42-
51+
4352 - name : run path export
4453 run : |
4554 echo "$HOME/miniconda/bin:" >> $GITHUB_PATH
4655 echo "PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
4756 echo "PYCALL_JL_RUNTIME_PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
4857 echo "CONDA_EXE=$HOME/miniconda/bin/conda" >> $GITHUB_ENV
4958
50- - name : use system MPI
51- run : julia -e 'using Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_system_binary()'
52-
5359 - name : run build for devito/devitopro
5460 if : matrix.devitoversion == 'devitopro'
5561 run : julia --color=yes --project -e 'using Pkg; Pkg.build(verbose=true)'
5662 env :
5763 DEVITO_PRO : ${{ secrets.DEVITOPRO }}
58-
64+
5965 - name : run build for devito
6066 if : ! matrix.devitoversion != 'devitopro'
6167 run : julia --color=yes --project -e 'using Pkg; Pkg.build(verbose=true)'
6268 env :
6369 DEVITO_BRANCH : ${{ matrix.devitoversion }}
64-
70+
71+ - name : use system MPI
72+ run : |
73+ # https://juliaparallel.org/MPI.jl/latest/configuration/#Configuration-of-the-MPI.jl-testsuite
74+ julia --project -e 'using Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_system_binary()'
75+
6576 # note Pkg.test docs indicate --inline=no can improve coverage
66- - run : julia --color=yes --check-bounds=yes --inline=no --project -e 'using Pkg; Pkg.test(coverage=true)'
67-
77+ - name : run tests
78+ run : |
79+ julia --color=yes --check-bounds=yes --inline=no --project -e 'using Pkg; Pkg.test(coverage=true)'
80+
6881 - uses : julia-actions/julia-processcoverage@v1
69-
82+
7083 - uses : codecov/codecov-action@v1
7184 with :
7285 file : lcov.info
@@ -79,29 +92,29 @@ jobs:
7992 - uses : julia-actions/setup-julia@v2
8093 with :
8194 version : ' 1'
82-
95+
8396 - name : install mpi
8497 run : sudo apt-get update
8598 - run : sudo apt-get install -y mpich
86-
99+
87100 - name : download miniconda manually
88101 run : wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh
89-
102+
90103 - name : run install
91104 run : bash Miniconda3-py312_24.5.0-0-Linux-x86_64.sh -b -p ~/miniconda
92-
105+
93106 - name : run path export
94107 run : |
95108 echo "$HOME/miniconda/bin:" >> $GITHUB_PATH
96109 echo "PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
97110 echo "PYCALL_JL_RUNTIME_PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
98111 echo "CONDA_EXE=$HOME/miniconda/bin/conda" >> $GITHUB_ENV
99112
100- - run : julia --color=yes --project -e 'using Pkg; if VERSION >= v"1.1.0-rc1"; Pkg.build(verbose=true); else Pkg.build(); end '
113+ - run : julia --color=yes --project -e 'using Pkg; Pkg.build() '
101114
102115 - name : Install dependencies
103116 run : julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
104-
117+
105118 - run : |
106119 julia --project=docs -e '
107120 using Pkg
0 commit comments