forked from delta-io/delta-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (112 loc) · 4.11 KB
/
Copy pathbuild.yml
File metadata and controls
137 lines (112 loc) · 4.11 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
name: build
on:
push:
branches: [main, "rust-v*"]
pull_request:
branches: [main, "rust-v*", next, next/*]
merge_group:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
check:
runs-on: ubuntu-latest
env:
DEFAULT_FEATURES: "azure,datafusion,s3,gcs,glue,hdfs"
steps:
# v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./.github/actions/setup-builder
- name: load DAT
run: make setup-dat
- name: Rustfmt Check
# <https://github.com/actions-rust-lang/rustfmt/releases/tag/v1.1.2>
uses: actions-rust-lang/rustfmt@4066006ec54a31931b9b1fddfd38f2fdf2d27143
- name: build and lint with clippy
run: cargo clippy --profile=ci --features ${{ env.DEFAULT_FEATURES }} --tests
- name: Run Machete to check for unused dependencies
uses: bnjbvr/cargo-machete@aa070c61641e482bc2b5d41c97b496ee4755bf37
test-matrix:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.matrix.outputs.os }}
steps:
- name: Define test matrix
id: matrix
run: |
echo 'os=["ubuntu-latest", "windows-latest", "macos-latest"]' >> "$GITHUB_OUTPUT"
build:
needs: test-matrix
strategy:
fail-fast: true
matrix:
os: ${{ fromJSON(needs.test-matrix.outputs.targets) }}
runs-on: ${{ matrix.os }}
env:
DEFAULT_FEATURES: "azure,datafusion,s3,gcs,glue,hdfs"
steps:
# v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./.github/actions/setup-builder
- name: Set up Python 3.13
if: matrix.os == 'windows-latest'
# <https://github.com/actions/setup-python/releases/tag/v6.2.0>
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: 3.13
- name: Default build
run: cargo build --profile=ci --package deltalake
- name: Default features with clippy
run: cargo clippy --profile=ci --features ${{ env.DEFAULT_FEATURES }}
- name: Spot-check build for native-tls features
run: cargo build --profile=ci --package deltalake --no-default-features --features azure,datafusion,s3-native-tls,gcs,glue
- name: Check no default features (except rustls)
run: cargo check --profile=ci --package deltalake --no-default-features --features rustls
test:
name: Unit Tests
needs: test-matrix
strategy:
fail-fast: true
matrix:
os: ${{ fromJSON(needs.test-matrix.outputs.targets) }}
runs-on: ${{ matrix.os }}
env:
DEFAULT_FEATURES: "datafusion"
steps:
# v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./.github/actions/setup-builder
- name: Claim disk space
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo rm -rf /opt/microsoft || true # 783M
sudo rm -rf /usr/local/julia* || true # 1008M
sudo rm -rf /usr/local/share/chromium || true # 613M
sudo rm -rf /usr/local/share/powershell || true # 1244M
sudo rm -rf /usr/share/swift || true # 3207M
sudo df -TBG /
- name: Set up Python 3.13
if: matrix.os == 'windows-latest'
# <https://github.com/actions/setup-python/releases/tag/v6.2.0>
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: 3.13
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests
shell: bash
run: |
make setup-dat
cargo llvm-cov --features ${{ env.DEFAULT_FEATURES }} \
--workspace \
--codecov \
--output-path codecov.json \
--exclude deltalake \
--exclude deltalake-azure \
--exclude deltalake-aws \
--exclude deltalake-hdfs \
--exclude deltalake-lakefs
- uses: ./.github/actions/upload-coverage
with:
token: ${{ secrets.CODECOV_TOKEN }}