Skip to content

Commit 0905ccc

Browse files
authored
fix check-release (#68)
* fix check-release * run * rel
1 parent 3c361b1 commit 0905ccc

File tree

1 file changed

+49
-44
lines changed

1 file changed

+49
-44
lines changed
Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,85 @@
11
name: Check Release
2+
23
on:
34
workflow_dispatch:
45
schedule:
56
# every first day of the week
67
- cron: '0 0 * * *'
78
# push:
89

9-
jobs:
1010

11-
release-linux-mac:
11+
jobs:
12+
run:
13+
name: release-${{ matrix.torch }}-tr-${{ matrix.transformers }}-ci ${{ matrix.os }}-${{ matrix.python }}
14+
runs-on: ${{ matrix.os }}
1215
strategy:
1316
matrix:
14-
os: [ubuntu-latest, macOS-latest]
15-
python-version: ['3.12', '3.11', '3.10']
16-
runs-on: ${{ matrix.os }}
17+
os: [ubuntu-latest, macOS-latest, windows-latest]
18+
python: ['3.11', '3.12']
19+
transformers: ['4.48.3', '4.51.3', 'main']
20+
torch: ['2.6', 'main']
21+
1722
steps:
23+
24+
1825
- uses: actions/setup-python@v4
1926
with:
20-
python-version: ${{ matrix.python-version }}
21-
- name: Install onnx-diagnostic
22-
run: pip install onnx-diagnostic
23-
- name: Version
27+
python-version: ${{ matrix.python }}
28+
29+
- name: Install pytorch
2430
run: |
25-
python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)"
26-
- name: Installation path
27-
run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)"
28-
- name: git checkout
31+
if [[ "${{ matrix.torch }}" == "main" ]]; then
32+
python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
33+
else
34+
echo "install torch==${{ matrix.torch }}"
35+
pip install torch==${{ matrix.torch }}
36+
fi
37+
38+
- name: Install transformers ${{ matrix.transformers }}
2939
run: |
30-
git init
31-
git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git
32-
git config core.sparsecheckout true
33-
echo _unittests/ >> .git/info/sparse-checkout
34-
echo _doc/examples/ >> .git/info/sparse-checkout
35-
echo pyproject.toml >> .git/info/sparse-checkout
36-
echo requirements-dev.txt >> .git/info/sparse-checkout
37-
git pull origin main
38-
VERSION=$(python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)")
39-
git checkout tags/${VERSION} -b thistag
40-
- name: ls
41-
run: ls .
40+
if [[ "${{ matrix.transformers }}" == "main" ]]; then
41+
echo "install transformers from github"
42+
git clone https://github.com/huggingface/transformers.git
43+
cd transformers
44+
pip install -e .
45+
cd ..
46+
else
47+
echo "install transformers==${{ matrix.transformers }}"
48+
pip install transformers==${{ matrix.transformers }}
49+
fi
50+
4251
- name: Install requirements
52+
run: python -m pip install -r requirements.txt
53+
54+
- name: Install requirements-dev
4355
run: pip install -r requirements-dev.txt
44-
- name: Run pytest
45-
run: pytest _unittests
4656

47-
release-windows:
48-
strategy:
49-
matrix:
50-
os: [windows-latest]
51-
python-version: ['3.12', '3.11', '3.10']
52-
runs-on: ${{ matrix.os }}
53-
steps:
54-
- uses: actions/setup-python@v4
55-
with:
56-
python-version: ${{ matrix.python-version }}
5757
- name: Install onnx-diagnostic
5858
run: pip install onnx-diagnostic
59+
5960
- name: Version
6061
run: |
6162
python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)"
63+
64+
- name: pip freeze
65+
run: python -m pip freeze
66+
6267
- name: Installation path
6368
run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)"
6469
- name: git checkout
6570
run: |
6671
git init
6772
git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git
6873
git config core.sparsecheckout true
69-
echo _unittests/ >> .git\info\sparse-checkout
70-
echo _doc/examples/ >> .git\info\sparse-checkout
71-
echo pyproject.toml >> .git\info\sparse-checkout
74+
echo _unittests/ >> .git/info/sparse-checkout
75+
echo _doc/examples/ >> .git/info/sparse-checkout
76+
echo _doc/recipes/ >> .git/info/sparse-checkout
77+
echo pyproject.toml >> .git/info/sparse-checkout
7278
echo requirements-dev.txt >> .git/info/sparse-checkout
7379
git pull origin main
74-
git checkout tags/0.2.2 -b thistag
80+
VERSION=$(python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)")
81+
git checkout tags/${VERSION} -b thistag
7582
- name: ls
7683
run: ls .
77-
- name: Install requirements
78-
run: pip install -r requirements-dev.txt
7984
- name: Run pytest
80-
run: pytest _unittests
85+
run: UNITTEST_GOING=1 pytest _unittests --maxfail=15 --durations=10

0 commit comments

Comments
 (0)