-
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
Showing
9 changed files
with
157 additions
and
3 deletions.
There are no files selected for viewing
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,50 @@ | ||
name: Documentation | ||
# This is a standard Julia setup for GitHub CI | ||
on: | ||
push: | ||
branches: | ||
- main # update to match your main branch | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
statuses: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: '1' | ||
- uses: julia-actions/cache@v1 | ||
|
||
# Now this is where things focus on the documentation | ||
# build and deployment. | ||
|
||
# IMPORTANT! If your documentation is for a Julia package, | ||
# with formal Julia package structure (`src` folder and top level Project.toml) | ||
# then you need to include this extra step (simply uncomment it): | ||
|
||
- name: Develop local package | ||
run: julia -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()' | ||
|
||
# The next steps continue with the `doc` folder build. | ||
|
||
# This is really all you care about; 2-steps process | ||
# step 1, assumming the documentation Project.toml file is in `docs` folder | ||
- name: Install docs dependencies | ||
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()' | ||
# step 2 (note project path remains the same!) | ||
- name: Build and deploy | ||
env: | ||
# An access token must be provided to "push" the documentation build. | ||
# GitHub automates this via your account with this line: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# See the discussion around "TagBot" in the Documenter.jl website: | ||
# https://documenter.juliadocs.org/stable/man/hosting/#GitHub-Actions | ||
# for automating creating tagged documentation builds after | ||
# registering your package in the Julia General Registry | ||
run: julia --project=docs/ docs/make.jl |
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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
# AdventOfCode2022.jl | ||
My Julia solutions to 2022's Advent of Code | ||
|
||
This package contains my solutions for the 2022 edition of [Advent of Code](https://adventofcode.com/2022) challenges. | ||
Additionally, it provides some useful helpers to download the challenge data and run/benchmark the various days. | ||
|
||
## References | ||
- AoC Solution Time charts: https://www.maurits.vdschee.nl/scatterplot/ | ||
- High-performance Rust solutions: https://github.com/SkiFire13/adventofcode-2022-rs | ||
|
||
See the following links for: | ||
|
||
- [Solution Time charts](https://www.maurits.vdschee.nl/scatterplot/) for the Advent of Code challenges | ||
- Reference [high-performance Rust solutions](https://github.com/SkiFire13/adventofcode-2022-rs) |
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,4 @@ | ||
[deps] | ||
AdventOfCode2022 = "79bfa421-b4fd-41d1-8cfd-e57d9c314976" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" |
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,25 @@ | ||
cd(@__DIR__) # go into `docs` folder | ||
|
||
using Pkg | ||
Pkg.activate(".") | ||
|
||
using Documenter, Literate, AdventOfCode2022 | ||
|
||
# convert tutorial/examples to markdown | ||
Literate.markdown("./src/tutorial.jl", "./src") | ||
|
||
# Which markdown files to compile to HTML | ||
# (which is also the sidebar and the table | ||
# of contents for your documentation) | ||
pages = [ | ||
"Introduction" => "index.md", | ||
"Tutorial" => "tutorial.md", | ||
"API" => "api.md", | ||
] | ||
|
||
# compile to HTML: | ||
makedocs(sitename="AoC2022"; pages, modules=[AdventOfCode2022], remotes=nothing, warnonly=true) | ||
|
||
deploydocs( | ||
repo="github.com/wolthom/AdventOfCode2022.jl.git", | ||
) |
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,4 @@ | ||
# Full API surface | ||
|
||
```@autodocs | ||
``` |
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 @@ | ||
# Hello |
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,22 @@ | ||
# # [AdventOfCode2022.jl Tutorial](@id tutorial) | ||
|
||
# `AdventOfCode2022` is a package that contains solutions and helper functions for the 2022 Advent of Code edition in Julia. | ||
# This tutorial will walk you through its main functionality and how to use the helpers. | ||
# Note: This Tutorial assumes that you have a session token from the Advent of Code website. | ||
|
||
# ## Tutorial - copy-pasteable version | ||
|
||
# ```julia | ||
# using AdventOfCode2022 | ||
# st = ENV["session"] | ||
# @run_days 22 st | ||
# ``` | ||
|
||
# ## Using the package | ||
using AdventOfCode2022 | ||
|
||
# ## Example of retrieving the session key | ||
st = ENV["session"] | ||
|
||
# ## Actually running the solutions | ||
@run_days 22 st |
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,40 @@ | ||
```@meta | ||
EditURL = "tutorial.jl" | ||
``` | ||
|
||
# [AdventOfCode2022.jl Tutorial](@id tutorial) | ||
|
||
`AdventOfCode2022` is a package that contains solutions and helper functions for the 2022 Advent of Code edition in Julia. | ||
This tutorial will walk you through its main functionality and how to use the helpers. | ||
Note: This Tutorial assumes that you have a session token from the Advent of Code website. | ||
|
||
## Tutorial - copy-pasteable version | ||
|
||
```julia | ||
using AdventOfCode2022 | ||
st = ENV["session"] | ||
@run_days 22 st | ||
``` | ||
|
||
## Using the package | ||
|
||
````@example tutorial | ||
using AdventOfCode2022 | ||
```` | ||
|
||
## Example of retrieving the session key | ||
|
||
````@example tutorial | ||
st = ENV["session"] | ||
```` | ||
|
||
## Actually running the solutions | ||
|
||
````@example tutorial | ||
@run_days 22 st | ||
```` | ||
|
||
--- | ||
|
||
*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* | ||
|
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
Example doc string | ||
""" | ||
module AdventOfCode2022 | ||
using Reexport | ||
|
||
|