Skip to content

Commit 98d248e

Browse files
committed
Make build log verbose
1 parent c49caee commit 98d248e

2 files changed

Lines changed: 106 additions & 11 deletions

File tree

.github/workflows/python-test.yml

Lines changed: 96 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,67 @@ concurrency:
1515

1616
env:
1717
CARGO_TERM_COLOR: always
18-
RUSTFLAGS: "-C debuginfo=1"
18+
RUSTFLAGS: "-C debuginfo=0 -C codegen-units=16"
19+
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo-target
1920

2021
jobs:
22+
build-wheel:
23+
runs-on: ubuntu-24.04
24+
timeout-minutes: 30
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up Python 3.11
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: "3.11"
31+
- name: Setup Rust
32+
uses: actions-rust-lang/setup-rust-toolchain@v1
33+
with:
34+
cache: false
35+
- name: Cache Rust build (shared)
36+
uses: actions/cache@v4
37+
with:
38+
path: |
39+
.cargo-target
40+
~/.cargo/registry
41+
~/.cargo/git
42+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
43+
restore-keys: |
44+
${{ runner.os }}-cargo-
45+
- name: Install dependencies
46+
run: |
47+
sudo apt update
48+
sudo apt install -y protobuf-compiler
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v3
51+
- name: Setup sccache
52+
uses: Mozilla-Actions/sccache-action@v0.0.9
53+
- name: Configure sccache
54+
run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
55+
- name: Cache uv downloads
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/.cache/uv
59+
key: ${{ runner.os }}-uv-${{ hashFiles('python/pyproject.toml') }}
60+
restore-keys: |
61+
${{ runner.os }}-uv-
62+
- name: Build wheel (Debug Mode)
63+
working-directory: python
64+
run: |
65+
uv venv
66+
source .venv/bin/activate
67+
uv pip install maturin[patchelf]
68+
maturin build --debug -o dist
69+
- name: Upload wheel
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: python-wheel
73+
path: python/dist/*.whl
74+
2175
test:
2276
runs-on: ubuntu-24.04
2377
timeout-minutes: 30
78+
needs: build-wheel
2479
strategy:
2580
matrix:
2681
python-version: ["3.11"]
@@ -34,28 +89,50 @@ jobs:
3489
uses: actions-rust-lang/setup-rust-toolchain@v1
3590
with:
3691
cache: false
37-
- uses: Swatinem/rust-cache@v2
92+
- name: Cache Rust build (shared)
93+
uses: actions/cache@v4
3894
with:
39-
workspaces: python
40-
cache-targets: false
95+
path: |
96+
.cargo-target
97+
~/.cargo/registry
98+
~/.cargo/git
99+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
100+
restore-keys: |
101+
${{ runner.os }}-cargo-
41102
- name: Install dependencies
42103
run: |
43104
sudo apt update
44105
sudo apt install -y protobuf-compiler
45106
- name: Install uv
46107
uses: astral-sh/setup-uv@v3
108+
- name: Setup sccache
109+
uses: Mozilla-Actions/sccache-action@v0.0.9
110+
- name: Configure sccache
111+
run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
112+
- name: Cache uv downloads
113+
uses: actions/cache@v4
114+
with:
115+
path: ~/.cache/uv
116+
key: ${{ runner.os }}-uv-${{ hashFiles('python/pyproject.toml') }}
117+
restore-keys: |
118+
${{ runner.os }}-uv-
47119
- name: Create virtual environment and install dependencies
48120
working-directory: python
49121
run: |
50122
uv venv
51123
source .venv/bin/activate
52-
uv pip install maturin[patchelf]
53-
uv pip install -e .[tests]
54-
- name: Build Python extension
124+
uv pip install pytest
125+
- name: Download wheel
126+
uses: actions/download-artifact@v4
127+
with:
128+
name: python-wheel
129+
path: python/dist
130+
- name: Install wheel
55131
working-directory: python
56132
run: |
57133
source .venv/bin/activate
58-
maturin develop
134+
uv pip install dist/*.whl
135+
59136
- name: Run tests
60137
working-directory: python
61138
run: |
@@ -80,6 +157,17 @@ jobs:
80157
python-version: "3.11"
81158
- name: Install uv
82159
uses: astral-sh/setup-uv@v3
160+
- name: Setup sccache
161+
uses: Mozilla-Actions/sccache-action@v0.0.9
162+
- name: Configure sccache
163+
run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
164+
- name: Cache uv downloads
165+
uses: actions/cache@v4
166+
with:
167+
path: ~/.cache/uv
168+
key: ${{ runner.os }}-uv-${{ hashFiles('python/pyproject.toml') }}
169+
restore-keys: |
170+
${{ runner.os }}-uv-
83171
- name: Install linting tools
84172
working-directory: python
85173
run: |

.github/workflows/rust-test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ env:
1919
RUSTFLAGS: "-C debuginfo=1"
2020
RUST_BACKTRACE: "1"
2121
CARGO_INCREMENTAL: "0"
22+
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo-target
2223

2324
jobs:
2425
test:
@@ -35,10 +36,16 @@ jobs:
3536
run: |
3637
rustup toolchain install ${{ matrix.toolchain }}
3738
rustup default ${{ matrix.toolchain }}
38-
- uses: Swatinem/rust-cache@v2
39+
- name: Cache Rust build (shared)
40+
uses: actions/cache@v4
3941
with:
40-
workspaces: rust/lance-context
41-
cache-targets: false
42+
path: |
43+
.cargo-target
44+
~/.cargo/registry
45+
~/.cargo/git
46+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
47+
restore-keys: |
48+
${{ runner.os }}-cargo-
4249
- name: Install dependencies
4350
run: |
4451
sudo apt update

0 commit comments

Comments
 (0)