-
Notifications
You must be signed in to change notification settings - Fork 248
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
Pre-Built SIPNET Binary for GitHub Actions #3435
base: develop
Are you sure you want to change the base?
Pre-Built SIPNET Binary for GitHub Actions #3435
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! To meet the requirements of #3427 you'll need to make some changes:
- Building the binary should be done in the sipnet repo. Determining how to get the built binary from there to here is the crux of the task.
- In all repositories Github Actions workflows have to be in
.github/workflows
, not in the project root. - The changes to PEcAn's CI should modify existing workflows rather than add new ones.
Sure I will look into this changes. |
i have made the required changes.can you please look into those. |
@AritraDey-Dev Looks good to me! I am not sure if Lines 61-73 of ci.yml need to be there, now that the binary building will be done elsewhere. I put a note in PecanProject/sipnet#27 and will update the curl statements once we have a release with binaries. |
@infotroph i have Updated upload-artifact to v3. SIPNET installation remains encapsulated in sipnet.yml, so no further modifications were needed. Let me know if anything else is required! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few comments
.github/workflows/sipnet.yml
Outdated
run: | | ||
cd ${GITHUB_WORKSPACE}/sipnet | ||
make sipnet | ||
curl -L -o sipnet-linux "https://drive.google.com/uc?export=download&id=1sRTFfs9Z9osmMrtLlwVTqxeUDxgVlrEv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dlebauer @infotroph are we sure that this drive link will always be live for our project ? joining mid way so do not have the best context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was just a placeholder until I got builds posted with different releases, the latest is 1.3.0 https://github.com/PecanProject/sipnet/releases/tag/v1.3.0
This will always resolve to the latest release https://github.com/PecanProject/sipnet/releases/latest but the version number in the binary name will change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the Linux build https://github.com/PecanProject/sipnet/releases/download/v1.3.0/sipnet-linux-v1.3.0
cd ${GITHUB_WORKSPACE}/sipnet | ||
make sipnet | ||
curl -L -o sipnet-linux "https://drive.google.com/uc?export=download&id=1sRTFfs9Z9osmMrtLlwVTqxeUDxgVlrEv" | ||
chmod +x sipnet-linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we make use of sipnet-linux
while building ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3427 here the binary shared for linux i have updated that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see what binary name we use for testing by following the files referenced from line 69 below and finding that tests/ghaction.sipnet_PostgreSQL.xml
expects to find it at$GITHUB_WORKSPACE}/sipnet
, so you'll need to update either this line or that file to match each other
606f9fa
to
17a0d0b
Compare
6fd5195
to
b685ef5
Compare
@dlebauer @allgandalf @infotroph I was thinking that how to get the binary file...I have solution please check how much this is possible.After building the binary file based on version or some other parameter,every time it will upload to some location(for now g-drive,or some other location) and then some kind of github Actions which will update the binary file in the sipnet.yml file.What do you think can something like this be done? |
d5c0589
to
d05c20d
Compare
@dlebauer @allgandalf Does this change work? |
d05c20d
to
9865791
Compare
.github/workflows/sipnet.yml
Outdated
- name: Download SIPNET for macOS | ||
run: | | ||
curl -L -o sipnet-macos "https://drive.google.com/uc?export=download&id=1psNvSw77VcD5QdbSWeGNVQsbCmJokG2W" | ||
chmod +x sipnet-macos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to download Mac binary to the Linux check machine
@AritraDey-Dev This PR is currently failing CI checks for the same reasons discussed in #3427: The downloaded binary needs to be at the path expected by the test files, and the test needs to be updated to handle retrieving its climate driver file (currently taken from the sipnet repo as |
Previous code created extra copies of items on every subsetting operation, even if the extracted item was not modified. Profiling with a 100-site MultiSettings showed ~90% of runtime spent here; comparing x[[1]] in place completely eliminates GCs and runtime goes from 64 sec to 50 ms.
@infotroph i have a fix for this not sure it will work..will test it and let you know if it works. |
@infotroph i have made the changes in test.I have updated the path for the climate driver file in the test configuration to ensure it points to the correct location during the CI process.The CI checks for sipnet is working fine now. |
Fixes #3427
Add CI workflow to build and upload SIPNET binary as an artifact and update PEcAn workflow to use pre-built SIPNET binary.
ci.yml
sipnet.yml