-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
e5f780b
commit 7d99ed1
Showing
6 changed files
with
44 additions
and
82 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 |
---|---|---|
@@ -1,23 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
open-pull-requests-limit: 1 | ||
schedule: | ||
interval: daily | ||
labels: | ||
- automerge | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
open-pull-requests-limit: 1 | ||
schedule: | ||
interval: daily | ||
labels: | ||
- automerge | ||
- package-ecosystem: docker | ||
directory: "/" | ||
open-pull-requests-limit: 1 | ||
schedule: | ||
interval: daily | ||
labels: | ||
- automerge |
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 |
---|---|---|
|
@@ -13,46 +13,55 @@ concurrency: | |
|
||
env: | ||
NPROC: '2' # Number of Julia processes to run the notebooks | ||
CACHE_NUM: '1' | ||
JULIA_CPU_TARGET: 'generic;haswell,clone_all' | ||
JULIA_NUM_THREADS: 'auto' | ||
JULIA_CONDAPKG_BACKEND: 'Current' | ||
JULIA_CI: 'true' | ||
|
||
jobs: | ||
CI: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
- name: Read Julia version | ||
uses: SebRollen/[email protected] | ||
id: read_toml | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ github.token }} | ||
- name: Get docker image hash | ||
id: img | ||
run: echo "hash=${{ hashFiles('requirements.txt', 'Project.toml', 'Manifest.toml', 'src/**', 'env.Dockerfile') }}" >> "$GITHUB_OUTPUT" | ||
- name: Build Docker container | ||
env: | ||
IMG: ghcr.io/${{ github.repository }}:${{ steps.img.outputs.hash }} | ||
file: 'Manifest.toml' | ||
field: 'julia_version' | ||
- name: Install Julia using jill.sh | ||
run: | | ||
docker manifest inspect ${IMG} && exit 0 | ||
docker build -f env.Dockerfile -t ${IMG} . | ||
docker push ${IMG} | ||
- name: Run Literate notebooks | ||
env: | ||
IMG: ghcr.io/${{ github.repository }}:${{ steps.img.outputs.hash }} | ||
run: > | ||
docker run --rm | ||
-w /tmp -v ${{ github.workspace }}:/tmp | ||
-e JULIA_PROJECT=@. | ||
${IMG} | ||
julia --color=yes -p ${{ env.NPROC }} literate.jl | ||
wget -O /tmp/jill.sh https://raw.githubusercontent.com/abelsiqueira/jill/main/jill.sh | ||
bash /tmp/jill.sh --version ${{ steps.read_toml.outputs.value }} -y | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: Cache Julia deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.julia | ||
!~/.julia/registries | ||
key: ${{ runner.os }}-julia-${{ env.CACHE_NUM }}-${{ hashFiles('src/**','Project.toml', 'Manifest.toml')}} | ||
restore-keys: | | ||
${{ runner.os }}-julia-${{ env.CACHE_NUM }}- | ||
- name: Setup micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: conda.yml | ||
environment-file: environment.yml | ||
cache-environment: true | ||
post-cleanup: all | ||
- name: Install Julia deps | ||
shell: micromamba-shell {0} | ||
run: | | ||
julia --color=yes -e 'using Pkg; Pkg.add(["PrettyTables", "Literate"])' | ||
julia --project=@. --color=yes -e 'using Pkg, Dates; Pkg.instantiate(); Pkg.gc(collect_delay=Day(1))' | ||
- name: Run program | ||
shell: micromamba-shell {0} | ||
env: | ||
JULIA_PROJECT: '@.' | ||
GKSwstype: '100' | ||
run: julia --color=yes -p ${{ env.NPROC }} literate.jl | ||
- name: Build website | ||
shell: micromamba-shell {0} | ||
run: jupyter-book build docs/ | ||
|
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
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
name: ci | ||
|
||
dependencies: | ||
- python>=3.11 | ||
# Jupyter Book | ||
- jupyter-book | ||
- docutils>=0.17.1,<0.18|>=0.20 | ||
# PythonPlot | ||
# - matplotlib | ||
# - libstdcxx-ng<13.0 |
Empty file.