|
1 | 1 | name: Check Release |
| 2 | + |
2 | 3 | on: |
3 | 4 | workflow_dispatch: |
4 | 5 | schedule: |
5 | 6 | # every first day of the week |
6 | 7 | - cron: '0 0 * * *' |
7 | 8 | # push: |
8 | 9 |
|
9 | | -jobs: |
10 | 10 |
|
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 }} |
12 | 15 | strategy: |
13 | 16 | 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 | + |
17 | 22 | steps: |
| 23 | + |
| 24 | + |
18 | 25 | - uses: actions/setup-python@v4 |
19 | 26 | 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 |
24 | 30 | 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 }} |
29 | 39 | 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 | +
|
42 | 51 | - name: Install requirements |
| 52 | + run: python -m pip install -r requirements.txt |
| 53 | + |
| 54 | + - name: Install requirements-dev |
43 | 55 | run: pip install -r requirements-dev.txt |
44 | | - - name: Run pytest |
45 | | - run: pytest _unittests |
46 | 56 |
|
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 }} |
57 | 57 | - name: Install onnx-diagnostic |
58 | 58 | run: pip install onnx-diagnostic |
| 59 | + |
59 | 60 | - name: Version |
60 | 61 | run: | |
61 | 62 | python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)" |
| 63 | +
|
| 64 | + - name: pip freeze |
| 65 | + run: python -m pip freeze |
| 66 | + |
62 | 67 | - name: Installation path |
63 | 68 | run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)" |
64 | 69 | - name: git checkout |
65 | 70 | run: | |
66 | 71 | git init |
67 | 72 | git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git |
68 | 73 | 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 |
72 | 78 | echo requirements-dev.txt >> .git/info/sparse-checkout |
73 | 79 | 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 |
75 | 82 | - name: ls |
76 | 83 | run: ls . |
77 | | - - name: Install requirements |
78 | | - run: pip install -r requirements-dev.txt |
79 | 84 | - name: Run pytest |
80 | | - run: pytest _unittests |
| 85 | + run: UNITTEST_GOING=1 pytest _unittests --maxfail=15 --durations=10 |
0 commit comments