PyPI + Conda builds#2
Open
stefdoerr wants to merge 81 commits into
Open
Conversation
Cibuildwheel
Comment on lines
+204
to
+249
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config_file: | ||
| [ | ||
| "conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.22python3.10.____cpython.yaml", | ||
| "conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.22python3.9.____cpython.yaml", | ||
| "conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.23python3.11.____cpython.yaml", | ||
| "conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.26python3.12.____cpython.yaml", | ||
| ] | ||
| runs-on: windows-2022 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: conda-incubator/setup-miniconda@v3 | ||
| with: | ||
| miniconda-version: "latest" | ||
| activate-environment: ../deploy-env | ||
| python-version: "3.10" | ||
|
|
||
| - name: Add msbuild to PATH | ||
| uses: microsoft/setup-msbuild@v2 | ||
|
|
||
| - name: Setup CUDA Toolkit | ||
| id: cuda-toolkit | ||
| shell: pwsh | ||
| run: conda_package/scripts/setup_cuda.ps1 | ||
| env: | ||
| INPUT_CUDA_VERSION: 12.0.0 | ||
|
|
||
| - name: Build openmm package | ||
| shell: bash -l {0} | ||
| run: | | ||
| git config --global --add safe.directory '*' | ||
| conda install anaconda-client conda-build | ||
| conda clean --all -y | ||
| conda build conda_package/recipe/ --variant-config-files ${{ matrix.config_file }} --output-folder ./pkg/ --no-include-recipe --no-anaconda-upload -c conda-forge | ||
| env: | ||
| OPENMM_VERSION: ${{ github.ref_name }} | ||
| OPENMM_COMMIT: ${{ github.sha }} | ||
|
|
||
| - name: Upload to conda | ||
| shell: bash -l {0} | ||
| run: | | ||
| anaconda -t ${{ secrets.ANACONDA_TOKEN_BASIC }} upload -u acellera pkg/*/openmm-*.conda --skip-existing |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the issue, we will add a permissions block at the workflow level to define the minimal permissions required for the workflow. Based on the operations in the workflow, the following permissions are necessary:
contents: readfor accessing repository contents.packages: writefor uploading packages to the repository.
This change will ensure that the workflow has only the permissions it needs, reducing the risk of unintended access.
Suggested changeset
1
.github/workflows/conda_publish.yml
| @@ -2,2 +2,6 @@ | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| on: |
Copilot is powered by AI and may make mistakes. Always verify output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.