Skip to content

Commit d17fdf2

Browse files
committed
Move parts of install.sh into new prerequisites.sh
The BuildPackages.sh script automatically executes `prerequisites.sh`, as do the GitHub Actions used for Ci tests. The former means that that CddInterface will end up being available for more users than without this. The latter means that the GitHub Actions don't need to install libcdd-dev anymore.
1 parent 0773351 commit d17fdf2

File tree

3 files changed

+56
-54
lines changed

3 files changed

+56
-54
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ jobs:
3333

3434
steps:
3535
- uses: actions/checkout@v4
36-
- name: 'Install additional dependencies'
37-
run: |
38-
sudo apt-get update
39-
sudo apt-get install libcdd-dev
4036
- uses: gap-actions/setup-gap@v2
4137
with:
4238
GAPBRANCH: ${{ matrix.gap-branch }}
@@ -53,11 +49,6 @@ jobs:
5349
runs-on: ubuntu-latest
5450

5551
steps:
56-
- uses: actions/checkout@v4
57-
- name: 'Install additional dependencies'
58-
run: |
59-
sudo apt-get update
60-
sudo apt-get install libcdd-dev
6152
- uses: gap-actions/setup-gap@v2
6253
- uses: gap-actions/build-pkg-docs@v1
6354
with:

install.sh

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,12 @@ else
99
gap_path=../..
1010
fi
1111

12-
current_dir=$(pwd)
13-
cd $gap_path
14-
15-
if [ -f "sysinfo.gap" ]; then
16-
echo "Ok, thanks I found the gap installation."
17-
else
18-
echo "ERROR: It seems that the given location for gap installation is not correct."
19-
echo "The given location is $(pwd)."
20-
exit 1
21-
fi
22-
23-
cd $current_dir
24-
25-
echo "## Setting variables"
26-
echo "I am now in $(pwd)"
27-
28-
cddlib_VERSION=0.94m
29-
#cddlib_SHA256=?
30-
cddlib_BASE=cddlib-${cddlib_VERSION}
31-
cddlib_TAR=${cddlib_BASE}.tar.gz
32-
cddlib_URL=https://github.com/cddlib/cddlib/releases/download/${cddlib_VERSION}/${cddlib_TAR}
33-
34-
echo
35-
echo "##"
36-
echo "## downloading ${cddlib_TAR}"
37-
echo "##"
38-
39-
rm -rf cddlib*
40-
rm -rf current_cddlib
41-
etc/download.sh ${cddlib_URL}
42-
tar xvf ${cddlib_TAR}
43-
ln -sf $current_dir/${cddlib_BASE} $current_dir/current_cddlib
44-
rm -rf ${cddlib_TAR}
45-
46-
echo "##"
47-
echo "## compiling cddlib ${cddlib_VERSION}"
48-
echo "##"
49-
50-
cd ${cddlib_BASE}
51-
mkdir build
52-
./bootstrap
53-
./configure --prefix=$(pwd)/build
54-
make
55-
make install
12+
./prerequisites.sh ${gap_path}
5613

5714
echo "##"
5815
echo "## compiling cdd interface"
5916
echo "##"
6017

61-
cd $current_dir
6218
./autogen.sh
6319
./configure --with-gaproot=${gap_path} --with-cddlib=$(pwd)/current_cddlib/build
6420
make

prerequisites.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
3+
set -e # abort upon error
4+
5+
if [ "$#" -ge 1 ]; then
6+
gap_path=$1
7+
shift
8+
else
9+
gap_path=../..
10+
fi
11+
12+
current_dir=$PWD
13+
cd $gap_path
14+
15+
if [ -f "sysinfo.gap" ]; then
16+
echo "Ok, thanks I found the gap installation."
17+
else
18+
echo "ERROR: It seems that the given location for gap installation is not correct."
19+
echo "The given location is $PWD."
20+
exit 1
21+
fi
22+
23+
cd $current_dir
24+
25+
echo "## Setting variables"
26+
echo "I am now in $PWD"
27+
28+
cddlib_VERSION=0.94m
29+
#cddlib_SHA256=?
30+
cddlib_BASE=cddlib-${cddlib_VERSION}
31+
cddlib_TAR=${cddlib_BASE}.tar.gz
32+
cddlib_URL=https://github.com/cddlib/cddlib/releases/download/${cddlib_VERSION}/${cddlib_TAR}
33+
34+
echo
35+
echo "##"
36+
echo "## downloading ${cddlib_TAR}"
37+
echo "##"
38+
39+
rm -rf cddlib*
40+
rm -rf current_cddlib
41+
etc/download.sh ${cddlib_URL}
42+
tar xvf ${cddlib_TAR}
43+
ln -sf $current_dir/${cddlib_BASE} $current_dir/current_cddlib
44+
rm -rf ${cddlib_TAR}
45+
46+
echo "##"
47+
echo "## compiling cddlib ${cddlib_VERSION}"
48+
echo "##"
49+
50+
cd ${cddlib_BASE}
51+
mkdir build
52+
./bootstrap
53+
./configure --prefix=$PWD/build
54+
make
55+
make install

0 commit comments

Comments
 (0)