|
| 1 | +name: 'Check installable' |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ gisce ] |
| 6 | + |
| 7 | + |
| 8 | +jobs: |
| 9 | + check-package-installable: |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + python-version: [ "2.7.18", "3.11"] |
| 13 | + os: [ ubuntu-latest, ubuntu-20.04, ubuntu-22.04 ] |
| 14 | + runs-on: ${{ matrix.os }} |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Set up Python 3 |
| 19 | + if: matrix.python-version == '3.11' |
| 20 | + uses: actions/setup-python@v4 |
| 21 | + with: |
| 22 | + python-version: ${{ matrix.python-version }} |
| 23 | + |
| 24 | + - name: Install Python 2 on ubuntu 20 |
| 25 | + if: matrix.python-version == '2.7.18' && matrix.os == 'ubuntu-20.04' |
| 26 | + run: | |
| 27 | + sudo apt update |
| 28 | + sudo apt install python2 python2-dev |
| 29 | + curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py |
| 30 | + sudo python2 get-pip.py |
| 31 | + sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1 |
| 32 | + sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2 |
| 33 | + printf '1\n' | sudo update-alternatives --config python |
| 34 | +
|
| 35 | + - name: Install Python 2 on ubuntu >= 22 |
| 36 | + if: matrix.python-version == '2.7.18' && matrix.os != 'ubuntu-20.04' |
| 37 | + run: | |
| 38 | + sudo add-apt-repository ppa:deadsnakes/ppa -y |
| 39 | + sudo apt update |
| 40 | + sudo apt install python2 python2-dev python-pip |
| 41 | + sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1 |
| 42 | + sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2 |
| 43 | + printf '1\n' | sudo update-alternatives --config python |
| 44 | + cd /usr/bin |
| 45 | + sudo ln -s /usr/bin/pip2 ./pip |
| 46 | +
|
| 47 | + - name: Set up virtual environment |
| 48 | + run: | |
| 49 | + python -m pip install --upgrade pip |
| 50 | + pip install virtualenv |
| 51 | + python -m virtualenv venv |
| 52 | +
|
| 53 | + - name: Install package |
| 54 | + run: | |
| 55 | + sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl |
| 56 | + source venv/bin/activate |
| 57 | + pip install --upgrade pip setuptools wheel build |
| 58 | + pip install -e . |
0 commit comments