Check Release #188
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Release | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # every first day of the week | |
| - cron: '0 0 * * *' | |
| # push: | |
| jobs: | |
| run: | |
| name: release-${{ matrix.torch }}-tr-${{ matrix.transformers }}-ci ${{ matrix.os }}-${{ matrix.python }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest, windows-latest] | |
| python: ['3.11', '3.12'] | |
| transformers: ['4.48.3', '4.52.4', '4.55.4', 'main'] | |
| torch: ['2.7', '2.8', 'main'] | |
| steps: | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install pytorch | |
| run: | | |
| if [ "${{ matrix.torch }}" = "main" ]; then | |
| python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu | |
| else | |
| echo "install torch==${{ matrix.torch }}" | |
| pip install torch==${{ matrix.torch }} | |
| fi | |
| - name: Install transformers ${{ matrix.transformers }} | |
| run: | | |
| if [ "${{ matrix.transformers }}" = "main" ]; then | |
| echo "install transformers from github" | |
| git clone https://github.com/huggingface/transformers.git | |
| cd transformers | |
| pip install -e . | |
| cd .. | |
| else | |
| echo "install transformers==${{ matrix.transformers }}" | |
| pip install transformers==${{ matrix.transformers }} | |
| fi | |
| - name: Install requirements | |
| run: python -m pip install -r requirements.txt | |
| - name: Install requirements-dev | |
| run: pip install -r requirements-dev.txt | |
| - name: Install onnx-diagnostic | |
| run: pip install onnx-diagnostic | |
| - name: Version | |
| run: | | |
| python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)" | |
| - name: pip freeze | |
| run: python -m pip freeze | |
| - name: Installation path | |
| run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)" | |
| - name: git checkout | |
| run: | | |
| git init | |
| git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git | |
| git config core.sparsecheckout true | |
| echo _unittests/ >> .git/info/sparse-checkout | |
| echo _doc/examples/ >> .git/info/sparse-checkout | |
| echo _doc/recipes/ >> .git/info/sparse-checkout | |
| echo _doc/technical/ >> .git/info/sparse-checkout | |
| echo pyproject.toml >> .git/info/sparse-checkout | |
| echo requirements-dev.txt >> .git/info/sparse-checkout | |
| git pull origin main | |
| VERSION=$(python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)") | |
| git checkout tags/${VERSION} -b thistag | |
| - name: ls | |
| run: ls . | |
| - name: Run pytest | |
| run: UNITTEST_GOING=1 pytest _unittests --maxfail=15 --durations=10 |