generated from fspoettel/advent-of-code-rust
-
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.
- Loading branch information
0 parents
commit 866ac6f
Showing
35 changed files
with
2,877 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
[alias] | ||
today = "run --quiet --release --features today -- today" | ||
scaffold = "run --quiet --release -- scaffold" | ||
download = "run --quiet --release -- download" | ||
read = "run --quiet --release -- read" | ||
|
||
solve = "run --quiet --release -- solve" | ||
all = "run --quiet --release -- all" | ||
time = "run --quiet --release -- time" | ||
|
||
[env] | ||
AOC_YEAR = "2023" |
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,6 @@ | ||
{ | ||
"name": "rust-devcontainer", | ||
"image": "mcr.microsoft.com/devcontainers/rust:latest", | ||
"postCreateCommand": "rustc --version", | ||
"remoteUser": "vscode" | ||
} |
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,17 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
root = true | ||
|
||
[*] | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.txt] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,33 @@ | ||
name: Continuous Integration | ||
|
||
on: push | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
name: Continuous Integration | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up cargo cache | ||
uses: actions/cache@v4 | ||
continue-on-error: false | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo- | ||
- name: cargo test | ||
run: cargo test | ||
# uncomment to enable clippy linter | ||
# - name: cargo clippy | ||
# run: cargo clippy -- -D warnings | ||
# uncomment to enable format linter | ||
# - name: cargo fmt | ||
# run: cargo fmt --check |
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 @@ | ||
name: Update readme ⭐️ progress | ||
|
||
on: | ||
# !Please set a different minute than 51 if you enable this! | ||
# schedule: | ||
# - cron: "51 */6 * * *" # Every 6 hours | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-readme: | ||
runs-on: ubuntu-latest | ||
if: ${{ vars.AOC_ENABLED == 'true' }} | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: k2bd/advent-readme-stars@v1 | ||
with: | ||
userId: ${{ secrets.AOC_USER_ID }} | ||
sessionCookie: ${{ secrets.AOC_SESSION }} | ||
year: ${{ secrets.AOC_YEAR }} | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "update readme progress" |
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,30 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
|
||
# Added by cargo | ||
|
||
/target | ||
|
||
# Advent of Code | ||
# @see https://old.reddit.com/r/adventofcode/comments/k99rod/sharing_input_data_were_we_requested_not_to/gf2ukkf/?context=3 | ||
|
||
data/inputs/* | ||
!data/inputs/.keep | ||
data/puzzles/* | ||
!data/puzzles/.keep | ||
|
||
# Dhat | ||
dhat-heap.json | ||
|
||
# Benchmarks | ||
|
||
data/timings.json |
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,7 @@ | ||
{ | ||
"recommendations": [ | ||
"vadimcn.vscode-lldb", | ||
"rust-lang.rust-analyzer", | ||
"editorConfig.editorConfig" | ||
] | ||
} |
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,58 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests for a solution", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
// replace `01` here with the solution you like to debug. | ||
"--bin=01", | ||
"--package=advent_of_code" | ||
], | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug a solution", | ||
"cargo": { | ||
"args": [ | ||
"build", | ||
// replace `01` here with the solution you like to debug. | ||
"--bin=01", | ||
"--package=advent_of_code" | ||
], | ||
}, | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests in library 'advent_of_code'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--lib", | ||
"--features=test_lib", | ||
"--package=advent_of_code" | ||
], | ||
"filter": { | ||
"name": "advent_of_code", | ||
"kind": "lib" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
Oops, something went wrong.