Skip to content

CI: use system Python 2.7. #101

CI: use system Python 2.7.

CI: use system Python 2.7. #101

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
main:
strategy:
matrix:
include:
- gamera: gamera-3.4.3
pillow: pillow-3.4.2
os: ubuntu-20.04
- gamera: gamera-3.4.4
os: ubuntu-20.04
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: set up APT
run: |
printf '\n\nPackage: *\nPin: release o=Ubuntu\nPin-Priority: 9999\n' | sudo tee -a /etc/apt/preferences
printf 'Apt::Install-Recommends "false";\n' | sudo tee -a /etc/apt/apt.conf
sudo apt-get update
- name: set up Python 2.7
run: |
sudo apt-get install -f python-is-python2 python2-dev
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py > get-pip.py
sudo python get-pip.py
rm get-pip.py
- name: apt install deps
run:
sudo apt-get install -y
djvulibre-bin
docbook-xml
docbook-xsl
exiv2
gir1.2-gexiv2-0.10
libexempi[38]
libpng-dev
libtiff-dev
libxml2-utils
minidjvu
python-gi
xsltproc
- name: set up CC and CXX env variables
run: |
echo "cc=${CC}" >> $GITHUB_ENV
echo "cxx=${CC/cc/++}" >> $GITHUB_ENV
env:
CC: ${{matrix.cc || 'gcc'}}
- name: apt install GCC
run:
sudo apt-get install -y ${{env.cc}} ${{env.cxx}}
if: ${{matrix.cc}}
- name: install ccache
run: |
sudo apt-get install -y ccache
echo "/usr/lib/ccache:$PATH" >> $GITHUB_PATH
- name: check ccache setup
run: |
command -v ${{env.cc}} | grep /ccache/
command -v ${{env.cxx}} | grep /ccache/
- name: restore ccache data
uses: actions/cache@v3
with:
path: ~/.ccache
key:
ccache-${{matrix.os}}-${{env.cc}}-${{matrix.gamera}}-${{matrix.pyexiv2}}
restore-keys:
ccache-${{matrix.os}}-${{env.cc}}-${{matrix.gamera}}-
- name: download Gamera
run: |
gamera=${{matrix.gamera}}
revision=${gamera#gamera-}
url="https://github.com/hsnr-gamera/gamera/archive/${revision}.tar.gz"
mkdir -p deps/
wget "$url" -O deps/${{matrix.gamera}}.tar.gz
- name: unpack Gamera
run: |
cd deps/
tar -xvzf gamera-*.tar.gz
- name: patch Gamera
run: |
cd deps/gamera-*/
echo '__version__ = "0.0"' > wx.py
sed -i -e 's/ int(gccv\[0\]) >= 4 and int(gccv\[1\]) >= 3:/ True:/' setup.py
- name: build Gamera
run: |
cd deps/gamera-*/
python setup.py build
env:
CC: ${{env.cc}}
CXX: ${{env.cxx}}
- name: install Gamera
run: |
cd deps/gamera-*/
python setup.py install --user
- name: remove Gamera source
run:
rm -rf deps
- name: install Pillow
run: |
pillow=${{matrix.pillow || 'pillow'}}
python -m pip install ${pillow/-/==}
- name: install python-xml-toolkit
run:
python -m pip install python-xmp-toolkit
- name: install pyexiv2
run: |
sudo apt-get install -y libboost-python-dev libexiv2-dev
python -m pip install --verbose git+https://github.com/escaped/pyexiv2
if: ${{matrix.pyexiv2}}
- name: install nose
run:
python -m pip install nose
- name: run tests
run:
make test
continue-on-error: ${{(matrix.broken && true) || false}}
- name: run pydiatra
run: |
python -m pip install pydiatra
python -m pydiatra --verbose .
- name: run pyflakes
run: |
python -m pip install pyflakes
python -m pyflakes .
- name: check docs
run: |
python -m pip install docutils pygments
make -C doc check
- name: build docs
run:
make -C doc all
- name: install
run:
make install
- name: check whether the executable was installed correctly
run: |
cd /
didjvu --version
didjvu --help
- name: APT install man-db
run: |
sudo apt-get install -y man-db
- name: check whether the man page was installed correctly
env:
MANWIDTH: 80
run: |
cd /
man 1 didjvu | grep -A 10 -w DIDJVU
# vim:ts=2 sts=2 sw=2 et