Skip to content

Commit

Permalink
Merge branch 'main' into additional-hardware-support
Browse files Browse the repository at this point in the history
# Conflicts:
#	crates/llama-cpp-bindings/Cargo.toml
#	crates/llama-cpp-bindings/build.rs
#	crates/tabby/Cargo.toml
#	crates/tabby/src/main.rs
  • Loading branch information
cromefire committed Dec 10, 2023
2 parents c0804cb + 835d35e commit 4c904ec
Show file tree
Hide file tree
Showing 284 changed files with 8,643 additions and 4,414 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/autofix-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: autofix.ci

on:
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/autofix-python.yml'
- 'python/**'

permissions:
contents: read

concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: chartboost/ruff-action@v1
with:
src: "./python"
args: --fix

- uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches: ["main" ]
paths:
- '.github/workflows/autofix-rust.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**'
Expand All @@ -13,7 +14,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/autofix-tabby-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: autofix.ci

on:
pull_request:
branches: ["main" ]
paths:
- '.github/workflows/autofix-tabby-ui.yml'
- 'ee/tabby-ui/**'

permissions:
contents: read

concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: yarn
cache-dependency-path: 'yarn.lock'

- name: Install dependencies
working-directory: ./ee/tabby-ui
run: yarn install

- name: Lint
working-directory: ./ee/tabby-ui
run: yarn lint:fix

- name: Format
working-directory: ./ee/tabby-ui
run: yarn format:write

- uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc
File renamed without changes.
67 changes: 17 additions & 50 deletions .github/workflows/ci.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ on:
- 'v*'
- 'nightly'
pull_request:
branches: ["main" ]
branches: [ "main" ]
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**'
- 'ee/tabby-webserver/**'
- '.github/workflows/release.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
Expand All @@ -24,56 +21,26 @@ env:
RUST_TOOLCHAIN: 1.73.0

jobs:
tests:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}

- name: Sccache cache
uses: mozilla-actions/[email protected]
with:
version: "v0.4.0"

- name: Cargo registry cache
uses: actions/cache@v3
with:
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }}
restore-keys: |
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
cargo-${{ runner.os }}-
path: |
~/.cargo/registry
~/.cargo/git
- run: bash ./ci/prepare_build_environment.sh

- name: Run unit tests
run: cargo test --bin tabby --lib


release-binary:
if: github.event_name != 'pull_request'
needs: tests
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
binary: [aarch64-apple-darwin, x86_64-manylinux2014, x86_64-manylinux2014-cuda117]
include:
- os: macos-latest
target: aarch64-apple-darwin
binary: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014
container: quay.io/pypa/manylinux2014_x86_64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014-cuda117
container: sameli/manylinux2014_x86_64_cuda_11.7
build_args: --features cuda

env:
SCCACHE_GHA_ENABLED: true
Expand Down Expand Up @@ -114,17 +81,17 @@ jobs:
- run: bash ./ci/prepare_build_environment.sh

- name: Bulid release binary
run: cargo build --release --target ${{ matrix.target }} --package tabby
run: cargo build ${{ matrix.build_args }} --release --target ${{ matrix.target }} --package tabby

- name: Rename release binary
run: mv target/${{ matrix.target }}/release/tabby tabby_${{ matrix.target }}
run: mv target/${{ matrix.target }}/release/tabby tabby_${{ matrix.binary }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
retention-days: 3
name: tabby_${{ matrix.target }}
path: tabby_${{ matrix.target }}
name: tabby_${{ matrix.binary }}
path: tabby_${{ matrix.binary }}

pre-release:
if: github.event_name == 'push'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: Test IntelliJ Plugin
name: Test IntelliJ

on:
push:
branches: [ main ]
paths:
- '.github/workflows/intellij-test.yml'
- 'clients/intellij/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/intellij-test.yml'
- '.github/workflows/test-intellij.yml'
- 'clients/intellij/**'

concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test Rust

on:
pull_request:
branches: [ "main" ]
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**'
- 'ee/tabby-webserver/**'
- '.github/workflows/test-rust.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

env:
RUST_TOOLCHAIN: 1.73.0

jobs:
tests:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}

- name: Sccache cache
uses: mozilla-actions/[email protected]
with:
version: "v0.4.0"

- name: Cargo registry cache
uses: actions/cache@v3
with:
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }}
restore-keys: |
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
cargo-${{ runner.os }}-
path: |
~/.cargo/registry
~/.cargo/git
- run: bash ./ci/prepare_build_environment.sh

- name: Run unit tests
run: cargo test --bin tabby --lib
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
name: Test tabby-agent
name: Test Tabby Agent

on:
push:
branches: [ main ]
paths:
- '.github/workflows/tabby-agent-test.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/tabby-agent-test.yml'
- '.github/workflows/test-tabby-agent.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'

concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: Test tabby-ui
name: Test Tabby UI

on:
push:
branches: [ main ]
paths:
- '.github/workflows/tabby-ui-test.yml'
- 'ee/tabby-ui/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/tabby-ui-test.yml'
- '.github/workflows/test-tabby-ui.yml'
- 'ee/tabby-ui/**'

concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: Test VSCode Extension

on:
push:
branches: [ main ]
paths:
- '.github/workflows/vscode-test.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'
- 'clients/vscode/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/vscode-test.yml'
- '.github/workflows/test-vscode.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'
- 'clients/vscode/**'

concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
Loading

0 comments on commit 4c904ec

Please sign in to comment.