mirror of
https://github.com/Leseratte10/acsm-calibre-plugin
synced 2025-01-31 19:57:13 +01:00
052cb41691
Tests currently fail on Ubuntu 22.04 because oscrypto doesn't properly support OpenSSL 3. Will hopefully be fixed soon.
71 lines
No EOL
2.1 KiB
YAML
71 lines
No EOL
2.1 KiB
YAML
name: Build binaries
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install compilers
|
|
run: |
|
|
sudo apt update ; sudo apt install -y gcc-mingw-w64-i686 gcc-mingw-w64-x86-64
|
|
|
|
- name: Compile
|
|
run: |
|
|
./bundle_calibre_plugin.sh
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: linux
|
|
path: |
|
|
calibre-plugin.zip
|
|
|
|
test-ubuntu-2004:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
# Require cryptography >= 3.1 because in 3.0 and below, the backend param in load_key_and_certificates was still required.
|
|
pip3 install freezegun lxml pycryptodome rsa oscrypto "cryptography>=3.1"
|
|
# Install Python2 stuff
|
|
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
|
|
python2 get-pip.py
|
|
pip2 install freezegun mock lxml pycryptodome "rsa<=4.3" oscrypto cryptography==3.1
|
|
|
|
- name: Run tests (Python 3)
|
|
run: |
|
|
cd tests && python3 ./main.py && cd ..
|
|
|
|
- name: Run tests (Python 2)
|
|
run: |
|
|
cd tests && PYTHONWARNINGS=ignore python2 ./main.py && cd ..
|
|
|
|
test-ubuntu-2204:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
# Require cryptography >= 3.1 because in 3.0 and below, the backend param in load_key_and_certificates was still required.
|
|
pip3 install freezegun lxml pycryptodome rsa oscrypto "cryptography>=3.1"
|
|
# Install Python2 stuff
|
|
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
|
|
sudo apt install python2
|
|
python2 get-pip.py
|
|
pip2 install freezegun mock lxml pycryptodome "rsa<=4.3" oscrypto cryptography==3.1
|
|
|
|
- name: Run tests (Python 3)
|
|
run: |
|
|
cd tests && python3 ./main.py && cd ..
|
|
|
|
- name: Run tests (Python 2)
|
|
run: |
|
|
cd tests && PYTHONWARNINGS=ignore python2 ./main.py && cd .. |