Skip to content

Commit

Permalink
Merge pull request #1501 from charted-dev/feat/smaller-codebase
Browse files Browse the repository at this point in the history
Smaller Codebase
  • Loading branch information
spotlightishere authored Feb 1, 2024
2 parents 9bb6e0b + f6fa352 commit 60ee08c
Show file tree
Hide file tree
Showing 386 changed files with 13,604 additions and 19,993 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ on:
- LICENSE
jobs:
ci:
name: Rust CI (${{matrix.runner == 'ubuntu-latest' && 'Linux (x86_64)' || matrix.runner == 'self-hosted' && 'Linux (arm64)' || matrix.runner == 'macos-latest' && 'macOS (x86_64)' || matrix.runner == 'windows-latest' && 'Windows' || 'Unknown'}}, Rust ${{matrix.rust-version}})
name: Rust CI (${{matrix.runner == 'ubuntu-latest' && 'Linux (x86_64)' || matrix.runner == 'self-hosted' && 'Linux (arm64)' || matrix.runner == 'macos-latest' && 'macOS (x86_64)' || matrix.runner == 'macos-14-arm64' && 'macOS (M1)' || matrix.runner == 'windows-latest' && 'Windows' || 'Unknown'}}, Rust ${{matrix.rust-version}})
runs-on: ${{matrix.runner}}
strategy:
fail-fast: true
Expand All @@ -61,23 +61,36 @@ jobs:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Install `protoc`
uses: Noelware/setup-protoc@1.2.0

- name: Setup `VCPKG_ROOT` environment variable
if: matrix.runner == 'windows-latest'
run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
id: vcpkg
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Setup vcpkg cache
if: matrix.runner == 'windows-latest'
uses: actions/cache@v4
with:
key: vcpkg-cache
path: |
${{steps.vcpkg.outputs.VCPKG_ROOT}}
- name: Install OpenSSL on Windows with `vcpkg`
if: matrix.runner == 'windows-latest'
run: vcpkg install openssl:x64-windows-static-md

- name: Install `protoc`
uses: Noelware/setup-protoc@1.2.0
with:
repo-token: ${{github.token}}

- name: Build project
run: cargo build --all-features

Expand All @@ -88,31 +101,33 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: [stable, nightly]
rust-version: [stable, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Install `protoc`
uses: Noelware/setup-protoc@1.2.0
with:
repo-token: ${{github.token}}

- name: Build project
run: cargo build --all-features

- name: Clippy!
uses: auguwu/clippy-action@1.3.0
with:
all-features: true
token: ${{github.token}}
all-features: true
token: ${{github.token}}
ui:
name: Hoshi CI
runs-on: ubuntu-latest
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/OpenAPI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: stable

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
Expand All @@ -53,8 +53,12 @@ jobs:

- name: Generate OpenAPI document
run: |
cargo run --release --locked --bin charted-cli -- openapi ${GITHUB_WORKSPACE}/assets/openapi.json
bunx prettier --write --config ${GITHUB_WORKSPACE}/web/.prettierrc.json ./assets/openapi.json
cargo run --release --locked -- openapi ${GITHUB_WORKSPACE}/assets/openapi.json
bunx prettier --write --config ${GITHUB_WORKSPACE}/web/.prettierrc.json ./assets/openapi.json
- name: Update OpenAPI types
working-directory: ./web
run: bun generate:openapi

- name: Commit changes (if we can)
uses: EndBug/add-and-commit@v9
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/UpdateProtos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:

- name: Update protos
run: |
curl -fsSL -o ./crates/emails/protos/google/protobuf/struct.proto ${{env.GOOGLE_PROTOBUF_STRUCT_PROTO}}
curl -fsSL -o ./crates/emails/protos/emails.proto ${{env.CHARTED_EMAILS_PROTO}}
curl -fsSL -o ./protos/google/protobuf/struct.proto ${{env.GOOGLE_PROTOBUF_STRUCT_PROTO}}
curl -fsSL -o ./protos/emails.proto ${{env.CHARTED_EMAILS_PROTO}}
- name: Commit!
uses: EndBug/add-and-commit@v9
Expand Down
48 changes: 2 additions & 46 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,48 +1,3 @@
# Created by https://www.toptal.com/developers/gitignore/api/Bazel,Go,Rust,Node,PNPM,JetBrains+All,VisualStudio,VisualStudioCode,Terraform
# Edit at https://www.toptal.com/developers/gitignore?templates=Bazel,Go,Rust,Node,PNPM,JetBrains+All,VisualStudio,VisualStudioCode,Terraform

### Bazel ###
# gitignore template for Bazel build system
# website: https://bazel.build/

# Ignore all bazel-* symlinks. There is no full list since this can change
# based on the name of the directory bazel is cloned into.
/bazel-*

# Directories for the Bazel IntelliJ plugin containing the generated
# IntelliJ project files and plugin configuration. Seperate directories are
# for the IntelliJ, Android Studio and CLion versions of the plugin.
/.ijwb/
/.aswb/
/.clwb/

### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
Expand Down Expand Up @@ -734,11 +689,12 @@ FodyWeavers.xsd

!crates/helm-charts/tests/__fixtures__/*.tgz
!server/src/routing/**/repository/releases/
!src/charts/__fixtures__/*.tgz
!distribution/bin/
!scripts/publish/
.user.bazelrc
!Cargo.lock
config.yml
!src/bin/
.direnv/
.cache/
.data/
Expand Down
49 changes: 0 additions & 49 deletions .noelware/deployment/.terraform.lock.hcl

This file was deleted.

139 changes: 0 additions & 139 deletions .noelware/deployment/main.tf

This file was deleted.

Loading

0 comments on commit 60ee08c

Please sign in to comment.