2021-03-04 21:41:10 +05:30

69 lines
2.1 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout source code
uses: actions/checkout@master
with:
fetch-depth: 10
- name: Set up Python
uses: actions/setup-python@master
with:
python-version: 3.8
- name: Install calibre dependencies
run:
python setup/unix-ci.py install
- name: Bootstrap calibre
run:
python setup/unix-ci.py bootstrap
- name: Test calibre
run:
python setup/unix-ci.py test
archtest:
name: Test on Arch
runs-on: ubuntu-latest
container:
image: 'archlinux/base:latest'
env:
CI: 'true'
steps:
- 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: |
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
- name: Checkout source code
uses: actions/checkout@master
with:
fetch-depth: 10
- name: Install calibre dependencies
run: setup/arch-ci.sh
- name: Bootstrap calibre
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