-
Notifications
You must be signed in to change notification settings - Fork 2
145 lines (144 loc) · 4.25 KB
/
Copy pathCI.yml
File metadata and controls
145 lines (144 loc) · 4.25 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
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:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
outputs:
# Expose matched filters as job 'packages' output variable
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
Bitshuffle:
- ChunkCodecCore/**
- ChunkCodecTests/**
- Bitshuffle/**
ChunkCodecCore:
- ChunkCodecCore/**
- ChunkCodecTests/**
LibAec:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibAec/**
LibBlosc:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibBlosc/**
LibBrotli:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibBrotli/**
LibBzip2:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibBzip2/**
LibLz4:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibLz4/**
LibLzma:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibLzma/**
LibSnappy:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibSnappy/**
LibZlib:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibZlib/**
LibZstd:
- ChunkCodecCore/**
- ChunkCodecTests/**
- LibZstd/**
test:
name: Julia ${{ matrix.version }} - ${{matrix.package}} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
needs: changes
strategy:
fail-fast: false
matrix:
# Parse JSON array containing names of all filters matching any of changed files
# e.g. ['package1', 'package2'] if both package folders contains changes
package: ${{ fromJSON(needs.changes.outputs.packages) }}
os:
- ubuntu-latest
- windows-latest
- macos-latest
version:
- '1.6'
- 'pre'
arch:
- 'default'
- 'x86'
exclude:
- os: macos-latest
arch: 'x86'
- os: ubuntu-latest
version: '1.6'
arch: 'x86'
- os: windows-latest
version: '1.6'
- os: macos-latest
version: '1.6'
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
show-versioninfo: true
project: ${{matrix.package}}
- uses: julia-actions/cache@v3
- name: Run the tests
shell: julia --color=yes {0}
run: |
@static if VERSION >= v"1.12"
using Pkg
Pkg.Registry.update()
Pkg.activate("${{ matrix.package }}")
Pkg.test()
else
using Pkg
using TOML
Pkg.Registry.update()
Pkg.activate(;temp=true)
# force it to use this PR's version of the package
ENV["JULIA_PKG_DEVDIR"]= mktempdir()
Pkg.develop(unique([
(;path="${{ matrix.package }}"),
(;path="ChunkCodecCore"),
(;path="ChunkCodecTests"),
# Hack to test Bitshuffle on Julia 1.6 before new LibZstd/LibLz4 are released
(;path="LibZstd"),
(;path="LibLz4"),
]))
Pkg.update()
Pkg.test(TOML.parsefile("${{ matrix.package }}/Project.toml")["name"]; coverage=true)
end
- uses: julia-actions/julia-processcoverage@v1
with:
directories: ${{matrix.package}}/src
- uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
files: lcov.info