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

Pre-Built SIPNET Binary for GitHub Actions #3435

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

AritraDey-Dev
Copy link

@AritraDey-Dev AritraDey-Dev commented Feb 11, 2025

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

    • Add steps to build SIPNET binary.
    • Add steps to upload SIPNET binary as an artifact.
  • sipnet.yml

    • Remove steps to check out and build SIPNET from source.
    • Add steps to download pre-built SIPNET binary.
    • Add steps to use pre-built SIPNET binary.

Copy link
Member

@infotroph infotroph left a 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.

@AritraDey-Dev
Copy link
Author

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.

@AritraDey-Dev
Copy link
Author

i have made the required changes.can you please look into those.

@dlebauer
Copy link
Member

dlebauer commented Feb 12, 2025

@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.

@AritraDey-Dev
Copy link
Author

@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!

Copy link
Collaborator

@allgandalf allgandalf left a comment

Choose a reason for hiding this comment

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

few comments

@@ -61,4 +61,4 @@ jobs:
uses: ./.github/workflows/sipnet.yml
with:
R-version: ${{ matrix.R }}
secrets: inherit
secrets: inherit
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand this code diff, what has changed here? did you add a extra space or something ? if so why?

Copy link
Author

Choose a reason for hiding this comment

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

i am also not sure,may be while coding there is some unnecessary spaces that came.I will revert it.

run: |
cd ${GITHUB_WORKSPACE}/sipnet
make sipnet
curl -L -o sipnet-linux "https://drive.google.com/uc?export=download&id=1sRTFfs9Z9osmMrtLlwVTqxeUDxgVlrEv"
Copy link
Collaborator

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

Copy link
Member

@dlebauer dlebauer Feb 20, 2025

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.

Copy link
Member

Choose a reason for hiding this comment

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

cd ${GITHUB_WORKSPACE}/sipnet
make sipnet
curl -L -o sipnet-linux "https://drive.google.com/uc?export=download&id=1sRTFfs9Z9osmMrtLlwVTqxeUDxgVlrEv"
chmod +x sipnet-linux
Copy link
Collaborator

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 ?

Copy link
Author

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.

AritraDey-Dev and others added 7 commits February 21, 2025 12:55
Fixes PecanProject#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**
  - Add steps to build SIPNET binary.
  - Add steps to upload SIPNET binary as an artifact.

* **sipnet.yml**
  - Remove steps to check out and build SIPNET from source.
  - Add steps to download pre-built SIPNET binary.
  - Add steps to use pre-built SIPNET binary.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/PecanProject/pecan/issues/3427?shareId=XXXX-XXXX-XXXX-XXXX).
- Added steps to download SIPNET binaries directly from Google Drive.
- Removed the compilation step to streamline the workflow.
@AritraDey-Dev
Copy link
Author

AritraDey-Dev commented Feb 23, 2025

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-Built SIPNET Binary for GitHub Actions
4 participants