Skip to content

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.

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

@tueda tueda force-pushed the ci-setup-build-action branch from 4bf9299 to a908805 Compare June 1, 2025 15:13
@tueda tueda force-pushed the ci-setup-build-action branch 2 times, most recently from ae3fef0 to c859b16 Compare August 26, 2025 08:24
@tueda
Copy link
Collaborator Author

tueda commented Aug 26, 2025

Updated.

@jodavies
Copy link
Collaborator

This looks to be building and caching flint also on Ubuntu, right? Then #703 will go in easily?

The actions setup looks much cleaner with this!

@tueda
Copy link
Collaborator Author

tueda commented Aug 26, 2025

Yes, the action now builds FLINT 3.3.1 also on Ubuntu.

It also contains some untested features like ginac. The code in #640 is also partially included (but not tested).

@tueda tueda mentioned this pull request Aug 26, 2025
@coveralls
Copy link

coveralls commented Aug 26, 2025

Coverage Status

coverage: 54.37% (+0.7%) from 53.699%
when pulling ada1f0a on tueda:ci-setup-build-action
into e3eeea3 on form-dev:master.

@tueda tueda force-pushed the ci-setup-build-action branch from c859b16 to 237cda5 Compare August 26, 2025 10:38
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux' && steps.setup.outputs.container == 'false'
uses: awalsh128/cache-apt-pkgs-action@a605dbde2ac49a823c9c87ad58491b51848bf355 # for empty_packages_behavior
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Once this commit is included in a release, we can simplify the reference to v1.

@tueda
Copy link
Collaborator Author

tueda commented Aug 27, 2025

I'm thinking about letting this action optionally run the build step (despite the name setup-build). In that case, the builds in test.yml (which are all common) can be removed by enabling a build feature flag.

@jodavies
Copy link
Collaborator

Right, this would speed things up (a bit) if the binaries are cached. At some point it might be worth taking a look at the slowest of the tests under valgrind, and trying to make an easier test which hits the same bug, if we would like the CI to run faster (since in the future, we would like to add a lot more tests for better coverage).

@tueda
Copy link
Collaborator Author

tueda commented Aug 27, 2025

I just meant removing the five run: make -C sources -j 4 ${{ matrix.bin }} lines :-)
Caching the binaries would be tricky, but potentially useful.

@jodavies
Copy link
Collaborator

Then I misunderstood. In the context of your changes here it does make sense to remove as much duplicate build code as you can from the various test jobs indeed.

@tueda tueda force-pushed the ci-setup-build-action branch 2 times, most recently from b564d01 to 5fd2e3d Compare August 30, 2025 03:23
Refactor workflows by introducing a new composite action, "setup-build",
to encapsulate common setup logic. This action sets up the build
environment and runs the configure script based on the "features" input.
@tueda tueda force-pushed the ci-setup-build-action branch from 5fd2e3d to ada1f0a Compare September 1, 2025 11:57
@tueda
Copy link
Collaborator Author

tueda commented Sep 1, 2025

FLINT is now statically linked on macOS.

I also committed workflow improvements with more robust checks, and excluded extern/zstd and lib/flint from coverage.

@tueda tueda merged commit 9828301 into form-dev:master Sep 30, 2025
84 checks passed
@tueda tueda deleted the ci-setup-build-action branch September 30, 2025 10:40
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.

3 participants