|
| 1 | +name: Keras2onnx App Test (CI) |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
| 16 | +jobs: |
| 17 | + |
| 18 | + Test_min_py_with_min_tf: # Do not change this name because it is used in Ruleset of this repo. |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + runs-on: ubuntu-latest |
| 22 | + |
| 23 | + steps: |
| 24 | + - name: Checkout code |
| 25 | + uses: actions/checkout@v4 |
| 26 | + |
| 27 | + - name: Run Tests (Py38-TF2.9) |
| 28 | + uses: ./.github/actions/keras_application_test |
| 29 | + with: |
| 30 | + tf_version: '2.9.0' |
| 31 | + python_version: '3.8' |
| 32 | + ort_version: '1.16.3' |
| 33 | + onnx_version: '1.16.1' |
| 34 | + |
| 35 | + - name: Upload Test Results |
| 36 | + if: always() |
| 37 | + uses: actions/upload-artifact@v3 |
| 38 | + with: |
| 39 | + name: Test Results (Py38-TF2.9-ubuntu) |
| 40 | + path: ./**/test-results-*.xml |
| 41 | + |
| 42 | + Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo. |
| 43 | + strategy: |
| 44 | + fail-fast: false |
| 45 | + runs-on: ubuntu-latest |
| 46 | + |
| 47 | + steps: |
| 48 | + - name: Checkout code |
| 49 | + uses: actions/checkout@v4 |
| 50 | + |
| 51 | + - name: Run Tests (Py310-TF2.15) |
| 52 | + uses: ./.github/actions/keras_application_test |
| 53 | + with: |
| 54 | + tf_version: '2.15.0' |
| 55 | + python_version: '3.10' |
| 56 | + ort_version: '1.16.3' |
| 57 | + onnx_version: '1.16.1' |
| 58 | + |
| 59 | + - name: Upload Test Results |
| 60 | + if: always() |
| 61 | + uses: actions/upload-artifact@v3 |
| 62 | + with: |
| 63 | + name: Test Results (Py310-TF2.15-ubuntu) |
| 64 | + path: ./**/test-results-*.xml |
| 65 | + |
| 66 | + Test_py37_with_tf1_15: # Do not change this name because it is used in Ruleset of this repo. |
| 67 | + strategy: |
| 68 | + fail-fast: false |
| 69 | + runs-on: ubuntu-latest |
| 70 | + |
| 71 | + steps: |
| 72 | + - name: Checkout code |
| 73 | + uses: actions/checkout@v4 |
| 74 | + |
| 75 | + - name: Run Tests (Py37-TF1.15) |
| 76 | + uses: ./.github/actions/keras_application_test |
| 77 | + with: |
| 78 | + tf_version: '1.15.5' |
| 79 | + python_version: '3.7' |
| 80 | + ort_version: '1.14.1' |
| 81 | + onnx_version: '1.14.1' |
| 82 | + |
| 83 | + - name: Upload Test Results |
| 84 | + if: always() |
| 85 | + uses: actions/upload-artifact@v3 |
| 86 | + with: |
| 87 | + name: Test Results (Py37-TF1.15-ubuntu) |
| 88 | + path: ./**/test-results-*.xml |
| 89 | + |
| 90 | + Extra_tests: |
| 91 | + strategy: |
| 92 | + fail-fast: false |
| 93 | + matrix: |
| 94 | + name: |
| 95 | + - 'py39-tf2.10' |
| 96 | + - 'py39-tf2.15' |
| 97 | + os: ['ubuntu-latest', 'windows-2022'] |
| 98 | + ort_version: ['1.16.3'] |
| 99 | + onnx_version: ['1.16.1'] |
| 100 | + include: |
| 101 | + - name: 'py39-tf2.10' |
| 102 | + tf_version: '2.10.0' |
| 103 | + python_version: '3.9' |
| 104 | + - name: 'py39-tf2.15' |
| 105 | + tf_version: '2.15.0' |
| 106 | + python_version: '3.9' |
| 107 | + runs-on: ${{ matrix.os }} |
| 108 | + |
| 109 | + steps: |
| 110 | + - name: Checkout code |
| 111 | + uses: actions/checkout@v4 |
| 112 | + |
| 113 | + - name: Run Tests (Py${{ matrix.python_version }}_TF${{ matrix.tf_version }}_${{ matrix.os }}_${{ matrix.ort_version }}) |
| 114 | + uses: ./.github/actions/keras_application_test |
| 115 | + with: |
| 116 | + tf_version: ${{ matrix.tf_version }} |
| 117 | + python_version: ${{ matrix.python_version }} |
| 118 | + ort_version: ${{ matrix.ort_version }} |
| 119 | + onnx_version: ${{ matrix.onnx_version }} |
| 120 | + - name: Upload Test Results |
| 121 | + if: always() |
| 122 | + uses: actions/upload-artifact@v3 |
| 123 | + with: |
| 124 | + name: Test Results (${{ matrix.python_version }}-${{ matrix.tf_version }}-${{ matrix.os }}) |
| 125 | + path: ./**/test-results*.xml |
| 126 | + |
| 127 | + publish-test-results: |
| 128 | + name: "Publish Tests Results to Github" |
| 129 | + needs: [Test_min_py_with_min_tf, Test_max_py_with_latest_tf, Test_py37_with_tf1_15, Extra_tests] |
| 130 | + runs-on: ubuntu-latest |
| 131 | + permissions: |
| 132 | + checks: write |
| 133 | + pull-requests: write |
| 134 | + if: always() |
| 135 | + steps: |
| 136 | + - name: Download Artifacts |
| 137 | + uses: actions/download-artifact@v3 |
| 138 | + with: |
| 139 | + path: artifacts |
| 140 | + |
| 141 | + - name: Publish Test Results |
| 142 | + uses: EnricoMi/publish-unit-test-result-action@v2 |
| 143 | + with: |
| 144 | + files: "artifacts/**/*.xml" |
0 commit comments