-
Notifications
You must be signed in to change notification settings - Fork 8
142 lines (121 loc) · 4.12 KB
/
ci.yml
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
131
132
133
134
135
136
137
138
139
140
141
142
name: CI
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
experimental: [false]
version:
- '1.10'
- '1.11'
os:
- ubuntu-latest
arch:
- x64
include:
- version: 'pre'
os: ubuntu-latest
arch: x64
experimental: true
steps:
- name: Install libraries
run: |
sudo apt-get update
sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
with:
cache-registries: "true"
- uses: julia-actions/julia-buildpkg@v1
- name: Add MPIPreferences
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.add("MPIPreferences")
- name: Use system MPI + HDF5
shell: julia --color=yes --project=test {0}
run: |
using MPIPreferences, HDF5
MPIPreferences.use_system_binary()
HDF5.API.set_libraries!("/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5.so", "/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5_hl.so")
# This is to fix issue when loading system HDF5. We need to use the system libcurl instead of Julia's.
# Note: LD_PRELOAD needs to be set here *and not before*, otherwise precompilation fails.
- name: Update LD_PRELOAD for system HDF5
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcurl.so.4" >> "$GITHUB_ENV"
# This is to avoid precompilation in parallel when using MPI
- name: Precompile test/
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.instantiate(verbose = true)
Pkg.precompile(strict = false)
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- name: Install libraries
run: |
sudo apt-get update
sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1.11'
- uses: julia-actions/cache@v2
with:
cache-registries: "true"
- name: Add MPIPreferences + Preferences + UUIDs
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.add("MPIPreferences")
Pkg.add("Preferences")
Pkg.add("UUIDs")
- name: Use system MPI + HDF5
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences, Preferences, UUIDs
MPIPreferences.use_system_binary()
Preferences.set_preferences!(
UUID("f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"), # UUID of HDF5.jl
"libhdf5" => "/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5.so",
"libhdf5_hl" => "/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5_hl.so";
force = true,
)
- name: Install docs dependencies
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: Build and deploy
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
# vim: shiftwidth=2