From 848a61d37175cb74ed4b0e3663da183220596691 Mon Sep 17 00:00:00 2001 From: Bas Date: Sun, 1 Dec 2024 21:07:40 +0100 Subject: [PATCH 1/2] Update 2024 README.md --- 2024/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/2024/README.md b/2024/README.md index aa6fbbd..39f7196 100644 --- a/2024/README.md +++ b/2024/README.md @@ -1,8 +1,10 @@ # Advent of Code 2024 Welcome to my repository, which contains my attempts at solving the -puzzles of [Advent of Code 2024](https://adventofcode.com/2024/). -This year I will try to better document my process and things that -I have learned. Good luck to everyone participating this year! +puzzles of [Advent of Code 2024]. This year I will try to better document +my process and things that I have learned. Good luck to everyone +participating this year! + +[Advent of Code 2024]: https://adventofcode.com/2024/ ## New things I've learned Anything that I learn, and anything that I forgot and now discover, @@ -36,3 +38,12 @@ publication directory. ``` +### LINQ Zip method + +For [Day 1] I needed a way to process two sets of data simultaneously. +Apparently that is exactly what [Zip] does! + +[Day 1]: https://adventofcode.com/2024/day/1 +[Zip]: https://learn.microsoft.com/en-us/dotnet/csharp/linq/standard-query-operators/projection-operations#zip + + From 0c65442a8a4075037d5c9fc8b89c7c1fb178a82b Mon Sep 17 00:00:00 2001 From: Bas Date: Sun, 1 Dec 2024 21:51:19 +0100 Subject: [PATCH 2/2] Add GitHub Actions --- .github/workflows/aoc-2024.yml | 36 ++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/aoc-2024.yml diff --git a/.github/workflows/aoc-2024.yml b/.github/workflows/aoc-2024.yml new file mode 100644 index 0000000..dc77fde --- /dev/null +++ b/.github/workflows/aoc-2024.yml @@ -0,0 +1,36 @@ +name: Advent of Code 2024 + +on: + push: + branches: + - main + paths: + - 2024/** + - 2024.Tests/** + + pull_request: + paths: + - 2024/** + - 2024.Tests/** + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0' + + - name: Restore dependencies + run: dotnet restore Advent-of-Code-2024.sln + + - name: Build project + run: dotnet build Advent-of-Code-2024.sln --no-restore + + - name: Run tests + run: dotnet test 2024.Tests/2024.Tests.csproj --no-build --verbosity normal diff --git a/.gitignore b/.gitignore index 4fb13e4..ef36142 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ .* !.gitignore +# Include GitHub configurations +!.github + # User-specific files *.suo *.user