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

Post 24.1 Cleanups #10458

Merged
merged 24 commits into from
Apr 29, 2024
Merged

Post 24.1 Cleanups #10458

merged 24 commits into from
Apr 29, 2024

Conversation

Myoldmopar
Copy link
Member

@Myoldmopar Myoldmopar commented Apr 2, 2024

Pull request overview

The release of 24.1 is behind us, and seems to be happy. However, the release was made difficult by GitHub making a container image update 3 days before our release, which led to failing packages and a stressful last minute investigation. The root of the problem is that GHA updated the Windows image to bump CMake 3.28.3 to 3.29.0. And there was a behavior change which led to our packages missing the Python DLL.

While I was doing regular package testing, it would be much better if the package testing scripts happened here, right in this same repo. So I've brought them in. I'll do some other minor changes here that I find along the way.

It's happy on all three platforms now.

FYI @jmarrec

@Myoldmopar Myoldmopar added the DoNotPublish Includes changes that shouldn't be reported in the changelog label Apr 2, 2024
@nrel-bot
Copy link

@Myoldmopar it has been 7 days since this pull request was last updated.

3 similar comments
@nrel-bot-2c
Copy link

@Myoldmopar it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@Myoldmopar it has been 7 days since this pull request was last updated.

@nrel-bot-3
Copy link

@Myoldmopar it has been 7 days since this pull request was last updated.

@Myoldmopar
Copy link
Member Author

Alright, it's close. It is getting the packages built, and then starting the follow-up testing. But unfortunately the main test runner couldn't find the rest of the test package. I have added to the PYTHONPATH prior to running the test script, which is what you would do locally. If it doesn't work, I'm probably going to just gut the package down into a single Python file and eliminate this problem entirely. Another release test incoming...

@Myoldmopar
Copy link
Member Author

OH, it worked! OK, I'm going to undo some of the temporary changes here and then get this ready to merge.

Copy link
Member Author

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

Walkthrough done, if CI maintains good results, we should be good to merge this in.

path: build/EnergyPlus-*-Windows-${{ matrix.package-arch }}.zip
if-no-files-found: error
retention-days: 7
overwrite: false
Copy link
Member Author

Choose a reason for hiding this comment

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

@jmarrec for the main build job, I'm just adding the step of uploading the zip as an artifact. I am leaving the rest of it untouched, so it will continue to upload the package to the release as well. If there's a problem with it, so be it, but I thought it was better to let all the installers attempt to upload as normal.

@@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.9"]
os: [ubuntu-22.04, macos-13, windows-2019]
os: [ubuntu-22.04] # , macos-13, windows-2019]
Copy link
Member Author

Choose a reason for hiding this comment

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

For now wheels are only going to work on Linux, and they aren't proper manylinux wheels yet anyway. But it's close. This will be my next major effort.

repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TESTPYPIPW }}
verbose: true
Copy link
Member Author

Choose a reason for hiding this comment

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

Added the command to actually deploy the wheel to PyPi, this is such a great step!

Copy link
Member Author

Choose a reason for hiding this comment

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

In a subsequent effort, I'll modify this script to be able to deploy to either PyPi or TestPyPi on demand, as well as for each tag.

if-no-files-found: error
retention-days: 7
overwrite: false

Copy link
Member Author

Choose a reason for hiding this comment

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

On all three platforms, I now upload the tarball/zip as an artifact in the first job, and then test the artifact in a fresh container in a second job.

@@ -219,7 +219,7 @@ if(BUILD_TESTING)
"${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}${ARCH_FLAG}"
CACHE STRING "Identifier for this device configuration")
endif()

set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) # This avoids all the CTest Nightly, Continuous, etc. tests.
Copy link
Member Author

Choose a reason for hiding this comment

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

Simply hush up a bunch of random ctest target projects, no functional change.

check_call([make_tool, '-j', str(cpu_count() - 2), 'energyplus'], cwd=str(build_dir))
else:
products_dir = '/tmp/EnergyPlus-24.1.0-241fc81186-Linux-Ubuntu22.04-x86_64'

Copy link
Member Author

Choose a reason for hiding this comment

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

Just random things added to the debug script. I doubt anyone else will be using this, so just ignore.

Copy link
Member Author

Choose a reason for hiding this comment

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

All the remaining changes below are the contents of the ep_testing library that we are using to test EnergyPlus packages!

@Myoldmopar
Copy link
Member Author

Alright, I am pumped about adding this automatic package testing. Soon I will make a pass over the testing code to clean any oddities up, and also add more testing. If we ever encounter packaging issues again, we should be able to add tests in to catch them. This is a big deal. I'm merging this.

@Myoldmopar Myoldmopar merged commit ad3dfbc into develop Apr 29, 2024
15 checks passed
@Myoldmopar Myoldmopar deleted the Post241QuickChanges branch April 29, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DoNotPublish Includes changes that shouldn't be reported in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants