-
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
1 parent
e12e860
commit bec2a20
Showing
2 changed files
with
35 additions
and
14 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 |
---|---|---|
|
@@ -16,24 +16,29 @@ env: | |
EXTRA_ARGS: '' # Extra arguments for nbconvert | ||
PYTHON_VER: '3.11' | ||
JULIA_CPU_TARGET: 'generic;haswell,clone_all' | ||
JULIA_NUM_THREADS: auto | ||
JULIA_NUM_THREADS: 'auto' | ||
JULIA_CONDAPKG_BACKEND: 'Null' | ||
JULIA_CI: 'true' | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: julia:1.9.3 | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Read Julia version | ||
uses: SebRollen/[email protected] | ||
id: read_toml | ||
with: | ||
python-version: ${{ env.PYTHON_VER }} | ||
file: 'Manifest.toml' | ||
field: 'julia_version' | ||
- name: Install Julia using jill.sh | ||
run: | | ||
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: | ||
|
@@ -43,9 +48,13 @@ jobs: | |
~/.julia/packages | ||
~/.julia/environments | ||
~/.local/share/jupyter/ | ||
key: ${{ runner.os }}-juliacontainer-${{ hashFiles('src/**','Project.toml', 'Manifest.toml')}} | ||
key: ${{ runner.os }}-jill-${{ hashFiles('src/**','Project.toml', 'Manifest.toml')}} | ||
restore-keys: | | ||
${{ runner.os }}-juliacontainer- | ||
${{ runner.os }}-jill- | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VER }} | ||
- name: Install Julia deps | ||
env: | ||
PYTHON: ${{ env.pythonLocation }}/python | ||
|
@@ -73,8 +82,6 @@ jobs: | |
# Notebooks need to be executed | ||
notebook: ${{ fromJSON(needs.setup.outputs.matrix) }} | ||
runs-on: ubuntu-latest | ||
container: | ||
image: julia:1.9.3 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -85,11 +92,26 @@ jobs: | |
path: docs/${{ matrix.notebook }} | ||
key: ${{ runner.os }}-notebook-${{ hashFiles(format('docs/{0}', matrix.notebook), 'src/**', 'Project.toml', 'Manifest.toml') }} | ||
- name: Setup Python | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VER }} | ||
- name: Install Python deps | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
run: python -m pip install --no-cache-dir nbconvert -r requirements.txt | ||
- name: Read Julia version | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
uses: SebRollen/[email protected] | ||
id: read_toml | ||
with: | ||
file: 'Manifest.toml' | ||
field: 'julia_version' | ||
- name: Install Julia using jill.sh | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
run: | | ||
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 | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
uses: actions/cache@v3 | ||
|
@@ -100,9 +122,7 @@ jobs: | |
~/.julia/packages | ||
~/.julia/environments | ||
~/.local/share/jupyter/ | ||
key: ${{ runner.os }}-juliacontainer-${{ hashFiles('src/**','Project.toml', 'Manifest.toml', 'requirements.txt')}} | ||
restore-keys: | | ||
${{ runner.os }}-juliacontainer- | ||
key: ${{ runner.os }}-juliacontainer-${{ hashFiles('src/**','Project.toml', 'Manifest.toml')}} | ||
- name: Execute Notebook | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
run: > | ||
|
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