Skip to content

Commit

Permalink
ci: optimize testing
Browse files Browse the repository at this point in the history
  • Loading branch information
linzuzeng committed Apr 2, 2020
1 parent acd14fa commit e8d3910
Showing 1 changed file with 6 additions and 42 deletions.
48 changes: 6 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,8 @@ jobs:
with:
name: pywi
path: python-webinstall.exe
build_windows:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.7,3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and build
run: |
python -m pip --version
python -m pip install wheel --upgrade
python setup.py bdist_wheel
dir
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: wheels-win-${{ matrix.python-version }}
path: dist
- name: Test with pytest
run: |
python -m pip install tox tox-gh-actions --upgrade
tox
dir
build_windows_gui:
needs: [build_windows,wget_python_webinstall]
needs: [build,wget_python_webinstall]
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -61,7 +34,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: wheels-win-3.7
name: wheels-3.7
path: gui
- name: Download artifact
uses: actions/download-artifact@v1
Expand All @@ -88,13 +61,11 @@ jobs:
with:
name: ETA_Install-win64
path: artifact

build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7,3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -115,19 +86,13 @@ jobs:
clang-8 etabackend/cpp/INFRA_vchn.cpp -S -emit-llvm
mv *.ll etabackend/ll/posix
python3 setup.py bdist_wheel
- name: Test with pytest
run: |
pip3 install tox tox-gh-actions --upgrade
tox
ls
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: wheels-${{ matrix.python-version }}
path: dist
publish:
needs: [build]
needs: [build,test]
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -155,14 +120,14 @@ jobs:
run: |
ls
twine upload dist/*.whl --skip-existing
test_macos:
test:
needs: [build]
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7,3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand All @@ -174,6 +139,5 @@ jobs:
path: dist
- name: Test with pytest
run: |
ls
python -m pip install tox tox-gh-actions tox-external-wheels --upgrade
tox --external_wheels 'dist/*.whl'

0 comments on commit e8d3910

Please sign in to comment.