Skip to content

Install newer CGAL also in testing.yml. #126

Install newer CGAL also in testing.yml.

Install newer CGAL also in testing.yml. #126

Workflow file for this run

name: Testing
on:
push:
branches:
- 'main'
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
max-parallel: 1
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build REHEATFUNQ
run: |
# Some basic environment information:
echo "Current folder:"
pwd
ls -a
echo ""
ls .github
ls .github/scripts
echo ""
# Install packages:
sudo apt-get update
sudo apt-get install -y libproj-dev libeigen3-dev \
libcgal-dev libgeographic-dev liblapacke-dev\
build-essential\
git openssh-client ssh cython3 \
python3-sphinx ninja-build cmake-data \
cmake-extras extra-cmake-modules \
wget
python3 -m pip install --user numpy
# Use modern GCC:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
# Monkey-patched install of newer boost version:
wget -q https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2
mkdir boost-dl
tar --bzip2 -xf boost_1_86_0.tar.bz2 -C boost-dl
sudo rm -r /usr/include/boost
sudo cp -r boost-dl/boost_1_86_0/boost /usr/include
# Monkey-patched install of newer CGAL verison:
wget -q https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1-library.tar.xz
mkdir cgal-dl
tar -xf CGAL-5.6.1-library.tar.xz -C cgal-dl
rm CGAL-5.6.1-library.tar.xz
rm -r /usr/include/CGAL
cp -r cgal-dl/CGAL-5.6.1/include/CGAL /usr/include
rm -r cgal-dl
# Python installs:
python3 -m pip install --upgrade pip
sudo apt purge python3-setuptools
python3 -m pip install --user --verbose .
- name: Lint with flake8
run: |
python3 -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 reheatfunq --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 jupyter --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
run: |
#
python3 -m pip install pytest
cd testing
# Ensure that we can execute the imports:
python3 test_anomaly_posterior.py
# Run the test suite:
pytest -s
- name: Build Dockerfile
run: |
sudo apt-get -y install podman
podman build --format docker -t reheatfunq .