Skip to content

Commit

Permalink
Added autoconf test
Browse files Browse the repository at this point in the history
This is testing that the correct autoconf version has been used
to generate the ./configure file
  • Loading branch information
GiovanniBussi committed Mar 1, 2023
1 parent 1b9be0d commit dd4d146
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
19 changes: 19 additions & 0 deletions .ci/install.autoconf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /usr/bin/env bash

set -e
set -x

cd "$(mktemp -dt plumed.XXXXXX)"

dir=autoconf-$1

wget https://ftp.gnu.org/gnu/autoconf/$dir.tar.gz

tar xzf $dir.tar.gz

cd $dir

./configure --prefix "$HOME/opt"
make
make install

2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ jobs:
- name: Install requirements
run: |
.ci/install.cppcheck 2.10
# it is important that this is the same version used to generate the actual ./configure
.ci/install.autoconf 2.69
- name: Build astyle
run: |
make -j 4 -C astyle
Expand Down
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
# system.
# If you modify configure.ac, remember to run
# autoconf and then commit both files to the git repository.
# Make sure that you are using the same autoconf version that is
# installed on GitHub Actions see `.github/workflows/ci.yml`
# and search for `autoconf`. Otherwise, our codecheck job
# on GitHub Actions will complain.

# we require a recent version
# notice that autoconf is not necessary on user's machine, but only
# if one has to update configure.ac
AC_PREREQ([2.68])
AC_PREREQ([2.69])
AC_INIT([PLUMED], [2])

##################################################################
Expand Down
7 changes: 3 additions & 4 deletions src/maketools/plumedcheck
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,9 @@ BEGINFILE{
# DOC: When you modify the latter, the former should be regenerated using `autoconf` and
# DOC: committed to git. This error indicates that the `./configure.ac` and `./configure` files
# DOC: in the repository are not consistent.
# DOC: Notice that Ubuntu 16 ships with an autoconf version that is not standard
# DOC: (2.69 + some patch). This makes this test report a false positive.
# DOC: This is thus changed to a style warning.
if(s!=0) style("autoconf","autoconf not satisfied")
# DOC: Notice that this test should be performed using exactly the same autoconf version
# DOC: that was used to generate the `./configure` file.
if(s!=0) error("autoconf","autoconf not satisfied")
system("rm " tempfile)
}

Expand Down

1 comment on commit dd4d146

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

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

Found broken examples in automatic/a-masterclass-22-09.txt
Found broken examples in automatic/a-masterclass-22-11.txt
Found broken examples in automatic/a-masterclass-22-12.txt
Found broken examples in automatic/performance-optimization.txt
Found broken examples in automatic/a-trieste-6.txt
Found broken examples in automatic/munster.txt
Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/ENVIRONMENTSIMILARITY.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/MAZE_MEMETIC_SAMPLING.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_RANDOM_WALK.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in MiscelaneousPP.md

Please sign in to comment.