Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Install

# Verifies the `cargo install fire_seq_search_server` path end to end: that the
# crate tarball installs, and that the resulting binary is on PATH and runs.
#
# Master + manual only, deliberately. This is a release-profile build with a
# bundled SQLite compiled from C, so it costs minutes rather than seconds, and
# ci.yml's `cargo test` + `cargo package` already gate every PR.
#
# Linux + macOS, because the bundled-SQLite C build and the ~/.cargo/bin PATH
# setup are the platform-specific parts, and those are the two platforms users
# actually `cargo install` on.
on:
push:
branches: [ master ]
workflow_dispatch:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

concurrency:
# Never cancel a master run mid-flight; github.run_id gives each commit its
# own group. Matches ci.yml.
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_id || github.ref }}
cancel-in-progress: true

jobs:
install:
name: cargo install (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
# One platform failing shouldn't hide the other's result.
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
defaults:
run:
working-directory: fire_seq_search_server
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: fire_seq_search_server

# --no-verify because the install below compiles the same tree anyway;
# ci.yml runs the verifying `cargo package` on every PR.
- name: Package
run: cargo package --locked --no-verify

# Install from the *extracted tarball*, not `--path .`. `cargo install
# --path` ignores Cargo.toml's `exclude`, so it would happily build
# against files that never ship to crates.io — exactly the breakage this
# job exists to catch. The tarball is what users actually get.
- name: Install from the packaged tarball
run: |
version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
cargo install --locked --path "target/package/fire_seq_search_server-${version}"

# Bare command, no ./target path: proves ~/.cargo/bin is on PATH and the
# binary starts. --version is clap-derived from CARGO_PKG_VERSION.
- name: Verify the installed binary
working-directory: .
run: fire_seq_search_server --version
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,41 @@ Built and tested against current Rust stable; see
[`.github/workflows/ci.yml`](.github/workflows/ci.yml).

```
git clone https://github.com/Endle/fireSeqSearch
cd fireSeqSearch/fire_seq_search_server
cargo build --release
cargo install fire_seq_search_server
```

This puts `fire_seq_search_server` on your `PATH` (in `~/.cargo/bin`). The
first install builds a bundled SQLite from source, so expect it to take a few
minutes.

#### Logseq

```
./target/release/fire_seq_search_server --notebook-path /home/you/logseq_notebook
fire_seq_search_server --notebook-path /home/you/logseq_notebook
```

#### Obsidian

```
./target/release/fire_seq_search_server --notebook-path /home/you/vault --notebook obsidian
fire_seq_search_server --notebook-path /home/you/vault --notebook obsidian
```

The server hosts endpoints on `http://127.0.0.1:3030`. The extension talks to
it from your browser.

#### Building from source instead

For development, or to run an unreleased revision:

```
git clone https://github.com/Endle/fireSeqSearch
cd fireSeqSearch/fire_seq_search_server
cargo build --release
```

The binary lands at `target/release/fire_seq_search_server` — use that path in
place of the bare command above.

### 3. Browser extension

Firefox only: <https://addons.mozilla.org/en-US/firefox/addon/fireseqsearch/>
Expand Down
Loading