name: Install pkg # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows on: # Trigger the workflow on push or pull request, but only for the master branch push: branches: [master, "release/*"] pull_request: branches: [master, "release/*"] jobs: pkg-install: runs-on: ${{ matrix.os }} strategy: fail-fast: false # max-parallel: 6 matrix: # PyTorch 1.5 is failing on Win and bolts requires torchvision>=0.5 os: [ubuntu-20.04, macOS-10.15 , windows-2019] # python-version: [3.6, 3.8] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Prepare env run: | pip install check-manifest "twine==3.2" setuptools wheel - name: Create package run: | check-manifest # python setup.py check --metadata --strict python setup.py sdist bdist_wheel - name: Check package run: | twine check dist/* python setup.py clean - name: Setup Windows if: runner.os == 'windows' run: | # this is just a hotfix because of Win cannot install it directly pip install -r requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html - name: Install | Uninstall package - archive run: | # install as archive pip install dist/*.tar.gz cd .. python -c "import pytorch_lightning as pl ; print(pl.__version__)" pip uninstall -y pytorch-lightning - name: Install | Uninstall package - wheel run: | # install as wheel pip install dist/*.whl cd .. python -c "import pytorch_lightning as pl ; print(pl.__version__)" pip uninstall -y pytorch-lightning