Workaround for Arch not running on older docker

This commit is contained in:
Kovid Goyal 2021-03-04 21:21:01 +05:30
parent 8b21a04a2f
commit d148e2da5f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 47 additions and 33 deletions

View File

@ -31,32 +31,38 @@ jobs:
run: run:
python setup/unix-ci.py test python setup/unix-ci.py test
# archtest: archtest:
# name: Test on Arch name: Test on Arch
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# container: container:
# image: 'archlinux/base:latest' image: 'archlinux/base:latest'
# env: env:
# CI: 'true' CI: 'true'
# steps: steps:
# - name: Prepare the container - name: Setup container
# run: | # WORKAROUND for glibc 2.33 and old Docker
# pacman -Syu --noconfirm # See https://github.com/actions/virtual-environments/issues/2658
# pacman -S --noconfirm tar # Thanks to https://github.com/lxqt/lxqt-panel/pull/1562
# run: |
# - name: Checkout source code patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst
# uses: actions/checkout@master curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc"
# with: bsdtar -C / -xf "$patched_glibc"
# fetch-depth: 10 pacman -Syu --noconfirm --ignore glibc
# pacman -S --noconfirm tar
# - name: Install calibre dependencies
# run: setup/arch-ci.sh - name: Checkout source code
# uses: actions/checkout@master
# - name: Bootstrap calibre with:
# run: runuser -u ci -- python setup.py bootstrap --ephemeral fetch-depth: 10
#
# - name: Test calibre - name: Install calibre dependencies
# run: | run: setup/arch-ci.sh
# set -xe
# runuser -u ci -- python setup.py test - name: Bootstrap calibre
# runuser -u ci -- python setup.py test_rs run: runuser -u ci -- python setup.py bootstrap --ephemeral
- name: Test calibre
run: |
set -xe
runuser -u ci -- python setup.py test
runuser -u ci -- python setup.py test_rs

View File

@ -7,16 +7,22 @@ on:
jobs: jobs:
Push-To-Transifex: Push-To-Transifex:
name: Update translations on Transifex name: Update translations on Transifex
if: github.repository == 'kovidgoyal/calibre-disabled-because-arch-not-running-in-docker' if: github.repository == 'kovidgoyal/calibre'
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: 'archlinux/base:latest' image: 'archlinux/base:latest'
env: env:
CI: 'true' CI: 'true'
steps: steps:
- name: Prepare the container - name: Setup container
# WORKAROUND for glibc 2.33 and old Docker
# See https://github.com/actions/virtual-environments/issues/2658
# Thanks to https://github.com/lxqt/lxqt-panel/pull/1562
run: | run: |
pacman -Syu --noconfirm patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst
curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc"
bsdtar -C / -xf "$patched_glibc"
pacman -Syu --noconfirm --ignore glibc
pacman -S --noconfirm tar pacman -S --noconfirm tar
- name: Checkout source code - name: Checkout source code

View File

@ -4,6 +4,8 @@
# Copyright (C) 2020 Kovid Goyal <kovid at kovidgoyal.net> # Copyright (C) 2020 Kovid Goyal <kovid at kovidgoyal.net>
set -xe set -xe
useradd -m ci
pacman -S --noconfirm --needed base-devel sudo git sip pyqt-builder chmlib icu jxrlib hunspell libmtp libusb libwmf optipng podofo python-apsw python-beautifulsoup4 python-cssselect python-css-parser python-dateutil python-dbus python-dnspython python-dukpy python-feedparser python-html2text python-html5-parser python-lxml python-markdown python-mechanize python-msgpack python-netifaces python-unrardll python-pillow python-psutil python-pygments python-pyqt5 python-regex python-zeroconf python-pyqtwebengine qt5-x11extras qt5-svg qt5-imageformats udisks2 hyphen python-pychm python-pycryptodome speech-dispatcher python-sphinx python-urllib3 python-py7zr python-pip python-cchardet pacman -S --noconfirm --needed base-devel sudo git sip pyqt-builder chmlib icu jxrlib hunspell libmtp libusb libwmf optipng podofo python-apsw python-beautifulsoup4 python-cssselect python-css-parser python-dateutil python-dbus python-dnspython python-dukpy python-feedparser python-html2text python-html5-parser python-lxml python-markdown python-mechanize python-msgpack python-netifaces python-unrardll python-pillow python-psutil python-pygments python-pyqt5 python-regex python-zeroconf python-pyqtwebengine qt5-x11extras qt5-svg qt5-imageformats udisks2 hyphen python-pychm python-pycryptodome speech-dispatcher python-sphinx python-urllib3 python-py7zr python-pip python-cchardet
useradd -m ci
chown -R ci:users $GITHUB_WORKSPACE chown -R ci:users $GITHUB_WORKSPACE