Compare commits

..

1 Commits

Author SHA1 Message Date
release-plz-for-ac-qu-ai-nt[bot]
a810686285 chore: release 2024-10-11 06:49:45 +00:00
14 changed files with 46 additions and 254 deletions

View File

@@ -18,35 +18,23 @@ env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
audit-and-deny-and-clippy-and-formatting: formatting-and-deny:
name: Check cargo-audit, cargo-deny, clippy, and formatting name: Check formatting and cargo-deny
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4 timeout-minutes: 2
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install stable Rust toolchain - name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
- name: Install cargo-audit
uses: taiki-e/install-action@cargo-audit
- uses: Swatinem/rust-cache@v2
- name: cargo-audit
run: cargo-audit audit --deny warnings
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
- name: Clippy
run: cargo clippy
env:
RUSTFLAGS: "--deny warnings"
- name: Formatting - name: Formatting
run: cargo fmt --check --verbose run: cargo fmt --check --verbose
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
check-and-build: check-and-build:
strategy: strategy:
matrix: matrix:
@@ -100,7 +88,7 @@ jobs:
target: x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc
name: Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} name: Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }}
runs-on: ${{ matrix.supporteds.runner }} runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 8 timeout-minutes: 5
env: env:
# https://github.com/rust-lang/stacker/issues/80#issuecomment-1547991131 # https://github.com/rust-lang/stacker/issues/80#issuecomment-1547991131
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
@@ -177,7 +165,7 @@ jobs:
target: x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc
name: Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) name: Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
runs-on: ${{ matrix.supporteds.runner }} runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 8 timeout-minutes: 5
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -205,56 +193,42 @@ jobs:
msrv: msrv:
strategy: strategy:
matrix: matrix:
crate_directory:
- ./core
- ./cli-clap
- ./gui-eframe
- ./tui-ratatui
- ./multibinary
supporteds: supporteds:
- runner: macos-latest - runner: macos-latest
target: aarch64-apple-darwin target: aarch64-apple-darwin
- runner: macos-latest
target: x86_64-apple-darwin
- runner: ubuntu-latest - runner: ubuntu-latest
target: x86_64-unknown-linux-gnu target: x86_64-unknown-linux-gnu
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ - runner: windows-latest
runner: ubuntu-latest
target: x86_64-unknown-linux-musl
- prerequisite_step: rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup update
runner: windows-latest
target: x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc
name: Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) name: Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
runs-on: ${{ matrix.supporteds.runner }} runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 8 timeout-minutes: 4
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2 - name: Install stable Rust toolchain
with: uses: dtolnay/rust-toolchain@stable
shared-key: ${{ matrix.supporteds.target }}-latest-variable
cache-on-failure: "true"
- name: Run prerequisite setup step
if: matrix.supporteds.prerequisite_step
run: ${{ matrix.supporteds.prerequisite_step }}
- name: Install cargo-msrv - name: Install cargo-msrv
uses: taiki-e/install-action@v2 uses: taiki-e/install-action@v2
with: with:
tool: cargo-msrv tool: cargo-msrv
- name: Verify core's declared MSRV (minimum supported Rust version) - uses: Swatinem/rust-cache@v2
run: cargo-msrv verify --output-format json with:
working-directory: ./core shared-key: ${{ matrix.supporteds.target }}-latest-variable
- name: Verify cli-clap's declared MSRV (minimum supported Rust version) cache-on-failure: "true"
run: cargo-msrv verify --output-format json
working-directory: ./cli-clap - name: Verify declared MSRV (minimum supported Rust version)
- name: Verify gui-eframe's declared MSRV (minimum supported Rust version) run: cargo msrv verify --output-format json
run: cargo-msrv verify --output-format json working-directory: ${{ matrix.crate_directory }}
working-directory: ./gui-eframe
- name: Verify tui-ratatui's declared MSRV (minimum supported Rust version)
run: cargo-msrv verify --output-format json
working-directory: ./tui-ratatui
- name: Verify multibinary's declared MSRV (minimum supported Rust version)
run: cargo-msrv verify --output-format json
working-directory: ./multibinary

View File

