forked from inkdevhub/drink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from r0gue-io/daan/feat-assets
feat: pop drink
- Loading branch information
Showing
155 changed files
with
9,256 additions
and
6,617 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Git Hooks | ||
|
||
A pre-push hook which checks formatting of Rust files. Additional checks may be added in the future. | ||
|
||
# Prerequisites | ||
|
||
The following prerequisites are required: | ||
|
||
## Rust Nightly | ||
|
||
The nightly version of Rust provides additional formatting benefits over the stable version. | ||
|
||
```shell | ||
rustup toolchain install nightly --profile minimal --component rustfmt | ||
``` | ||
|
||
# Installation | ||
|
||
Use the following command in the root directory of the local repository to configure Git to use the hooks: | ||
|
||
```shell | ||
git config core.hooksPath .githooks | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
# Are deps installed | ||
if ! command -v cargo > /dev/null 2>&1 | ||
then | ||
echo "cargo couldn't be found, please confirm your set up is properly configured." | ||
exit 1 | ||
else | ||
# Check Rust formatting | ||
if ! cargo +nightly fmt --all -- --check | ||
then | ||
echo "There are some code style issues." | ||
# shellcheck disable=SC2006 | ||
echo "Run 'cargo +nightly fmt --all' first." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Initialize | ||
description: This action initializes a runner for use in other actions. | ||
inputs: | ||
cache-key: | ||
description: "The key to be used for the cache" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Ubuntu dependencies | ||
shell: bash | ||
run: sudo apt update && sudo apt install -y protobuf-compiler | ||
|
||
- name: Free up space on runner | ||
shell: bash | ||
run: | | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf /opt/hostedtoolcache/CodeQL | ||
sudo rm -rf /usr/local/.ghcup | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /usr/local/share/boost | ||
sudo rm -rf /usr/local/share/powershell | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /usr/share/swift | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
with: | ||
cache-on-failure: true | ||
cache-all-crates: true | ||
key: ${{ inputs.cache-key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: "./.github/actions/init" | ||
|
||
- name: Check formatting | ||
run: | | ||
rustup toolchain install nightly --profile minimal --component rustfmt | ||
cargo +nightly fmt --all -- --check | ||
check: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
env: | ||
SKIP_WASM_BUILD: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: "./.github/actions/init" | ||
|
||
- name: Check Build | ||
run: | | ||
cargo check --release --locked | ||
clippy: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
env: | ||
RUSTFLAGS: "-Wmissing_docs" | ||
SKIP_WASM_BUILD: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: "./.github/actions/init" | ||
|
||
- name: Annotate with Clippy warnings | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --release --locked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
lint: | ||
name: Validate PR title for conventional commit compliance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Non-default formatting configuration options: use with `cargo +nightly fmt --all` | ||
binop_separator = "Back" | ||
chain_width = 80 | ||
combine_control_expr = false | ||
comment_width = 100 | ||
condense_wildcard_suffixes = true | ||
edition = "2021" | ||
format_code_in_doc_comments = true | ||
format_strings = true | ||
group_imports = "StdExternalCrate" | ||
hard_tabs = true | ||
imports_granularity = "Crate" | ||
match_arm_blocks = false | ||
match_block_trailing_comma = true | ||
newline_style = "Unix" | ||
normalize_comments = true | ||
reorder_impl_items = true | ||
trailing_semicolon = false | ||
unstable_features = true | ||
use_field_init_shorthand = true | ||
# Uses max_width or its default value (100) if not specified. | ||
use_small_heuristics = "Max" | ||
use_try_shorthand = true | ||
wrap_comments = true |
Oops, something went wrong.