-
Notifications
You must be signed in to change notification settings - Fork 5
110 lines (106 loc) · 3.55 KB
/
ci.yaml
File metadata and controls
110 lines (106 loc) · 3.55 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
name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
duckdb-version: "1.5.1"
jobs:
test:
name: Test
runs-on: ${{ matrix.os.runner }}
env:
DUCKDB_LIB_DIR: ${{ github.workspace }}/opt/duckdb
LD_LIBRARY_PATH: ${{ github.workspace }}/opt/duckdb
DYLD_LIBRARY_PATH: ${{ github.workspace }}/opt/duckdb
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
os:
- runner: ubuntu-latest
duckdb-slug: linux-amd64
include:
- python-version: "3.11"
os:
runner: macos-latest
duckdb-slug: osx-universal
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: true
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: ${{ matrix.python-version }}
cache-dependency-glob: |
pyproject.toml
uv.lock
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Install libduckdb
run: |
curl -L -o libduckdb-${{ matrix.os.duckdb-slug }}.zip https://github.com/duckdb/duckdb/releases/download/v${{ env.duckdb-version }}/libduckdb-${{ matrix.os.duckdb-slug }}.zip
mkdir -p ${{ github.workspace }}/opt/duckdb
unzip libduckdb-${{ matrix.os.duckdb-slug }}.zip -d ${{ github.workspace }}/opt/duckdb
- name: Install GDAL
if: runner.os == 'macOS'
run: brew install gdal
- name: Sync
run: uv sync --all-extras
- name: Lint
run: scripts/lint
- name: Test
run: scripts/test
- name: Sync w/o extras
run: uv sync
- name: Test w/o extras
run: uv run pytest
- name: Check docs
# not worth it to install cairo on macos
if: runner.os == 'ubuntu-latest'
run: uv run mkdocs build --strict
build-windows:
name: Build (Windows)
runs-on: windows-latest
env:
MATURIN_PEP517_ARGS: --features duckdb-bundled
RUSTFLAGS: -C link-arg=Rstrtmgr.lib
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: true
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.11"
cache-dependency-glob: |
pyproject.toml
uv.lock
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Sync
run: uv sync
import:
name: Import
runs-on: ubuntu-latest
env:
DUCKDB_LIB_DIR: ${{ github.workspace }}/opt/duckdb
LD_LIBRARY_PATH: ${{ github.workspace }}/opt/duckdb
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: true
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Install libduckdb
run: |
wget https://github.com/duckdb/duckdb/releases/download/v${{ env.duckdb-version }}/libduckdb-linux-amd64.zip
mkdir -p ${{ github.workspace }}/opt/duckdb
unzip libduckdb-linux-amd64.zip -d ${{ github.workspace }}/opt/duckdb
- name: Import
run: uv run --no-default-groups python -c "import rustac"