-
Notifications
You must be signed in to change notification settings - Fork 10
168 lines (148 loc) · 4.62 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
# test using MPICH as MPI backend (default in MPI.jl)
test-MPICH-jll:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
os:
- ubuntu-latest
- macos-13
- windows-latest
steps:
- name: Enable long paths on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # or true if you want CI to fail when Codecov fails
file: lcov.info
# test OpenMPI by requesting it with MPIPreferences
# adapted from MPI.jl
test-OpenMPI-jll:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - OpenMPI_jll - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version:
- '1.9'
os:
- ubuntu-latest
fail-fast: false
env:
JULIA_MPI_TEST_BINARY: OpenMPI_jll
JULIA_MPI_TEST_ABI: OpenMPI
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- name: use OpenMPI_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.instantiate()
using MPIPreferences
MPIPreferences.use_jll_binary("OpenMPI_jll")
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@v1
# # CI is getting too slow!
# test system MPI using Brew in macOS
# adapted from MPI.jl
test-system-MPI-brew:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.mpi }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- macos-13
mpi:
- mpich
- openmpi
env:
JULIA_MPI_TEST_BINARY: system
ZES_ENABLE_SYSMAN: 1 # https://github.com/open-mpi/ompi/issues/10142
steps:
- uses: actions/checkout@v4
- name: Install MPI via homebrew
run: |
brew install "${{ matrix.mpi }}"
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- name: use system MPI
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.instantiate()
using MPIPreferences
mpi_prefix = readchomp(`brew --prefix ${{ matrix.mpi }}`)
libdir = joinpath(mpi_prefix, "lib")
MPIPreferences.use_system_binary(; extra_paths=[libdir])
run(`sed -i.bu 's/unknown/MPICH/' test/LocalPreferences.toml`) # fix wrong abi detection for mpich
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@v1
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using Pigeons
DocMeta.setdocmeta!(Pigeons, :DocTestSetup, :(using Pigeons); recursive=true)
doctest(Pigeons)'