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

Document running actions locally and update custom build CI options #350

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

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented Jan 30, 2025

Before we can maintain the adapter for different OpenFOAM versions again, we need a system to build the adapter for different versions locally. We already have a CI workflow for that, but it is a bit cumbersome running it always on GitHub.

This PR:

  • Documents how to run GitHub Actions and specifically this workflow locally with act.
  • Adds an options file for the arguments, to not always pass them via the CLI.
  • Documents which OpenFOAM versions are available in which Ubuntu versions. This is something I often have to look up again.
  • Updates the default argument values for the workflow.

TODO list:

  • I updated the documentation in docs/
  • I added a changelog entry in changelog-entries/ (create directory if missing)

@vidulejs maybe a nice first PR to review and try out the workflow locally. I am looking forward to your comments on what works, what not, and what I could improve.


1. Switch to the directory `.github/workflows/`
2. Edit the inputs in the `build-custom.input` file.
3. [Generate a GitHub access token](https://github.com/settings/personal-access-tokens) and add it to a `.secrets` file with content `GITHUB_TOKEN=<your-token>`.
Copy link
Member Author

Choose a reason for hiding this comment

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

This step should not be needed, but there seems to be a related issue in act.


You can also run GitHub Actions locally with [act](https://github.com/nektos/act).

List the workflows with `act --list`. To simulate a push event, run `act push`. Some workflows might work on GitHub Actions but not on act, in which case you could try running specific workflows with, for example, `act -j 'build'`.
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 particular, I could run the first tutorial, but not more. It was as if the second solver was not starting.

- ubuntu-22.04
- ubuntu-20.04
- ubuntu-18.04
Copy link
Member Author

Choose a reason for hiding this comment

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

GitHub-hosted runners with Ubuntu 18.04 are not available anymore, hence we cannot test OpenFOAM 5 and 6 anymore.

Locally, there is a Docker image that is picked:

Start image=catthehacker/ubuntu:act-18.04

but I am later on getting another error:

[Custom build (manual)/build] ⭐ Run Main Check out repository
[Custom build (manual)/build]   🐳  docker cp src=/home/gc/.cache/act/actions-checkout@v4/ dst=/var/run/act/actions/actions-checkout@v4/
[Custom build (manual)/build]   🐳  docker exec cmd=[node /var/run/act/actions/actions-checkout@v4/dist/index.js] user= workdir=
| OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown
[Custom build (manual)/build]   ❌  Failure - Main Check out repository
[Custom build (manual)/build] exitcode '126': failure

I think we will have to live without testing OpenFOAM.org earlier than 7 for now.

@MakisH MakisH marked this pull request as ready for review February 4, 2025 20:32
@MakisH MakisH requested a review from vidulejs February 4, 2025 20:32
@MakisH MakisH changed the title Document running actions locally Document running actions locally and update custom build CI options Feb 4, 2025
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.

1 participant