|
| 1 | +name: Check Release |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + schedule: |
| 5 | + # every first day of the week |
| 6 | + - cron: '0 0 * * *' |
| 7 | + # push: |
| 8 | + |
| 9 | +jobs: |
| 10 | + |
| 11 | + release-linux-mac: |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + os: [ubuntu-latest, macOS-latest] |
| 15 | + python-version: ['3.12', '3.11', '3.10'] |
| 16 | + runs-on: ${{ matrix.os }} |
| 17 | + steps: |
| 18 | + - uses: actions/setup-python@v4 |
| 19 | + with: |
| 20 | + python-version: ${{ matrix.python-version }} |
| 21 | + - name: Install onnx-diagnostic |
| 22 | + run: pip install onnx-diagnostic |
| 23 | + - name: Version |
| 24 | + 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 |
| 29 | + 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 . |
| 42 | + - name: Install requirements |
| 43 | + run: pip install -r requirements-dev.txt |
| 44 | + - name: Run pytest |
| 45 | + run: pytest _unittests |
| 46 | + |
| 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 | + - name: Install onnx-diagnostic |
| 58 | + run: pip install onnx-diagnostic |
| 59 | + - name: Version |
| 60 | + run: | |
| 61 | + python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)" |
| 62 | + - name: Installation path |
| 63 | + run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)" |
| 64 | + - name: git checkout |
| 65 | + run: | |
| 66 | + git init |
| 67 | + git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git |
| 68 | + 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 |
| 72 | + echo requirements-dev.txt >> .git/info/sparse-checkout |
| 73 | + git pull origin main |
| 74 | + git checkout tags/0.2.2 -b thistag |
| 75 | + - name: ls |
| 76 | + run: ls . |
| 77 | + - name: Install requirements |
| 78 | + run: pip install -r requirements-dev.txt |
| 79 | + - name: Run pytest |
| 80 | + run: pytest _unittests |
0 commit comments