lightning/.github/workflows/ci_pkg-install.yml

105 lines
2.8 KiB
YAML
Raw Normal View History

name: Package
# 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/*"]
paths-ignore:
- "src/lightning_app/**" # todo: implement job skip
2022-02-02 19:48:15 +00:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
defaults:
run:
shell: bash
jobs:
init-temp:
runs-on: ubuntu-20.04
steps:
- run: mkdir pypi && touch pypi/.placeholder
- uses: actions/upload-artifact@v3
with:
name: ci-packages-${{ github.sha }}
path: pypi
install-standalone:
needs: init-temp
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
max-parallel: 1
matrix:
2021-05-21 11:35:12 +00:00
os: [ubuntu-20.04, macOS-10.15, windows-2019]
pkg: ["app", "pytorch"]
python-version: [3.7] # , 3.9
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v3
with:
name: ci-packages-${{ github.sha }}
path: pypi
- run: ls -lh pypi/
- uses: ./.github/actions/pkg-check
with:
pkg-name: ${{ matrix.pkg }}
- uses: actions/upload-artifact@v3
with:
name: ci-packages-${{ github.sha }}
path: pypi
- name: Determine package name
if: ${{ inputs.pkg-import == '' }}
working-directory: ./dist
run: python -c "import glob ; ls = glob.glob('*.tar.gz') ; name = '_'.join(ls[0].split('-')[:-1]) ; print(f'PKG_NAME={name}')" >> $GITHUB_ENV
- uses: ./.github/actions/pkg-install
with:
pkg-name: ${{ env.PKG_NAME }}
install-meta:
needs: install-standalone
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# max-parallel: 1
matrix:
os: [ubuntu-20.04, macOS-10.15, windows-2019]
pkg: ["", "lightning"]
python-version: [3.7] # , 3.9
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: mkdir -p pypi
- uses: actions/download-artifact@v3
if: ${{ matrix.pkg != '' }}
with:
name: ci-packages-${{ github.sha }}
path: pypi
- run: ls -lh pypi/
- uses: ./.github/actions/pkg-check
with:
pkg-name: ${{ matrix.pkg }}
- uses: ./.github/actions/pkg-install
with:
pkg-name: "lightning"
pip-flags: "-U --pre --find-links ../pypi/"