Import aoc2026 history into 2026/
test / AoC 2024 (push) Failing after 22s
test / AoC 2024 (push) Failing after 22s
git-subtree-dir: 2026 git-subtree-mainline:70a284ca0fgit-subtree-split:144d63eb66
This commit is contained in:
134 files changed
+2714
-267
No files matched your search
@@ -0,0 +1,62 @@
|
||||
name: test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: AoC 2024
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: setup toolchain
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
cache: true
|
||||
components: clippy, rustfmt
|
||||
toolchain: stable
|
||||
rustflags: ""
|
||||
|
||||
- name: install cargo-aoc
|
||||
run: cargo install --locked cargo-aoc
|
||||
|
||||
- name: get date
|
||||
id: date
|
||||
run: |
|
||||
echo date=$(date +%Y%m%d) > $GITHUB_OUTPUT
|
||||
|
||||
- name: Get cached inputs
|
||||
id: inputs
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: input
|
||||
key: ${{ steps.date.outputs.date }}
|
||||
|
||||
- name: Get inputs from source
|
||||
if: steps.inputs.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cargo aoc credentials ${{ secrets.AOC_SESSION }}
|
||||
for i in $(seq 1 25); do
|
||||
dayfmt=$(printf %02d $i)
|
||||
if [ ${{ steps.date.outputs.date }} -ge 202412${dayfmt} ]; then
|
||||
cargo aoc input --year 2024 --day $i
|
||||
fi
|
||||
done
|
||||
|
||||
- name: cargo test
|
||||
run: cargo test --lib
|
||||
|
||||
- name: rustfmt
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: clippy
|
||||
run: cargo clippy --lib --tests -- -D warnings
|
||||
if: always()
|
||||
|
||||
- name: full run
|
||||
run: cargo run --release
|
||||
if: always()
|
||||
Reference in new issue
Block a user