forked from kayaleitner/FPGA_MNIST
-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (74 loc) · 2.48 KB
/
pythonpackage.yaml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: EggNetExtension
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
# os: [ubuntu-latest, macOS-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cd python
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest tox
- name: Install SWIG (Linux)
if: runner.os == 'Linux'
run: |
# sudo apt-get install swig
mkdir swig
cd swig
wget http://prdownloads.sourceforge.net/swig/swig-4.0.1.tar.gz
tar -xf swig-4.0.1.tar.gz
cd swig-4.0.1
./configure
make
sudo make install
- name: Install SWIG (Mac)
if: runner.os == 'macOS'
run: brew install swig
- name: Install SWIG (Win)
if: runner.os == 'Windows'
run: choco install swig
- name: Build & Test with Pytest
if: runner.os != 'Windows'
run: |
cd python/EggNetExtension
python setup.py build_ext --build-lib .
python setup.py build_ext --inplace
python setup.py build
python setup.py sdist bdist_wheel
# tox
# pytest
- name: Test with pytest (Windoof)
if: runner.os == 'Windows'
run: |
cd python/EggNetExtension
# Use the minigw32 compiler because Microsoft is not able to implement the C standard
# python setup.py build_ext --global-option --compiler=mingw32 --build-lib .
python setup.py build
python setup.py build_ext sdist bdist_wheel
# tox
# pytest Tensorflow perevents any
- name: Test Install
run: |
cd python/EggNetExtension
python setup.py build_ext
python setup.py build_ext --build-lib ./EggNetExtension
python setup.py bdist_wheel
# Install from setup.py
pip install .
# ToDo: Check install from
- name: Upload Python Package
uses: actions/upload-artifact@v1
with:
name: EggNetExtension-${{ matrix.os }}-${{ matrix.python-version }}
path: python/EggNetExtension/dist