Skip to content

Commit e46bc53

Browse files
Merge pull request #1182 from ChrisRackauckas-Claude/sci-py-robust-init
CI: serialize precompile workers for python-using groups
2 parents 80818ee + 34eda2f commit e46bc53

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ jobs:
6464
${{ runner.os }}-test-${{ matrix.version }}-${{ env.cache-name }}-
6565
${{ runner.os }}-test-${{ matrix.version }}-
6666
${{ runner.os }}-
67+
# Serialize precompile workers for the python-using groups. PythonCall's
68+
# `JlWrap.__init__` has been observed to fail intermittently with
69+
# `UndefRefError: access to undefined reference` when multiple precompile
70+
# workers spin up the wrapper-type registration concurrently. Setting
71+
# `JULIA_NUM_PRECOMPILE_TASKS=1` removes that race; the cost on these
72+
# small subpackages is negligible.
73+
- if: ${{ matrix.group == 'OptimizationSciPy' || matrix.group == 'OptimizationPyCMA' }}
74+
run: echo "JULIA_NUM_PRECOMPILE_TASKS=1" >> $GITHUB_ENV
6775
- uses: julia-actions/julia-buildpkg@v1
6876
- if: ${{ matrix.group == 'OptimizationQuadDIRECT' }}
6977
run: julia --project -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url = "https://github.com/HolyLab/HolyLabRegistry.git")); Pkg.add("QuadDIRECT")'

0 commit comments

Comments
 (0)