-
Notifications
You must be signed in to change notification settings - Fork 60
39 lines (38 loc) · 1.31 KB
/
test_whl_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
name: Test whl install
on:
workflow_dispatch: # Allow manual triggers
inputs:
python_version:
description: 'Python version'
required: false
default: '3.10'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python 3
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install twine wheel
- name: Build WHL file
run: |
version=$(python -c 'import model_compression_toolkit; print(model_compression_toolkit.__version__)')
now=$(date +'%Y%m%d-%H%M%S')
echo "nightly_version=$version.$now" >> $GITHUB_ENV
sed -i "s/attr: model_compression_toolkit.__version__/$version.$now/g" setup.cfg
sed -i "s/name='model_compression_toolkit'/name='model-compression-toolkit'/g" setup.py
python setup.py sdist bdist_wheel
- name: Install WHL file
run: |
whl_file=$(find . -iname "*.whl")
echo $whl_file
pip install $whl_file
pip list
python -c 'import model_compression_toolkit; print(model_compression_toolkit.__version__)'