forked from spiceai/spiceai
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (82 loc) · 3.18 KB
/
features.yml
File metadata and controls
97 lines (82 loc) · 3.18 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
name: check all features
on:
push:
branches:
- trunk
paths:
- '**/Cargo.toml'
pull_request:
paths:
- '**/Cargo.toml'
workflow_dispatch:
concurrency:
# Allow only one workflow per any non-trunk branch.
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'trunk' && github.sha || 'any-sha' }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
# CI performance optimizations
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_NET_RETRY: 10
CARGO_HTTP_TIMEOUT: 60
jobs:
build:
name: Features Check
runs-on: spiceai-macos
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 1
- name: Set up Rust
uses: ./.github/actions/setup-rust
- name: Set up make
uses: ./.github/actions/setup-make
- name: Set up cc
uses: ./.github/actions/setup-cc
- name: Check if sccache can be set up
run: |
if [ -z "${{ secrets.TEST_MINIO_ENDPOINT }}" ]; then
echo "SCCACHE_SETUP=false" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=" >> $GITHUB_ENV
else
echo "SCCACHE_SETUP=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
fi
- name: Set up sccache
if: ${{ env.SCCACHE_SETUP == 'true' }}
uses: ./.github/actions/setup-sccache
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
- name: Cache cargo-hack binary
id: cache-cargo-hack
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cargo/bin/cargo-hack
key: cargo-hack-${{ runner.os }}-${{ runner.arch }}-0.6.31
- name: Install cargo-hack
if: steps.cache-cargo-hack.outputs.cache-hit != 'true'
run: cargo install cargo-hack --version 0.6.31 --locked
# Use cargo-hack to efficiently check all feature combinations
# This reuses build artifacts between checks, making it much faster than
# running individual cargo check commands
# Note: --each-feature already includes a run with --no-default-features,
# so we don't need to specify it separately
- name: Check all feature combinations
run: |
cargo hack check --each-feature --profile lint \
--exclude-features default,extended_tests,models,cuda,metal,mcp,odbc,release,kafka,iceberg-write,snapshots,tpc-extension,spark,s3_vectors,bedrock,nfs
env:
RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Check runtime/openapi feature
run: cargo check --no-default-features --features runtime/openapi --profile lint
env:
RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Show sccache stats
if: ${{ env.SCCACHE_SETUP == 'true' }}
run: sccache --show-stats