Skip to content

Commit

Permalink
feat: simplified Github workflow by running ci/run_all.sh instead of …
Browse files Browse the repository at this point in the history
…each day separately
  • Loading branch information
jortrr committed Sep 7, 2024
1 parent 6013dde commit 6cf136f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 136 deletions.
12 changes: 12 additions & 0 deletions .aocf/cache/aoc2023_23.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"year": 2023,
"day": 23,
"level": "first",
"title": "A Long Walk",
"stars": null,
"solution": {},
"input": null,
"brief": {
"first": "The Elves resume water filtering operations! Clean water starts flowing over the edge of Island Island.\n\nThey offer to help *you* go over the edge of Island Island, too! Just hold on tight to one end of this impossibly long rope and they'll lower you down a safe distance from the massive waterfall you just created.\n\nAs you finally reach Snow Island, you see that the water isn't really reaching the ground: it's being *absorbed by the air* itself. It looks like you'll finally have a little downtime while the moisture builds up to snow-producing levels. Snow Island is pretty scenic, even without any snow; why not take a walk?\n\nThere's a map of nearby hiking trails (your puzzle input) that indicates *paths* (`.`), *forest* (`#`), and steep *slopes* (`^`, `>`, `v`, and `<`).\n\nFor example:\n\n```\n#.#####################\n#.......#########...###\n#######.#########.#.###\n###.....#.>.>.###.#.###\n###v#####.#v#.###.#.###\n###.>...#.#.#.....#...#\n###v###.#.#.#########.#\n###...#.#.#.......#...#\n#####.#.#.#######.#.###\n#.....#.#.#.......#...#\n#.#####.#.#.#########v#\n#.#...#...#...###...>.#\n#.#.#v#######v###.###v#\n#...#.>.#...>.>.#.###.#\n#####v#.#.###v#.#.###.#\n#.....#...#...#.#.#...#\n#.#########.###.#.#.###\n#...###...#...#...#.###\n###.###.#.###v#####v###\n#...#...#.#.>.>.#.>.###\n#.###.###.#.###.#.#v###\n#.....###...###...#...#\n#####################.#\n\n```\n\nYou're currently on the single path tile in the top row; your goal is to reach the single path tile in the bottom row. Because of all the mist from the waterfall, the slopes are probably quite *icy*; if you step onto a slope tile, your next step must be *downhill* (in the direction the arrow is pointing). To make sure you have the most scenic hike possible, *never step onto the same tile twice*. What is the longest hike you can take?\n\nIn the example above, the longest hike you can take is marked with `O`, and your starting position is marked `S`:\n\n```\n#S#####################\n#OOOOOOO#########...###\n#######O#########.#.###\n###OOOOO#OOO>.###.#.###\n###O#####O#O#.###.#.###\n###OOOOO#O#O#.....#...#\n###v###O#O#O#########.#\n###...#O#O#OOOOOOO#...#\n#####.#O#O#######O#.###\n#.....#O#O#OOOOOOO#...#\n#.#####O#O#O#########v#\n#.#...#OOO#OOO###OOOOO#\n#.#.#v#######O###O###O#\n#...#.>.#...>OOO#O###O#\n#####v#.#.###v#O#O###O#\n#.....#...#...#O#O#OOO#\n#.#########.###O#O#O###\n#...###...#...#OOO#O###\n###.###.#.###v#####O###\n#...#...#.#.>.>.#.>O###\n#.###.###.#.###.#.#O###\n#.....###...###...#OOO#\n#####################O#\n\n```\n\nThis hike contains `*94*` steps. (The other possible hikes you could have taken were `90`, `86`, `82`, `82`, and `74` steps long.)\n\nFind the longest hike you can take through the hiking trails listed on your map. *How many steps long is the longest hike?*\n\nTo begin, [get your puzzle input](23/input).\n\nAnswer:"
}
}
134 changes: 3 additions & 131 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,138 +20,10 @@ jobs:
- name: Run tests
run: cargo test --verbose -- --nocapture

RunDay01:
RunAll:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 01
run: cargo run --bin day01

RunDay02:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 02
run: cargo run --bin day02

RunDay03:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 03
run: cargo run --bin day03

RunDay04:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 04
run: cargo run --bin day04

RunDay05:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 05
run: cargo run --bin day05

RunDay06:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 06
run: cargo run --bin day06

RunDay07:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 07
run: cargo run --bin day07

RunDay08:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 08
run: cargo run --bin day08

RunDay09:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 09
run: cargo run --bin day09

RunDay10:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 10
run: cargo run --bin day10

RunDay11:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 11
run: cargo run --bin day11

RunDay12:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 12
run: cargo run --bin day12

RunDay13:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 13
run: cargo run --bin day13

RunDay14:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 14
run: cargo run --bin day14

RunDay15:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 15
run: cargo run --bin day15

RunDay16:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 16
run: cargo run --bin day16

RunDay18:
runs-on: ubuntu-latest
needs: BuildAndTest
steps:
- uses: actions/checkout@v4
- name: Run AOC day 18
run: cargo run --bin day18
- name: Run all AOC solutions in Release mode
run: time ci/runall.sh
1 change: 1 addition & 0 deletions src/day08.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ impl Parse for Instructions {

#[derive(Debug)]
struct Node {
#[allow(dead_code)]
from_string: String,
label: String,
left: String,
Expand Down
5 changes: 0 additions & 5 deletions src/day16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ impl ContraptionMap {
}
}

fn from_string_slices(input: &Vec<&str>) -> ContraptionMap {
let input: Vec<String> = input.iter().map(|s| s.to_string()).collect();
ContraptionMap::from_strings(&input)
}

fn get_terrain(&self, point: &Point) -> &Terrain {
&self.grid[point.y as usize][point.x as usize]
}
Expand Down
2 changes: 2 additions & 0 deletions src/grid.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unused)]

use aoc::Grid;
use aoc::Int;
use std::fmt::Debug;
Expand Down

0 comments on commit 6cf136f

Please sign in to comment.