Skip to content

ci(refactor): extract build setup logic into setup-build #622

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tueda
Copy link
Collaborator

@tueda tueda commented Feb 11, 2025

This patch extracts the build setup logic into a composite action called setup-build to avoid repeating similar steps in different jobs. The setup process includes installing dependencies and libraries, extracting tarballs, running autoreconf, and executing configure.

In the future, if we need to elaborate further on setting up libraries (including building and caching), such as MPI or FLINT, we can manage them all in one place.

There are several ways to organize shared logic in GitHub Actions:

This patch adopts the last option. To mitigate the drawback, I added lines like ### Initialize setup ### in the run: field, which will appear in the logs.

@tueda tueda force-pushed the ci-setup-build-action branch from 022fd5b to fbe271c Compare March 10, 2025 12:32
@tueda
Copy link
Collaborator Author

tueda commented Mar 10, 2025

Changed from tr ' ' '|no' to sed 's/ /|no/g' (I misunderstood how tr works).

@coveralls
Copy link

coveralls commented Mar 10, 2025

Coverage Status

coverage: 49.241% (-0.004%) from 49.245%
when pulling a908805 on tueda:ci-setup-build-action
into e1289ac on vermaseren:master.

# awalsh128/cache-apt-pkgs-action does not allow empty packages argument.
# See: https://github.com/awalsh128/cache-apt-pkgs-action/issues/149
# As a workaround, we need to check if any packages need to be installed.
- name: Install dependencies (Ubuntu)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This can be simplified if awalsh128/cache-apt-pkgs-action#154 is merged.

@tueda tueda force-pushed the ci-setup-build-action branch from fbe271c to 4bf9299 Compare May 25, 2025 22:00
@tueda
Copy link
Collaborator Author

tueda commented May 25, 2025

Rebased. Added features: zstd, mpich, openmpi. The default MPI is now openmpi. Also addressed the issue described in awalsh128/cache-apt-pkgs-action#150.

Create a new composite action "setup-build" by extracting common setup
logic from the test/deploy workflows. This action sets up the build
environment and runs the configure script.
@tueda tueda force-pushed the ci-setup-build-action branch from 4bf9299 to a908805 Compare June 1, 2025 15:13
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.

2 participants