-
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
dd147e1
commit d8ed124
Showing
1 changed file
with
6 additions
and
33 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 |
---|---|---|
|
@@ -12,16 +12,16 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
env: | ||
NPROC: '2' # Number of Julia processes to run the notebooks | ||
CACHE_NUM: '2' | ||
NPROC: '3' # Number of Julia processes to run the notebooks | ||
# CACHE_NUM: '2' | ||
JULIA_CONDAPKG_BACKEND: 'Null' | ||
JULIA_CI: 'true' | ||
JULIA_NUM_THREADS: '2' | ||
JULIA_CPU_TARGET: 'generic;znver3' | ||
# JULIA_CPU_TARGET: 'generic;znver3' | ||
|
||
jobs: | ||
CI: | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -30,15 +30,7 @@ jobs: | |
id: cp | ||
with: | ||
python-version: '3.x' | ||
- name: Cache pip dependencies | ||
uses: actions/cache@v4 | ||
id: cache-py | ||
with: | ||
save-always: 'true' | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-pip-${{ steps.cp.outputs.python-version }}-${{ hashFiles('requirements.txt') }} | ||
- name: Install pip dependencies if cache miss | ||
if: ${{ steps.cache-py.outputs.cache-hit != 'true' }} | ||
run: pip install -r requirements.txt | ||
- name: Read Julia version | ||
uses: SebRollen/[email protected] | ||
|
@@ -50,39 +42,20 @@ jobs: | |
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ steps.read_toml.outputs.value }} | ||
- name: Restore Julia packages | ||
uses: actions/cache/restore@v4 | ||
id: cache-julia | ||
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: Install Julia packages | ||
if: ${{ steps.cache-julia.outputs.cache-hit != 'true' }} | ||
env: | ||
PYTHON: ${{ env.pythonLocation }}/python | ||
run: julia --color=yes instantiate.jl | ||
- name: Save Julia packages | ||
uses: actions/cache/save@v4 | ||
if: ${{ steps.cache-julia.outputs.cache-hit != 'true' }} | ||
with: | ||
path: | | ||
~/.julia | ||
!~/.julia/registries | ||
key: ${{ steps.cache-julia.outputs.cache-primary-key }} | ||
- name: Cache literate notebooks | ||
uses: actions/cache@v4 | ||
id: cache-nb | ||
with: | ||
path: | | ||
docs/**/*.ipynb | ||
docs/**/*.sha | ||
key: ${{ steps.cache-julia.outputs.cache-primary-key }}-nb-${{ hashFiles('docs/**/*.jl') }} | ||
key: ${{ hashFiles('**/*.toml', 'scr/*') }}-nb-${{ hashFiles('docs/**/*.jl') }} | ||
restore-keys: | | ||
${{ steps.cache-julia.outputs.cache-primary-key }}-nb- | ||
${{ hashFiles('**/*.toml', 'scr/*') }}-nb- | ||
- name: Run literate notebooks | ||
if: ${{ steps.cache-nb.outputs.cache-hit != 'true' }} | ||
run: julia --color=yes -p ${{ env.NPROC }} literate.jl | ||
|