Skip to content

Commit cbfa97c

Browse files
authored
Use a Acitons feature matrix to improve build times (#458)
1 parent e3c4232 commit cbfa97c

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "cargo" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
- package-ecosystem: 'github-actions' # See documentation for possible values
9+
directory: '/' # Location of package manifests
1010
schedule:
11-
interval: "weekly"
11+
interval: 'weekly'
12+
13+
- package-ecosystem: 'cargo' # See documentation for possible values
14+
directory: '/' # Location of package manifests
15+
schedule:
16+
interval: 'weekly'

.github/workflows/pr.yaml

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717

1818
- uses: dtolnay/rust-toolchain@stable
1919

@@ -25,36 +25,32 @@ jobs:
2525
- run: cargo clippy --all-features -- -D warnings
2626

2727
build:
28-
name: Build
28+
name: Build (${{ matrix.features }})
2929
runs-on: ubuntu-latest
3030

31+
strategy:
32+
matrix:
33+
features:
34+
- 'no-default-features'
35+
- 'clickhouse'
36+
- 'duckdb'
37+
- 'postgres'
38+
- 'sqlite'
39+
- 'mysql'
40+
- 'flight'
41+
3142
steps:
32-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v5
3344

3445
- uses: dtolnay/rust-toolchain@stable
3546

36-
# Putting this into a GitHub Actions matrix will run a separate job per matrix item, whereas in theory
37-
# this can re-use the existing build cache to go faster.
38-
- name: Build without default features
39-
run: cargo check --no-default-features
40-
41-
- name: Build with only clickhouse
42-
run: cargo check --no-default-features --features clickhouse
43-
44-
- name: Build with only duckdb
45-
run: cargo check --no-default-features --features duckdb
46-
47-
- name: Build with only postgres
48-
run: cargo check --no-default-features --features postgres
49-
50-
- name: Build with only sqlite
51-
run: cargo check --no-default-features --features sqlite
52-
53-
- name: Build with only mysql
54-
run: cargo check --no-default-features --features mysql
55-
56-
- name: Build with only flight
57-
run: cargo check --no-default-features --features flight
47+
- name: Build with ${{ matrix.features }}
48+
run: |
49+
if [ "${{ matrix.features }}" = "no-default-features" ]; then
50+
cargo check --no-default-features
51+
else
52+
cargo check --no-default-features --features ${{ matrix.features }}
53+
fi
5854
5955
integration-test:
6056
name: Tests
@@ -65,7 +61,7 @@ jobs:
6561
MYSQL_DOCKER_IMAGE: public.ecr.aws/ubuntu/mysql:8.0-22.04_beta
6662

6763
steps:
68-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@v5
6965

7066
- uses: dtolnay/rust-toolchain@stable
7167

@@ -116,13 +112,13 @@ jobs:
116112
runs-on: ubuntu-latest
117113

118114
steps:
119-
- uses: actions/checkout@v4
115+
- uses: actions/checkout@v5
120116

121117
- uses: dtolnay/rust-toolchain@stable
122118

123119
- uses: astral-sh/setup-uv@v5
124120
with:
125-
enable-cache: true
121+
enable-cache: true
126122

127123
- name: Install ODBC, Sqlite and Roapi
128124
run: |
@@ -136,7 +132,6 @@ jobs:
136132
uv sync --dev --no-install-package datafusion
137133
uv run --no-project maturin develop --uv
138134
139-
140135
- name: Run Python tests
141136
run: |
142137
cd python/python/tests

0 commit comments

Comments
 (0)