Repository navigation
81 lines (74 loc) · 3.48 KB
/
Copy pathrust-publish.yml
File metadata and controls
81 lines (74 loc) · 3.48 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
name: Rust Publish
on:
release:
types:
- released
pull_request:
paths:
- .github/workflows/rust-publish.yml
workflow_dispatch:
inputs:
mode:
description: "dry_run: build & test only, release: build & publish to crates.io"
required: true
default: dry_run
type: choice
options:
- dry_run
- release
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C debuginfo=0 -C target-cpu=x86-64-v3"
RUST_BACKTRACE: "1"
CARGO_INCREMENTAL: "0"
CARGO_BUILD_JOBS: "1"
jobs:
publish:
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# No `toolchain:` input — the action reads `rust-toolchain.toml`, so the
# SHIPPED artifact is built with the pinned channel rather than whatever
# `stable` is that week. Same shape style.yml already uses for rustfmt.
components: rustfmt, clippy
cache: false
- uses: rui314/setup-mold@v1
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
# Every `lance-graph` feature EXCEPT the TWO that do not build. `--all-features`
# turns both on and fails the verification build this step runs before
# publishing. Measured on this tree: `cargo check -p lance-graph --all-features`
# exits 101; this list exits 0.
#
# aws-sdk — ours, opt-in by design. `aws-smithy-json 0.63.0` does not
# compile against `aws-smithy-types 1.7.0` (full reasoning at
# the `lance` entry in the workspace `Cargo.toml`). The feature
# exists so the capability stays addressable by name.
# lancedb-sdk — NOT ours, and it predates the `aws-sdk` flag: `lancedb 0.38.0`
# declares `default = []`, gates `Error::Http` behind
# `#[cfg(feature = "remote")]` (`src/error.rs:111`), but leaves
# `pub mod job;` ungated (`src/lib.rs:188`) while `job.rs` uses
# `Error::Http` unconditionally. The crate therefore cannot
# compile at all without `remote`. So `--all-features` has been
# broken here since the lancedb 0.38 bump — invisibly, because
# this is the only workflow that passes it and it never runs on
# push (`release: released` / `workflow_dispatch` only).
# See ISS-LANCEDB-038-NEEDS-REMOTE-TO-COMPILE.
#
# The cost of spelling the list out, stated rather than hidden: a feature added
# to `crates/lance-graph/Cargo.toml` later is NOT covered here, where
# `--all-features` would have picked it up for free. Add it in the same PR.
# See ISS-PUBLISH-FEATURE-LIST-CAN-DRIFT.
args: "--features unity-catalog,ndarray-hpc,with-cam-pq,planner,bgz17-codec,tensor-codec,lite-unified"
path: crates/lance-graph
dry-run: ${{ github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'dry_run') }}