Skip to content

Commit

Permalink
Adding a "clippy" example (#3)
Browse files Browse the repository at this point in the history
* scaffold of clippy example

* load-file impl for clippy

* wip: ask impl for clippy

* basic end-to-end working with defaults

* move configuration & prompt into external files

* use correct prompt for Wizard-Vicuna, add ability to skip memex if a general
knowledge question

* remove extra config

* Add source of model used for example

* basic workflow to run clippy / tests

* Setup GIT_HASH env var

* add a cargo config to fix windows builds

* GIT_HASH setup

* fix encoding test

* build all including examples

* cargo fmt
  • Loading branch information
a5huynh committed Jun 13, 2023
1 parent 13edc44 commit 56de330
Show file tree
Hide file tree
Showing 18 changed files with 3,933 additions and 37 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
@@ -0,0 +1,4 @@
[target.'cfg(all(windows, target_env = "msvc"))']
rustflags = [
"-C", "target-feature=+crt-static"
]
52 changes: 52 additions & 0 deletions .github/workflows/check.yml
@@ -0,0 +1,52 @@
name: rust check/build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always
ARCH: x86_64-unknown-linux-gnu
jobs:
build:

runs-on: ubuntu-latest

steps:
# Checkout source code
- uses: actions/checkout@v3
# Setup rust toolchain
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# Should help bring down build times
- uses: Swatinem/rust-cache@v1
with:
key: "1" # increment this to bust the cache if needed
- name: build
env:
GIT_HASH: ${{github.sha}}
run: |
cp .env.template .env
make build-all
# Run tests
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
# Run clippy
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
# make sure we ran fmt
- name: run fmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,5 @@
.env
/target
/data
/resources/*.bin
/**/target

0 comments on commit 56de330

Please sign in to comment.