-
Notifications
You must be signed in to change notification settings - Fork 3
160 lines (125 loc) · 4.01 KB
/
Copy pathci.yml
File metadata and controls
160 lines (125 loc) · 4.01 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
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]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version:
- "1.10" # LTS
- "1" # stable
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v2
# Install Rust toolchain for building the companion crate
- uses: dtolnay/rust-toolchain@stable
# Build the Rust cdylib (with icechunk feature, enabled by default)
- name: Build libzarrs_jl
run: julia --project deps/build.jl
# Run core tests
- name: Run tests
uses: julia-actions/julia-runtest@v1
test-icechunk:
name: Icechunk tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/cache@v2
- uses: dtolnay/rust-toolchain@stable
- name: Build libzarrs_jl
run: julia --project deps/build.jl
- name: Instantiate test environment
run: julia --project -e 'using Pkg; Pkg.instantiate()'
- name: Run Icechunk tests
run: julia --project -e '
using Pkg; Pkg.test(test_args=["icechunk"])'
test-no-icechunk:
name: Tests without icechunk feature
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/cache@v2
- uses: dtolnay/rust-toolchain@stable
- name: Build libzarrs_jl without icechunk
run: |
cd deps/zarrs_jl
cargo build --release --no-default-features
cd ../..
julia --project deps/build.jl
- name: Run core tests (no icechunk)
run: julia --project -e '
using Pkg; Pkg.test(test_args=["core"])'
compat:
name: Cross-language compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/cache@v2
- uses: dtolnay/rust-toolchain@stable
# Install uv for Python fixture generation
- uses: astral-sh/setup-uv@v5
- name: Build libzarrs_jl
run: julia --project deps/build.jl
- name: Instantiate test environment
run: julia --project -e 'using Pkg; Pkg.instantiate()'
# Generate fixtures
- name: Generate Python fixtures
run: uv run test/fixtures/generate_python.py
- name: Generate Zarrs.jl fixtures
run: julia --project test/fixtures/generate_zarrs_jl.jl
# Run compatibility tests
- name: Python compatibility tests
run: julia --project -e '
using Pkg; Pkg.test(test_args=["compat_zarr_python"])'
- name: Zarrs.jl self-compatibility tests
run: julia --project -e '
using Pkg; Pkg.test(test_args=["compat_zarrs"])'
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/cache@v2
- uses: dtolnay/rust-toolchain@stable
- name: Build libzarrs_jl
run: julia --project deps/build.jl
- name: Install dependencies
run: julia --project=docs -e '
using Pkg;
Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- name: Build and deploy docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=docs docs/make.jl