-
Notifications
You must be signed in to change notification settings - Fork 5
130 lines (109 loc) · 4.08 KB
/
ci.yml
File metadata and controls
130 lines (109 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CI
on:
push:
branches: [master]
tags: ["*"]
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.devitoversion }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- lts
- 1 # automatically expands to the latest stable 1.x release of Julia
devitoversion:
- 'main'
- 'devitopro'
- ''
os:
- ubuntu-latest
arch:
- x64
env:
DEVITO_LANGUAGE: "openmp"
DEVITO_ARCH: "gcc"
OMP_NUM_THREADS: "2"
DEVITO_AUTOPADDING: "0"
RDMAV_FORK_SAFE: 1
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: 'openmpi'
- name: download miniconda manually
run: wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh
- name: run install
run: bash Miniconda3-py312_24.5.0-0-Linux-x86_64.sh -b -p $HOME/miniconda
- name: run path export
run: |
echo "$HOME/miniconda/bin:" >> $GITHUB_PATH
echo "PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "PYCALL_JL_RUNTIME_PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "CONDA_EXE=$HOME/miniconda/bin/conda" >> $GITHUB_ENV
- name: run build for devito/devitopro
if: matrix.devitoversion == 'devitopro'
run: julia --color=yes --project -e 'using Pkg; Pkg.build(verbose=true)'
env:
DEVITO_PRO: ${{ secrets.DEVITOPRO }}
- name: run build for devito
if: ! matrix.devitoversion != 'devitopro'
run: julia --color=yes --project -e 'using Pkg; Pkg.build(verbose=true)'
env:
DEVITO_BRANCH: ${{ matrix.devitoversion }}
- name: use system MPI
run: |
# https://juliaparallel.org/MPI.jl/latest/configuration/#Configuration-of-the-MPI.jl-testsuite
julia --project=test -e 'using Pkg; Pkg.instantiate(); Pkg.status(); using MPIPreferences; MPIPreferences.use_system_binary()'
# note Pkg.test docs indicate --inline=no can improve coverage
- name: run tests
run: |
julia --color=yes --check-bounds=yes --inline=no --project -e 'using Pkg; Pkg.test(coverage=true)'
env:
DEVITO_BRANCH: ${{ matrix.devitoversion }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- name: install mpi
run: sudo apt-get update
- run: sudo apt-get install -y mpich
- name: download miniconda manually
run: wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh
- name: run install
run: bash Miniconda3-py312_24.5.0-0-Linux-x86_64.sh -b -p ~/miniconda
- name: run path export
run: |
echo "$HOME/miniconda/bin:" >> $GITHUB_PATH
echo "PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "PYCALL_JL_RUNTIME_PYTHON=$HOME/miniconda/bin/python3" >> $GITHUB_ENV
echo "CONDA_EXE=$HOME/miniconda/bin/conda" >> $GITHUB_ENV
- run: julia --color=yes --project -e 'using Pkg; Pkg.build()'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}