Skip to content

Commit

Permalink
New workflow intallable check py2/py3 ubuntu 20, 22 and latest
Browse files Browse the repository at this point in the history
  • Loading branch information
polsala committed Jul 23, 2024
1 parent 04329c0 commit 085bf6a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 107 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/install_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'Check installable'

on:
push:
branches: [ gisce ]


jobs:
check-package-installable:
strategy:
matrix:
python-version: [ "2.7.18", "3.11"]
os: [ ubuntu-latest, ubuntu-20.04, ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Set up Python 3
if: matrix.python-version == '3.11'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Python 2 on ubuntu 20
if: matrix.python-version == '2.7.18' && matrix.os == 'ubuntu-20.04'
run: |
sudo apt update
sudo apt install python2 python2-dev
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
printf '1\n' | sudo update-alternatives --config python
- name: Install Python 2 on ubuntu >= 22
if: matrix.python-version == '2.7.18' && matrix.os != 'ubuntu-20.04'
run: |
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install python2 python2-dev python-pip
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
printf '1\n' | sudo update-alternatives --config python
cd /usr/bin
sudo ln -s /usr/bin/pip2 ./pip
- name: Set up virtual environment
run: |
python -m pip install --upgrade pip
pip install virtualenv
python -m virtualenv venv
- name: Install package
run: |
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl
source venv/bin/activate
pip install --upgrade pip setuptools wheel build
pip install -e .
44 changes: 0 additions & 44 deletions .github/workflows/macosx.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/manylinux2010.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/sdist.yml

This file was deleted.

0 comments on commit 085bf6a

Please sign in to comment.