From 673d896dabb73595eeed61fb0a5c3cac9a8b7497 Mon Sep 17 00:00:00 2001 From: Jakub Wilk Date: Wed, 9 Aug 2023 21:36:34 +0200 Subject: [PATCH] CI: use system Python 2.7. --- .github/workflows/ci.yml | 45 +++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a51f93..f366605 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,24 +9,26 @@ jobs: include: - gamera: gamera-3.4.3 pillow: pillow-3.4.2 - container: python:2.7 + os: ubuntu-20.04 - gamera: gamera-3.4.4 - container: python:2.7 - runs-on: ubuntu-latest - container: ${{matrix.container}} - defaults: - run: - shell: bash + 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' | tee -a /etc/apt/preferences - printf 'Apt::Install-Recommends "false";\n' | tee -a /etc/apt/apt.conf - apt-get update + 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: - apt-get install -y + sudo apt-get install -y djvulibre-bin docbook-xml docbook-xsl @@ -47,11 +49,11 @@ jobs: CC: ${{matrix.cc || 'gcc'}} - name: apt install GCC run: - apt-get install -y ${{env.cc}} ${{env.cxx}} + sudo apt-get install -y ${{env.cc}} ${{env.cxx}} if: ${{matrix.cc}} - name: install ccache run: | - apt-get install -y ccache + sudo apt-get install -y ccache echo "/usr/lib/ccache:$PATH" >> $GITHUB_PATH - name: check ccache setup run: | @@ -62,9 +64,9 @@ jobs: with: path: ~/.ccache key: - ccache-${{matrix.container}}-${{env.cc}}-${{matrix.gamera}}-${{matrix.pyexiv2}} + ccache-${{matrix.os}}-${{env.cc}}-${{matrix.gamera}}-${{matrix.pyexiv2}} restore-keys: - ccache-${{matrix.container}}-${{env.cc}}-${{matrix.gamera}}- + ccache-${{matrix.os}}-${{env.cc}}-${{matrix.gamera}}- - name: download Gamera run: | gamera=${{matrix.gamera}} @@ -91,7 +93,7 @@ jobs: - name: install Gamera run: | cd deps/gamera-*/ - python setup.py install + python setup.py install --user - name: remove Gamera source run: rm -rf deps @@ -104,20 +106,15 @@ jobs: python -m pip install python-xmp-toolkit - name: install pyexiv2 run: | - apt-get install -y libboost-python-dev libexiv2-dev + 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: set up PyGI - run: | - cp -a /usr/lib/python2.7/dist-packages/gi /usr/local/lib/python2.7/site-packages/ - mv -v /usr/local/lib/python2.7/site-packages/gi/_gi{.x86_64-linux-gnu,}.so - name: install nose run: python -m pip install nose - name: run tests run: - runuser -u nobody -- - make test + make test continue-on-error: ${{(matrix.broken && true) || false}} - name: run pydiatra run: | @@ -144,7 +141,7 @@ jobs: didjvu --help - name: APT install man-db run: | - apt-get install -y man-db + sudo apt-get install -y man-db - name: check whether the man page was installed correctly env: MANWIDTH: 80