-
Notifications
You must be signed in to change notification settings - Fork 1
160 lines (136 loc) · 5.27 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
name: CI
on:
push:
branches:
- main
- development
- test*
tags: ['*']
pull_request:
workflow_dispatch:
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:
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions: # needed for julia-actions/cache to delete old caches
actions: write
contents: read
strategy:
fail-fast: false
matrix:
julia-version:
- 'lts' # long-term support
- '1' # to check the latest v1 version
- 'pre' # check upcoming releases
os: ["ubuntu-latest"]
arch: ["x64"]
shell: ["bash"]
compiler: ["g++"]
include:
- os: "macOS-latest"
julia-version: 'lts'
shell: "bash"
compiler: "g++-14"
arch: "arm64"
- os: "macOS-latest"
julia-version: '1'
shell: "bash"
compiler: "g++-14"
arch: "arm64"
- os: "windows-latest"
julia-version: '1'
shell: "msys2"
compiler: "g++"
arch: "x64"
defaults:
run:
shell: ${{ matrix.shell }} {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install ImageMagick on macOS
if: matrix.os == 'macOS-latest'
run: |
brew install imagemagick
brew install ffmpeg
- name: Install MSYS2 on Windows
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-headers-git mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-lapack mingw-w64-x86_64-openblas mingw-w64-x86_64-libxml2 mingw-w64-x86_64-bzip2 mingw-w64-x86_64-python mingw-w64-x86_64-python-zstandard mingw-w64-x86_64-python-cffi make bison flex mingw-w64-x86_64-ca-certificates mingw-w64-x86_64-diffutils
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.arch }}
- name: Add Julia to PATH on Windows
if: matrix.os == 'windows-latest'
run: echo "C:\\hostedtoolcache\\windows\\julia\\${{ matrix.julia-version }}\\${{ matrix.arch }}\\bin" >> $GITHUB_PATH
- name: Set environment variable PHYSICELL_CPP
run: echo "PHYSICELL_CPP=${{ matrix.compiler }}" >> $GITHUB_ENV
- uses: julia-actions/cache@v2
- name: Add PCVCTRegistry (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: julia -e 'import Pkg; Pkg.Registry.add("General"); Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/drbergman/PCVCTRegistry.git"))'
- name: Add PCVCTRegistry (non-Windows)
if: matrix.os != 'windows-latest'
run: julia -e 'import Pkg; Pkg.Registry.add("General"); Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/drbergman/PCVCTRegistry.git"))'
- uses: julia-actions/julia-buildpkg@v1
- name: Install libRoadRunner dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
sudo apt-get install -y ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
- name: Run all tests
uses: julia-actions/julia-runtest@v1
env:
PCVCT_NUM_PARALLEL_SIMS: 8
PHYSICELL_CPP: ${{ matrix.compiler }} # maybe necessary for windows??
PCVCT_PUBLIC_REPO_AUTH: ${{ secrets.PUBLIC_REPO_AUTH }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- name: Add PCVCTRegistry
run: julia -e 'import Pkg; Pkg.Registry.add("General"); Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/drbergman/PCVCTRegistry.git"))'
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- name: Run doctests
shell: julia --project=docs --color=yes {0}
run: |
using Documenter: DocMeta, doctest
using pcvct
DocMeta.setdocmeta!(pcvct, :DocTestSetup, :(using pcvct); recursive=true)
doctest(pcvct)