forked from Lightning-AI/pytorch-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (119 loc) · 3.65 KB
/
ci_pkg-install.yml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
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/*"]
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:
os: [ubuntu-20.04, macOS-11, windows-2019]
pkg: ["app", "pytorch"]
python-version: [3.8] # , 3.9
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
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
- uses: ./.github/actions/pkg-install
install-meta-src:
needs: install-standalone
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# max-parallel: 1
matrix:
os: [ubuntu-20.04, macOS-11, windows-2019]
pkg: ["", "lightning"]
python-version: [3.8] # , 3.9
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
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/"
install-meta-pypi:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# max-parallel: 1
matrix:
os: [ubuntu-20.04, macOS-11, windows-2019]
python-version: [3.8] # , 3.9
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Dowload package
run: |
pip install -q fire requests
for pkg in 'app' 'pytorch' ; do
python .actions/assistant.py download-package "$pkg" --folder pypi
done
ls -lh pypi/
- name: Unzip packages
working-directory: pypi
run: for file in `ls *.gz`; do tar -xzf $file; done
- name: Show upacked pkgs
if: runner.os == 'linux'
run: |
sudo apt install -y tree
tree pypi/ -L 3
- name: Miror source
run: |
pip install -q fire requests
python .actions/assistant.py mirror-pkg2source pypi src
ls -R src/
- uses: ./.github/actions/pkg-check
with:
pkg-name: "lightning"
- uses: ./.github/actions/pkg-install
with:
pkg-name: "lightning"
pip-flags: "-U --pre --find-links ../pypi/"