Skip to content

Commit

Permalink
feat: init (#1)
Browse files Browse the repository at this point in the history
* feat: add initial setup

* fix: ci
  • Loading branch information
cs50victor authored Jan 18, 2024
1 parent 857e2d0 commit 3353b38
Show file tree
Hide file tree
Showing 43 changed files with 10,342 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NEXT_PUBLIC_LK_TOKEN_ENDPOINT=""

OPENAI_API_KEY=""
OPENAI_ORG_ID=""
19 changes: 19 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", ":disableDependencyDashboard"],
"dependencyDashboardAutoclose": true,
"lockFileMaintenance": { "enabled": false },
"packageRules": [
{
"matchPackagePatterns": ["*"],
"matchUpdateTypes": ["minor", "patch"],
"groupName": "all non-major depedencies",
"groupSlug": "all minor patches"
}
],
"prConcurrentLimit": 1,
"prCreation": "not-pending",
"prHourlyLimit": 1,
"schedule": ["after 5pm on monday"],
"stabilityDays": 2
}
59 changes: 59 additions & 0 deletions .github/workflows/ci-rs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI-RS

on:
push:
paths:
- "**/new_media/**"
- "**/Cargo.lock"
- "**/Cargo.toml"
- "**/rust-toolchain"
- "**/.taplo.toml"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
ci-rs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust-toolchain:
- nightly

steps:
- name: Get source code
uses: actions/checkout@v3

- name: Setup ${{ matrix.rust-toolchain }} rust toolchain with caching
uses: brndnmtthws/rust-action@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy
enable-sccache: "true"

- name: Install binaries
run: sudo apt-get update && sudo apt-get install -y clang pkg-config libavfilter-dev libavdevice-dev libavcodec-dev libavformat-dev libavutil-dev

- name: Build
run: cargo build --release # --verbose

- name: Test
run: cargo test --release # --verbose

- name: Lint
run: cargo fmt --all -- --check
# && cargo clippy --verbose -- -D warnings

# - name: Bloat Check
# uses: cs50victor/cargo-bloat-action@master
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# kv_token: ${{ secrets.KV_TOKEN }}
# included_packages: "lkgpt"
41 changes: 41 additions & 0 deletions .github/workflows/ci-ts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI-TS

on:
push:
paths:
- "**/demo/**"
- "**/ci-ts.yml"
- "**/.eslintrc.json"
- "**/.node-version"
- "**/package.json"
- "**/pnpm-lock.yaml"
workflow_dispatch:

env:
CI: true

# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false

jobs:
ci-ts:
runs-on: ubuntu-latest

steps:
- name: Checkout Sources
uses: actions/checkout@v3

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

# Will figure out a better way to do these later
- name: Install Global Dependencies
run: bun install --ignore-scripts

# Errors out on build when separated into multiple steps
- name: Install, Build, and Lint Demo
run: cd demo && bun install --ignore-scripts && bun run build && bun run lint
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Rust
target/

# ggml binaries & other binaries in general
*.bin
# local splat files
**/splats/*

# dependencies
node_modules
.pnp
.pnp.js

# testing
/coverage

# next.js
.next/
/out/
# next.js experimatal https
certificates

# production
/build

# misc
.DS_Store
*.pem
.idea
.vscode

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# typescript
*.tsbuildinfo
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.10.0
Loading

0 comments on commit 3353b38

Please sign in to comment.