Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup miniconda action #29

Merged
merged 1 commit into from
Nov 19, 2021
Merged

Setup miniconda action #29

merged 1 commit into from
Nov 19, 2021

Conversation

chrisjbillington
Copy link
Collaborator

Replace our home-grown miniconda setup with the existing setup-miniconda GitHub action.

The latest version has a bug, fixed upstream but with the fix not merged yet (it's been a long time so probably won't be merged soon):

conda-incubator/setup-miniconda#189

That prevents it working on 32 bit Windows. That's OK, we can hard-code a working version of the action until the fix is in a release of the action.

Also:
* install setuptools-conda from labscript-suite
* build conda packages in ${{ runner.temp }}\cb on Windows, which is a
  short filepath. This helps avoid very long filepaths causing failure
  during the build.
pip install --upgrade setuptools_scm && ^
setuptools-conda build %CONDA_BUILD_ARGS% .
conda install -c labscript-suite setuptools-conda && ^
setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is the result of many hours of misery.

Some builds of projects with C extensions fail with errors like:

The input line is too long.
The syntax of the command is incorrect.

This is because of long filepaths. The conda build would be done in a directory like:

D:\a\labscript-c-extensions\labscript-c-extensions\conda_build\conda-bld\

Using ${{ runner.temp }}\cb instead results in the conda build being done in the directory:

D:\a\_temp\cb\

saving many characters in the filepath and causing the builds to not fail with the "input line too long" error

@chrisjbillington
Copy link
Collaborator Author

Merging as the build is broken as it is, and fixing it when I'm changing stuff anyway is pointless. This change is tested in other labscript repos.

@chrisjbillington chrisjbillington merged commit ee69652 into master Nov 19, 2021
@chrisjbillington chrisjbillington deleted the setup-miniconda-action branch November 19, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant