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 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 + +