@@ -1,157 +0,0 @@
name: Daily
on:
schedule:
- cron: "41 23 * * *"
jobs:
audit:
name: Use `cargo-audit` to create issues for vulnerabilities or other problems
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
check-and-build-with-nightly:
strategy:
matrix:
supporteds:
- runner: macos-latest
target: aarch64-apple-darwin
- runner: macos-latest
target: x86_64-apple-darwin
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools gcc-aarch64-linux-gnu g++-aarch64-linux-gnu && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools gcc-aarch64-linux-gnu g++-aarch64-linux-gnu && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: aarch64-unknown-linux-musl
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: x86_64-unknown-linux-musl
# I would like to support this but I don't know how to install the dependencies to be able to
# - runner: windows-latest
# target: aarch64-pc-windows-gnullvm
- runner: windows-latest
target: aarch64-pc-windows-msvc
# I don't think supporting this is up to me
# I forgot where I learned this, but
# I don't think I can use a non-Rust dependency (i.e. llama.cpp) here
# - runner: windows-latest
# target: x86_64-pc-windows-gnu
- runner: windows-latest
target: x86_64-pc-windows-msvc
name: Check and build ${{ matrix.supporteds.target }} with nightly Rust (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }}
runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 8
env:
# https://github.com/rust-lang/stacker/issues/80#issuecomment-1547991131
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc # TODO: shouldn't this be something to do with musl, not gcc?
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install prerequisite build chain
if: matrix.supporteds.install_prerequisite
run: ${{ matrix.supporteds.install_prerequisite }}
- name: Install nightly Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.supporteds.target }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.supporteds.target }}-latest-nightly
cache-on-failure: "true"
- name: Check
run: cargo check --verbose
- name: Build
run: cargo build --verbose
test-with-nightly:
strategy:
matrix:
supporteds:
- runner: macos-latest
target: aarch64-apple-darwin
- runner: macos-latest
target: x86_64-apple-darwin
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: ubuntu-latest
# target: aarch64-unknown-linux-musl
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: x86_64-unknown-linux-musl
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: windows-latest
# target: aarch64-pc-windows-gnullvm
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: windows-latest
# target: aarch64-pc-windows-msvc
# I don't think supporting this is up to me
# I forgot where I learned this, but
# I don't think I can use a non-Rust dependency (i.e. llama.cpp) here
# - runner: windows-latest
# target: x86_64-pc-windows-gnu
- runner: windows-latest
target: x86_64-pc-windows-msvc
name: Test ${{ matrix.supporteds.target }} with nightly Rust (on ${{ matrix.supporteds.runner }})
runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 8
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install prerequisite build chain
if: matrix.supporteds.install_prerequisite
run: ${{ matrix.supporteds.install_prerequisite }}
- name: Install nightly Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.supporteds.target }}
- name: Install Nextest
uses: taiki-e/install-action@cargo-nextest
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.supporteds.target }}-latest-nightly
cache-on-failure: "true"
- name: Test
run: cargo nextest run --target ${{ matrix.supporteds.target }}

View File

@@ -20,18 +20,13 @@ jobs:
with: with:
app-id: ${{ secrets.RELEASE_PLZ_GITHUB_APP_ID }} app-id: ${{ secrets.RELEASE_PLZ_GITHUB_APP_ID }}
private-key: ${{ secrets.RELEASE_PLZ_GITHUB_APP_SECRET }} private-key: ${{ secrets.RELEASE_PLZ_GITHUB_APP_SECRET }}
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }} token: ${{ steps.generate-token.outputs.token }}
- name: Install Rust toolchain - name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run release-plz - name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5 uses: MarcoIeni/release-plz-action@v0.5
env: env:

10
Cargo.lock generated
View File

