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

Update cron schedule for PyPI publishing workflow and add cache for vcpkg dependencies #3792

Closed
wants to merge 3 commits into from

Conversation

R-Yash
Copy link
Contributor

@R-Yash R-Yash commented Jan 31, 2024

Update cron schedule for PyPI publishing workflow and add cache for vcpkg dependencies

Description

Added a process to cache vcpkg dependencies in run_periodic_tests.yaml and made the tests run every week by editing publish_pypi.yaml

Fixes #3664

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@kratman
Copy link
Contributor

kratman commented Jan 31, 2024

@R-Yash Can you fix the conflicts so the review can be started?

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (705baff) 99.59% compared to head (c0aeb42) 99.59%.
Report is 2 commits behind head on develop.

❗ Current head c0aeb42 differs from pull request most recent head 7b06ec4. Consider uploading reports for the commit 7b06ec4 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3792   +/-   ##
========================================
  Coverage    99.59%   99.59%           
========================================
  Files          257      257           
  Lines        20802    20802           
========================================
  Hits         20718    20718           
  Misses          84       84           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +125 to +134
- name: Cache vcpkg dependencies
if: matrix.os == 'windows-latest'
uses: actions/cache@v2
with:
path: ~/.cache/vcpkg
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-


Copy link
Member

Choose a reason for hiding this comment

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

Besides this, we also need the PyBaMM-related environment variables, such as PYBAMM_USE_VCPKG_ON, CMAKE_BUILD_PARALLEL_LEVEL, and the rest present in publish_pypi.py so that setup.py can use all features of vcpkg.

After you add all of those, I would suggest triggering this workflow from this branch to test these changes (if you do it correctly, you should see a win-amd64 file being built for PyBaMM rather than the current none-any.whl).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@agriyakhetarpal How can I trigger a workflow from this branch?

Copy link
Member

Choose a reason for hiding this comment

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

You'd have to go to the actions tab on your fork then select the workflow you want to run from the left panel.
Click on the Run Workflow button >> Select the target branch >> Confirm after Clicking on the blue Run Workflow button

image

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @arjxn-py. Also, these environment variables have been set for the entire matrix. We need these just for the Windows steps in the job. We don't have separate Windows steps, so you can create a separate step with Run integration tests on Windows and add these environment variables there (similarly for unit tests, etc.)

@agriyakhetarpal
Copy link
Member

@R-Yash, feel free to ask if you need help with anything!

@arjxn-py
Copy link
Member

arjxn-py commented Mar 7, 2024

@R-Yash are you still working on this?

@agriyakhetarpal
Copy link
Member

Let's close this, actually. We could wait for a while, but not only has the contributor been unresponsive, but also that this is likely stalled until we have a resolution for #3783 (the PyBaMM IDAKLU solver is broken on Windows even if one installs from source). Please feel free to reopen this as you feel fit, @R-Yash!

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.

Utilise caches for Windows nightly tests and test wheels weekly instead of fortnightly
4 participants