Skip to content

Commit 44aa949

Browse files
committed
Always build PyCall in CI
1 parent 4765695 commit 44aa949

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,15 @@ jobs:
5353
with:
5454
python-version: ${{ matrix.pyversion }}
5555

56+
# Always build PyCall (and hence Conda) so that Conda's root env directory exists;
57+
# otherwise Conda fails to precompile on cached runners, which can cause errors.
58+
# Use a temporary environment because `--project=test` has no manifest on Julia
59+
# versions without workspace support (< 1.12).
5660
- name: Build PyCall
57-
if: ${{ matrix.pythonexe == 'python' }}
5861
run: |
59-
julia --project=test -e 'import Pkg; Pkg.build("PyCall")'
62+
julia -e 'import Pkg; Pkg.activate(temp=true); Pkg.add("PyCall"); Pkg.build("PyCall")'
6063
env:
61-
PYTHON: ${{ steps.setup-python.outputs.python-path }}
64+
PYTHON: ${{ case(matrix.pythonexe == 'python', steps.setup-python.outputs.python-path, 'python') }}
6265

6366
- name: Run tests
6467
uses: julia-actions/julia-runtest@v1

0 commit comments

Comments
 (0)