-
Notifications
You must be signed in to change notification settings - Fork 7
123 lines (108 loc) · 3.4 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
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.8'
- '1.11'
os:
- ubuntu-latest
arch:
- x64
include:
- version: 'pre'
os: ubuntu-latest
arch: x64
experimental: true
steps:
- 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"
- name: Precompile
shell: julia --color=yes --project=. {0}
run: |
using Pkg
using InteractiveUtils
versioninfo()
pkg"instantiate"
pkg"precompile"
using MPI
println("\n", MPI.MPI_LIBRARY_VERSION_STRING)
- uses: julia-actions/julia-buildpkg@v1
- 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 -y mpich libmpich-dev
# For GLMakie (adapted from https://github.com/JuliaPlots/Makie.jl/blob/master/.github/workflows/glmakie.yaml)
sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev ffmpeg
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.11'
- uses: julia-actions/cache@v2
with:
cache-registries: "true"
- name: Add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.add("MPIPreferences")
- name: Use system MPI
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- name: Install dependencies
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: Makie cache
# This is to avoid "generating font cache" on multiple MPI processes,
# which likely leads to race conditions when writing cache to file.
run: |
xvfb-run -s '-screen 0 1200x600x24' julia --project=docs -e '
using GLMakie
fig = Figure()
ax = Axis(fig[1, 1]; title = "aaa")
save("test.png", fig)'
- name: Build and deploy
# Adapted from https://github.com/JuliaPlots/Makie.jl/blob/master/.github/workflows/glmakie.yaml
run: xvfb-run -s '-screen 0 1200x600x24' mpirun -n 2 julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
# vim: shiftwidth=2