Skip to content

Commit a407412

Browse files
committed
fix check-release
1 parent 3c361b1 commit a407412

File tree

1 file changed

+43
-42
lines changed

1 file changed

+43
-42
lines changed

.github/workflows/check-release.yml

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,73 +8,74 @@ on:
88

99
jobs:
1010

11-
release-linux-mac:
11+
name: release-${{ matrix.torch }}-tr-${{ matrix.transformers }}-ci ${{ matrix.os }}-${{ matrix.python }}
12+
runs-on: ${{ matrix.os }}
1213
strategy:
1314
matrix:
14-
os: [ubuntu-latest, macOS-latest]
15-
python-version: ['3.12', '3.11', '3.10']
16-
runs-on: ${{ matrix.os }}
15+
os: [ubuntu-latest, macOS-latest, windows-latest]
16+
python: ['3.11', '3.12']
17+
transformers: ['4.48.3', '4.51.3', 'main']
18+
torch: ['2.6', 'main']
19+
1720
steps:
1821
- uses: actions/setup-python@v4
1922
with:
2023
python-version: ${{ matrix.python-version }}
21-
- name: Install onnx-diagnostic
22-
run: pip install onnx-diagnostic
23-
- name: Version
24+
25+
- name: Install pytorch
2426
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
27+
if [[ "${{ matrix.torch }}" == "main" ]]; then
28+
python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
29+
else
30+
echo "install torch==${{ matrix.torch }}"
31+
pip install torch==${{ matrix.torch }}
32+
fi
33+
34+
- name: Install transformers ${{ matrix.transformers }}
2935
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 .
36+
if [[ "${{ matrix.transformers }}" == "main" ]]; then
37+
echo "install transformers from github"
38+
git clone https://github.com/huggingface/transformers.git
39+
cd transformers
40+
pip install -e .
41+
cd ..
42+
else
43+
echo "install transformers==${{ matrix.transformers }}"
44+
pip install transformers==${{ matrix.transformers }}
45+
fi
46+
4247
- name: Install requirements
48+
run: python -m pip install -r requirements.txt
49+
50+
- name: Install requirements-dev
4351
run: pip install -r requirements-dev.txt
44-
- name: Run pytest
45-
run: pytest _unittests
4652

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 }}
5753
- name: Install onnx-diagnostic
5854
run: pip install onnx-diagnostic
55+
5956
- name: Version
6057
run: |
6158
python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)"
59+
60+
- name: pip freeze
61+
run: python -m pip freeze
62+
6263
- name: Installation path
6364
run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)"
6465
- name: git checkout
6566
run: |
6667
git init
6768
git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git
6869
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
70+
echo _unittests/ >> .git/info/sparse-checkout
71+
echo _doc/examples/ >> .git/info/sparse-checkout
72+
echo _doc/recipes/ >> .git/info/sparse-checkout
73+
echo pyproject.toml >> .git/info/sparse-checkout
7274
echo requirements-dev.txt >> .git/info/sparse-checkout
7375
git pull origin main
74-
git checkout tags/0.2.2 -b thistag
76+
VERSION=$(python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)")
77+
git checkout tags/${VERSION} -b thistag
7578
- name: ls
7679
run: ls .
77-
- name: Install requirements
78-
run: pip install -r requirements-dev.txt
7980
- name: Run pytest
80-
run: pytest _unittests
81+
run: UNITTEST_GOING=1 pytest _unittests --maxfail=15 --durations=10

0 commit comments

Comments
 (0)