@@ -134,9 +134,9 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.1.29" version = "1.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58e804ac3194a48bb129643eb1d62fcc20d18c6b8c181704489353d13120bcd1" checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1"
dependencies = [ dependencies = [
"jobserver", "jobserver",
"libc", "libc",
@@ -384,8 +384,7 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]] [[package]]
name = "llama-cpp-2" name = "llama-cpp-2"
version = "0.1.82" version = "0.1.82"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/babichjacob/llama-cpp-rs?branch=fix-use-c-char-instead-of-i8#92bef3a7d2dbd49af9e22cf44a30b33bb0af9202"
checksum = "e40528912f1212003f65912c0ad1d2d2d0302e53557e0ea3cd12b5706a9223ca"
dependencies = [ dependencies = [
"enumflags2", "enumflags2",
"llama-cpp-sys-2", "llama-cpp-sys-2",
@@ -396,8 +395,7 @@ dependencies = [
[[package]] [[package]]
name = "llama-cpp-sys-2" name = "llama-cpp-sys-2"
version = "0.1.82" version = "0.1.82"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/babichjacob/llama-cpp-rs?branch=fix-use-c-char-instead-of-i8#92bef3a7d2dbd49af9e22cf44a30b33bb0af9202"
checksum = "ccfde3214b7b8bcc25448198df1add0630695c7a2773a60400572bf5156b9335"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cc", "cc",

View File

@@ -11,3 +11,6 @@ repository = "https://github.com/babichjacob/ac-qu-ai-nt"
clap = "4" clap = "4"
snafu = "0.8" snafu = "0.8"
tracing = "0.1.23" tracing = "0.1.23"
[patch.crates-io]
llama-cpp-2 = { version = "0.1.81", git = "https://github.com/babichjacob/llama-cpp-rs", branch = "fix-use-c-char-instead-of-i8" }

View File

@@ -7,17 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.0.9](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.8...ac-qu-ai-nt-cli-clap-v0.0.9) - 2024-10-15 ## [0.0.9](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.8...ac-qu-ai-nt-cli-clap-v0.0.9) - 2024-10-11
### Fixed ### Fixed
- *(ac-qu-ai-nt-cli-clap)* write a `main` function instead of re-exporting so that the declared MSRV can be met - *(ac-qu-ai-nt-cli-clap)* write a `main` function instead of re-exporting so that the declared MSRV can be met
### Other
- *(cli-clap)* ignore the `Args` argument because it doesn't get used yet (to satisfy Clippy)
- build out the infrastructure for commands to be passed to the clap CLI
## [0.0.8](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.7...ac-qu-ai-nt-cli-clap-v0.0.8) - 2024-10-07 ## [0.0.8](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.7...ac-qu-ai-nt-cli-clap-v0.0.8) - 2024-10-07
### Other ### Other

View File

@@ -1,15 +1,4 @@
use clap::{Parser, Subcommand}; pub fn main() {
#[derive(Debug, Subcommand)]
enum Command {}
#[derive(Debug, Parser)]
pub struct Args {
#[command(subcommand)]
command: Command,
}
pub fn main(_args: Args) {
#[cfg(feature = "tracing")] #[cfg(feature = "tracing")]
tracing::info!("What's up, world?"); tracing::info!("What's up, world?");
} }

View File

@@ -1,7 +1,3 @@
use clap::Parser;
fn main() { fn main() {
let args = ac_qu_ai_nt_cli_clap::Args::parse(); ac_qu_ai_nt_cli_clap::main();
ac_qu_ai_nt_cli_clap::main(args);
} }

View File

@@ -7,11 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.0.4](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-core-v0.0.3...ac-qu-ai-nt-core-v0.0.4) - 2024-10-15 ## [0.0.4](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-core-v0.0.3...ac-qu-ai-nt-core-v0.0.4) - 2024-10-11
### Other ### Other
- update `llama-cpp-2` and other packages
- *(ac-qu-ai-nt-core)* update `llama-cpp-2` - *(ac-qu-ai-nt-core)* update `llama-cpp-2`
- *(core)* add `snafu` as a dependency - *(core)* add `snafu` as a dependency

View File

@@ -14,7 +14,7 @@ default = ["tracing"]
tracing = ["dep:tracing"] tracing = ["dep:tracing"]
[dependencies] [dependencies]
llama-cpp-2 = "0.1.82" llama-cpp-2 = "0.1.81"
snafu = { workspace = true } snafu = { workspace = true }
tracing = { workspace = true, optional = true } tracing = { workspace = true, optional = true }

View File

@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.0.6](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-gui-eframe-v0.0.5...ac-qu-ai-nt-gui-eframe-v0.0.6) - 2024-10-15 ## [0.0.6](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-gui-eframe-v0.0.5...ac-qu-ai-nt-gui-eframe-v0.0.6) - 2024-10-11
### Fixed ### Fixed

View File

@@ -7,11 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.0.13](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.12...ac-qu-ai-nt-v0.0.13) - 2024-10-15 ## [0.0.13](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.12...ac-qu-ai-nt-v0.0.13) - 2024-10-11
### Other ### Other
- build out the infrastructure for commands to be passed to the clap CLI - update Cargo.lock dependencies
## [0.0.12](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.11...ac-qu-ai-nt-v0.0.12) - 2024-10-07 ## [0.0.12](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.11...ac-qu-ai-nt-v0.0.12) - 2024-10-07

View File

@@ -19,7 +19,7 @@ struct Args {
enum Command { enum Command {
#[cfg(feature = "cli-clap")] #[cfg(feature = "cli-clap")]
#[command(alias = "cli")] #[command(alias = "cli")]
CliClap(ac_qu_ai_nt_cli_clap::Args), CliClap,
#[cfg(feature = "gui-eframe")] #[cfg(feature = "gui-eframe")]
#[command(alias = "gui")] #[command(alias = "gui")]
GuiEframe, GuiEframe,
@@ -57,7 +57,7 @@ fn main() {
match command { match command {
#[cfg(feature = "cli-clap")] #[cfg(feature = "cli-clap")]
Command::CliClap(args) => ac_qu_ai_nt_cli_clap::main(args), Command::CliClap => ac_qu_ai_nt_cli_clap::main(),
#[cfg(feature = "gui-eframe")] #[cfg(feature = "gui-eframe")]
Command::GuiEframe => ac_qu_ai_nt_gui_eframe::main(), Command::GuiEframe => ac_qu_ai_nt_gui_eframe::main(),
#[cfg(feature = "tui-ratatui")] #[cfg(feature = "tui-ratatui")]

View File

@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.0.6](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-tui-ratatui-v0.0.5...ac-qu-ai-nt-tui-ratatui-v0.0.6) - 2024-10-15 ## [0.0.6](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-tui-ratatui-v0.0.5...ac-qu-ai-nt-tui-ratatui-v0.0.6) - 2024-10-11
### Fixed ### Fixed