-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (140 loc) · 4.81 KB
/
Copy pathCI.yml
File metadata and controls
140 lines (140 loc) · 4.81 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
131
132
133
134
135
136
137
138
139
140
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:
check_versions:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Get Julia versions
id: versions
run: |
STABLE=$(curl -s https://julialang-s3.julialang.org/bin/versions.json | jq -r '.stable.version')
LATEST=$(curl -s https://julialang-s3.julialang.org/bin/versions.json | jq -r '.latest.version')
PRE=$(curl -s https://julialang-s3.julialang.org/bin/versions.json | jq -r '.pre.version')
echo "STABLE=$STABLE" >> $GITHUB_OUTPUT
echo "LATEST=$LATEST" >> $GITHUB_OUTPUT
echo "PRE=$PRE" >> $GITHUB_OUTPUT
- name: Set matrix
id: set-matrix
run: |
if [ "${{ steps.versions.outputs.PRE }}" != "null" ] && [ "${{ steps.versions.outputs.PRE }}" != "${{ steps.versions.outputs.LATEST }}" ]; then
echo "matrix={\"version\":[\"${{ steps.versions.outputs.STABLE }}\",\"${{ steps.versions.outputs.LATEST }}\",\"${{ steps.versions.outputs.PRE }}\"]}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
else
echo "matrix={\"version\":[\"${{ steps.versions.outputs.STABLE }}\",\"${{ steps.versions.outputs.LATEST }}\"]}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
fi
test:
needs: check_versions
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- '1'
- 'pre'
os:
- ubuntu-latest
build_is_production_build:
- true
arch:
- x64
include:
- os: windows-latest
arch: x64
version: 1
build_is_production_build: true
- os: macOS-latest
arch: aarch64
version: 1
build_is_production_build: true
steps:
- name: Install matplotlib
run: if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get install -y python3-matplotlib; fi
shell: bash
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
BUILD_IS_PRODUCTION_BUILD: ${{ matrix.build_is_production_build }}
with:
coverage: false
- uses: julia-actions/julia-processcoverage@v1
test-with-code-coverage:
name: Julia ${{ matrix.julia_version }} - ${{ matrix.os }} - ${{ matrix.julia_arch }} - with code coverage
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
julia_version:
- "1.10"
- "1.11"
- "pre"
julia_arch:
- x64
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install matplotlib
run: if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get install -y python3-matplotlib; fi
shell: bash
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
arch: ${{ matrix.julia_arch }}
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-runtest@v1
env:
BUILD_IS_PRODUCTION_BUILD: false
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
continue-on-error: true
docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- name: Build PyCall
run: julia --project=docs/ -e 'ENV["PYTHON"]=""; using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.build("PyCall")'
shell: bash
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}