Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Mar 17, 2024
1 parent b594813 commit a9febbf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
runs-on: ubuntu-latest
env:
NB: docs/${{ matrix.notebook }}
IMG: ghcr.io/${{ github.repository }}:${{ needs.setup.outputs.hash }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -70,7 +71,7 @@ jobs:
if: ${{ steps.nb-cache.outputs.cache-hit != 'true' }}
run: >
docker run --rm -w /tmp -v ${{ github.workspace }}:/tmp
ghcr.io/${{ github.repository }}:${{ needs.setup.outputs.hash }}
${{ env.IMG }}
jupyter nbconvert --to notebook --execute --inplace
${{ env.EXTRA_ARGS }}
--ExecutePreprocessor.timeout=-1
Expand Down Expand Up @@ -113,7 +114,6 @@ jobs:
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-jb.txt') }}
- name: Install pip dependencies if cache miss
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
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-jb.txt') }}
- name: Install pip dependencies if cache miss
Expand Down
8 changes: 5 additions & 3 deletions env.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM python:3.12.2-slim
# Julia config
ENV JULIA_CI 'true'
ENV JULIA_NUM_THREADS 'auto'
ENV JULIA_CPU_TARGET 'generic;znver3'
# ENV JULIA_CPU_TARGET 'generic;znver3'
# Let PythonCall use built-in python
ENV JULIA_CONDAPKG_BACKEND 'Null'
ENV JULIA_PATH '/usr/local/julia/'
Expand All @@ -13,11 +13,13 @@ ENV PATH ${JULIA_PATH}/bin:${PATH}
COPY --from=julia ${JULIA_PATH} ${JULIA_PATH}

WORKDIR /work

# Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir nbconvert -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Julia dependencies
COPY Project.toml Manifest.toml ./
COPY src/ src
RUN julia --color=yes -e 'using Pkg; Pkg.add(["IJulia"]); import IJulia; IJulia.installkernel("Julia", "--project=@."); Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()'
RUN julia --color=yes -e 'using Pkg; Pkg.add(["IJulia"]); import IJulia; IJulia.installkernel("Julia", "--project=@.")' && \
julia --color=yes --project=@. -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()'
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
matplotlib==3.8.3
nbconvert==7.16.2

0 comments on commit a9febbf

Please sign in to comment.