CI Fix compilation issue with OpenMP inside conda env - #237
Conversation
|
Really? build log No idea where that was coming from but maybe when I was using |
lesteve
left a comment
There was a problem hiding this comment.
Comments about the changes to help review
| # a new commit on the same branch | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
There was a problem hiding this comment.
This wasn't cancelling the build before when pushing a new commit, I took it from scikit-learn
| # Need to use this shell to get conda working properly. | ||
| # See https://github.com/marketplace/actions/setup-miniconda#important | ||
| shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }} | ||
| shell: 'bash -el {0}' |
There was a problem hiding this comment.
This made my life easier to always use bash, probably an historical thing to use CMD on Windows, not 100% sure
| - name: Install dependencies | ||
| run: | | ||
| bash -el continuous_integration/install.sh | ||
| ./continuous_integration/install.sh |
There was a problem hiding this comment.
not using bash -l avoids the nested login shell bug in macOS where system clang is picked first rather than conda env symlink
| fi | ||
|
|
||
| # Need to source conda.sh before first conda command | ||
| source "$CONDA/etc/profile.d/conda.sh" |
There was a problem hiding this comment.
sourcing the conda.sh file is the simpler way to make conda command work on all OSes inside a script.
Fix #232
Here is a summary of my investigation:
clangsymlink in the conda env. This cause the error aboutclangno knowing what to do with-fopenmpCCis not set when you installcompilers. Soclangis the compiler rather than the full conda compiler executable i.e.x86_64-conda-<something>. BeforeCCbeing set would hide the macOS bug from previous bullet point