Skip to content

Commit

Permalink
drone build: Don't use pre-compiled cmake binary (Rasbats#199).
Browse files Browse the repository at this point in the history
  • Loading branch information
Alec Leamas committed Sep 15, 2021
1 parent 523db41 commit b7e88fe
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions ci/drone-build-raspbian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,28 @@ sudo apt-get -q --allow-unauthenticated install -f

git fetch --all --tags

# Temporary fix until 3.19 is available as a pypi package
# 3.19 is needed: https://gitlab.kitware.com/cmake/cmake/-/issues/20568
url='https://dl.cloudsmith.io/public/alec-leamas/opencpn-plugins-stable/deb/debian'
wget $url/pool/${OCPN_TARGET/-*/}/main/c/cm/cmake-data_3.19.3-0.1_all.deb
wget $url/pool/${OCPN_TARGET/-*/}/main/c/cm/cmake_3.19.3-0.1_armhf.deb
sudo apt install ./cmake_3.19.3-0.1_armhf.deb ./cmake-data_3.19.3-0.1_all.deb
# Initiate python setup
apt-get install -q python3-pip python3-cryptography openssh-client

deb_vers=$(lsb_release -rs)
if [ $deb_vers -lt 10 ] ; then
# Latest pip 21.0.0 requires python 3.6+, we have only 3.5:
python3 -m pip install --user -q --force-reinstall pip==20.3.4 setuptools wheel

# Install a modern cmake, Debian's is too old.
python3 -m pip install --user -q cmake==3.20.5
else
# Install latest pip and cmake versions
python3 -m pip install --user -q --force-reinstall pip setuptools wheel
python3 -m pip install --user -q cmake
fi

# configure and build
rm -rf build; mkdir build; cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j $(nproc) VERBOSE=1 tarball
ldd app/*/lib/opencpn/*.so

# Initiate python setup, install cryptography and ssh-client for git-push.
apt-get install -q python3-pip python3-cryptography openssh-client

# Latest pip 21.0.0 requires python 3.6+, we have only 3.5:
python3 -m pip install --user -q --force-reinstall pip==20.3.4 setuptools wheel

# Install cloudsmith-cli for upload script.
python3 -m pip install --user -q cloudsmith-cli

0 comments on commit b7e88fe

Please sign in to comment.