-
Notifications
You must be signed in to change notification settings - Fork 0
use mise more #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
084eacb
use mise more
asimihsan d985de8
more rust best practices
asimihsan 749616b
install rust first
asimihsan b7a374e
wip
asimihsan ae3cdc3
stop using sccache
asimihsan be45ab1
fix go build
asimihsan 6e39d92
build debug and release
asimihsan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ jobs: | |
| path: | | ||
| ~/.cache/mise | ||
| ~/.local/share/mise | ||
| key: mise-${{ runner.os }}-${{ inputs.cache_suffix }}-${{ hashFiles('mise.toml', 'template/mise.toml.jinja', 'devbox.json', 'devbox.lock') }} | ||
| key: mise-${{ runner.os }}-${{ inputs.cache_suffix }}-${{ hashFiles('mise.toml', 'template/mise.toml.jinja') }} | ||
| restore-keys: | | ||
| mise-${{ runner.os }}-${{ inputs.cache_suffix }}- | ||
| mise-${{ runner.os }}- | ||
|
|
@@ -89,24 +89,24 @@ jobs: | |
| run: | | ||
| echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Run dev-setup.sh | ||
| run: | | ||
| ./scripts/dev-setup.sh | ||
|
|
||
| - name: Setup mise | ||
| uses: jdx/mise-action@v2 | ||
| with: | ||
| install: true | ||
| cache: true | ||
|
|
||
| - name: Setup Devbox | ||
| uses: jetify-com/[email protected] | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Generate Test Project | ||
| run: | | ||
| devbox run copier copy . ../test-project --vcs-ref HEAD \ | ||
| copier copy . ../test-project --vcs-ref HEAD \ | ||
| --data project_name="Test Project" \ | ||
| --data project_slug=test-project \ | ||
| --data project_slug_underscore=test_project \ | ||
| --data author_name="CI Bot" \ | ||
| --data github_username="ci-bot" \ | ||
| --data include_wasm=${{ inputs.wasm }} \ | ||
| --data include_python=${{ inputs.python }} \ | ||
| --data include_go=${{ inputs.go }} \ | ||
|
|
@@ -116,5 +116,6 @@ jobs: | |
| working-directory: ../test-project | ||
| run: | | ||
| git init | ||
| devbox install | ||
| devbox run just setup copyright ci | ||
| ./scripts/dev-setup.sh | ||
| mise install | ||
| just setup copyright ci | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| .devbox | ||
| *.code-workspace |
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| [tools] | ||
| copier = "latest" | ||
| python = "prefix:3.12" |
This file contains hidden or 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,22 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Install mise | ||
| if command -v mise >/dev/null 2>&1; then | ||
| echo "mise is already installed" | ||
| else | ||
| echo "mise is not installed" | ||
| if command -v brew >/dev/null 2>&1; then | ||
| echo "brew is installed" | ||
| brew install mise | ||
| else | ||
| echo "brew is not installed" | ||
| curl https://mise.run | sh | ||
| fi | ||
| fi | ||
|
|
||
| mise settings add idiomatic_version_file_enable_tools rust | ||
|
|
||
| # Need to install rust first | ||
| mise use "rust@prefix:1.87" | ||
This file contains hidden or 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,34 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) | ||
| ROOT_DIR=$(dirname "$SCRIPT_DIR") | ||
| pushd "$ROOT_DIR" | ||
| trap 'popd' EXIT | ||
|
|
||
| cd ~/workplace | ||
|
|
||
| rm -rf ~/workplace/foobaz | ||
| copier copy ~/workplace/copier_rust_template ~/workplace/foobaz \ | ||
| --data include_wasm=true \ | ||
| --data include_python=true \ | ||
| --data include_go=true \ | ||
| --data project_name="Foobaz" \ | ||
| --data project_slug=foobaz \ | ||
| --data project_slug_underscore=foobaz \ | ||
| --data author_name="Local Test" \ | ||
| --data github_username="local-test" \ | ||
| --force | ||
|
|
||
| cd ~/workplace/foobaz | ||
| git init | ||
|
|
||
| ./scripts/dev-setup.sh | ||
| touch mise.lock | ||
| mise trust | ||
| mise install | ||
|
|
||
| just setup copyright ci | ||
| cd go-wasm | ||
| just setup test test-go |
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,15 @@ | ||
| cognitive-complexity-threshold = 10 | ||
| too-many-arguments-threshold = 5 | ||
| type-complexity-threshold = 200 | ||
| msrv = "1.87.0" | ||
|
|
||
| # ---------- Structural size limits ---------- | ||
| cognitive-complexity-threshold = 20 | ||
| enum-variant-size-threshold = 128 # bytes | ||
| excessive-nesting-threshold = 6 | ||
| future-size-threshold = 8192 # bytes; keeps async state small | ||
| too-many-arguments-threshold = 6 | ||
| too-many-lines-threshold = 100 # per-function and per-method | ||
| type-complexity-threshold = 200 | ||
|
|
||
| # ---------- Misc quality-of-life ---------- | ||
| disallowed-methods = [ | ||
| "std::mem::transmute", | ||
| ] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.