forked from libKriging/libKriging
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 2.03 KB
/
python-installation.yml
File metadata and controls
64 lines (62 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Python installation test
on:
workflow_dispatch:
inputs:
version:
description: 'libKriging version to check'
required: true
default: 'latest'
jobs:
installation:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11, windows-2019]
exclude: # not supported
- os: ubuntu-20.04
python-version: 3.6
- os: ubuntu-18.04
python-version: 3.6
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Check version
shell: bash
run: |
echo "libKriging v${{ github.event.inputs.version }} will be tested"
uname -a
python --version
python -c "import sys; print(sys.version)"
- name: install pylibkriging
shell: bash
run: |
python3 -m venv venv
source ./venv/bin/activate
LK_VERSION=${{ github.event.inputs.version }}
if [[ "${LK_VERSION:-latest}" == "latest" ]]; then
pip3 install pylibkriging
else
pip3 install pylibkriging==${{ github.event.inputs.version }}
fi
python3 -c "import pylibkriging as m; print(m.__version__)"
if: runner.os != 'Windows'
- name: install pylibkriging
shell: bash
run: |
python -m venv venv # /!\ not python3
pushd .
cd venv/Scripts
. activate
popd
LK_VERSION=${{ github.event.inputs.version }}
if [[ "${LK_VERSION:-latest}" == "latest" ]]; then
pip3 install pylibkriging
else
pip3 install pylibkriging==${{ github.event.inputs.version }}
fi
python -c "import pylibkriging as m; print(m.__version__)"
if: runner.os == 'Windows'