-
Notifications
You must be signed in to change notification settings - Fork 6
144 lines (142 loc) · 4 KB
/
ci.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
143
144
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ published ]
jobs:
wget_python_webinstall:
runs-on: ubuntu-latest
steps:
- name: Download python-webinstall.exe
uses: wei/wget@v1
with:
args: -O python-webinstall.exe https://www.python.org/ftp/python/3.10.10/python-3.10.10-amd64.exe
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: pywi
path: python-webinstall.exe
build_windows_gui:
needs: [build,wget_python_webinstall]
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: wheels-3.9
path: gui
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: pywi
path: gui
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build Electron app
run: |
cd gui
dir
yarn
yarn dist
cd ..
ls .\gui\dist\
echo 7z a ETA_Install-win64.zip .\gui\dist\*.exe
mkdir artifact
move .\gui\dist\*.exe .\artifact
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: ETA_Install-win64
path: artifact
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and build
run: |
sudo apt-get update
sudo apt-get install -y clang-11
sudo apt-get install -y llvm-11
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
ls
clang-11 etabackend/cpp/PARSE_TimeTagFileHeader.cpp -S -emit-llvm
clang-11 etabackend/cpp/PARSE_TimeTags.cpp -S -emit-llvm
clang-11 etabackend/cpp/INFRA_vchn.cpp -S -emit-llvm
mv *.ll etabackend/ll/posix
python3 setup.py bdist_wheel
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: wheels-${{ matrix.python-version }}
path: dist
publish:
needs: [build,test]
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
env:
PYPI_PASSWORD: ${{secrets.PYPI_PASSWORD}}
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
PYPI_USERNAME: ${{secrets.PYPI_USERNAME}}
strategy:
matrix:
python-version: [3.9]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install twine
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: wheels-3.9
path: dist
- name: Twine upload
run: |
ls
twine upload dist/*.whl --skip-existing
test:
needs: [build]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: wheels-3.9
path: dist
- name: Test with pytest
run: |
python -m pip install tox==3.28.0 tox-gh-actions==2.12.0 tox-external-wheels
tox --external_wheels 'dist/*.whl'