Skip to content

Commit

Permalink
Merge pull request #2342 from fatcat-z/update_required_ci
Browse files Browse the repository at this point in the history
Complete the CI tests.
  • Loading branch information
xiaowuhu authored Jun 24, 2024
2 parents 01fcd9b + 1eddac5 commit 1528091
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Keras2onnx Application Tests (CI)
name: Keras2onnx App Test (CI)

on:
pull_request:
Expand All @@ -9,16 +9,33 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9']
name:
- 'py38-tf2.9'
- 'py39-tf2.10'
- 'py39-tf2.15'
os: ['ubuntu-latest', 'windows-2022']
opset_version: ['18', '15']
ort_version: ['1.16.3']
onnx_version: ['1.15.0']
os: ['ubuntu-latest', 'windows-2022']
onnx_version: ['1.16.1']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.10'
tf_version: '2.10.0'
python_version: '3.9'
- name: 'py39-tf2.15'
tf_version: '2.15.0'
python_version: '3.9'

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -63,6 +80,7 @@ jobs:
pip install transformers==4.2.0
pip install keras-self-attention
pip install pytest pytest-cov pytest-runner
pip install "numpy<2"
pip install -e .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Keras2onnx Unit Tests (CI)
name: Keras2onnx Unit Test (CI)

on:
pull_request:
Expand All @@ -9,16 +9,37 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9']
name:
- 'py38-tf2.9'
- 'py39-tf2.10'
- 'py39-tf2.14'
- 'py310-tf2.15'
os: ['ubuntu-latest', 'windows-2022']
opset_version: ['18', '15']
ort_version: ['1.16.3']
onnx_version: ['1.15.0']
os: ['ubuntu-latest', 'windows-2022']
onnx_version: ['1.16.1']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.10'
tf_version: '2.10.0'
python_version: '3.9'
- name: 'py39-tf2.14'
tf_version: '2.14.0'
python_version: '3.9'
- name: 'py310-tf2.15'
tf_version: '2.15.0'
python_version: '3.10'

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -46,6 +67,8 @@ jobs:
pip install onnxruntime==${{ matrix.ort_version }}
pip uninstall -y protobuf
pip install "protobuf~=3.20"
pip install "numpy<2"
pip install -e .
echo "----- List all of depdencies:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,43 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9', '3.10']
name:
- 'py38-tf2.9'
- 'py39-tf2.9'
- 'py39-tf2.15'
- 'py310-tf2.15'
opset_version: ['18', '15']
ort_version: ['1.16.3']
onnx_version: ['1.16.1']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.9'
tf_version: '2.9.0'
python_version: '3.9'
- name: 'py39-tf2.15'
tf_version: '2.15.0'
python_version: '3.9'
- name: 'py310-tf2.15'
tf_version: '2.15.0'
python_version: '3.10'
- name: 'py37-tf1.15'
tf_version: '1.15.5'
python_version: '3.7'
os: 'ubuntu-latest'
opset_version: '15'
ort_version: '1.14.1'
onnx_version: '1.14.1'

runs-on: ubuntu-latest

Expand All @@ -33,7 +62,7 @@ jobs:
shell: bash
run: |
chmod +x ./tests/utils/setup_test_env.sh
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }}
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} ${{ matrix.onnx_version }}
- name: Fix Paths (Windows only)
if: runner.os == 'Windows'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pylint Workflow
name: Pylint

on:
pull_request:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests (CI)
name: Unit Test (CI)

on:
pull_request:
Expand All @@ -9,15 +9,46 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9']
name:
- 'py38-tf2.9'
- 'py39-tf2.10'
- 'py39-tf2.15'
- 'py310-tf2.15'
os: ['ubuntu-latest', 'windows-2022']
opset_version: ['18', '15']
ort_version: ['1.16.3']
os: ['ubuntu-latest', 'windows-2022']
onnx_version: ['1.16.1']
skip_tflite: ['False']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.10'
tf_version: '2.10.0'
python_version: '3.9'
- name: 'py39-tf2.15'
tf_version: '2.15.0'
python_version: '3.9'
- name: 'py310-tf2.15'
tf_version: '2.15.0'
python_version: '3.10'
- name: 'py37-tf1.15'
tf_version: '1.15.5'
python_version: '3.7'
os: 'ubuntu-latest'
opset_version: '15'
ort_version: '1.14.1'
onnx_version: '1.14.1'
skip_tflite: 'True'

runs-on: ${{ matrix.os }}

Expand All @@ -34,7 +65,7 @@ jobs:
shell: bash
run: |
chmod +x ./tests/utils/setup_test_env.sh
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }}
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} ${{ matrix.onnx_version }}
- name: Fix Paths (Windows only)
if: runner.os == 'Windows'
Expand All @@ -49,7 +80,7 @@ jobs:
run: |
export TF2ONNX_TEST_BACKEND=onnxruntime
export TF2ONNX_TEST_OPSET=${{ matrix.opset_version }}
export TF2ONNX_SKIP_TFLITE_TESTS=False
export TF2ONNX_SKIP_TFLITE_TESTS=${{ matrix.skip_tflite }}
export TF2ONNX_SKIP_TFJS_TESTS=True
export TF2ONNX_SKIP_TF_TESTS=False
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml
Expand All @@ -60,7 +91,7 @@ jobs:
run: |
set TF2ONNX_TEST_BACKEND=onnxruntime
set TF2ONNX_TEST_OPSET=${{ matrix.opset_version }}
set TF2ONNX_SKIP_TFLITE_TESTS=False
set TF2ONNX_SKIP_TFLITE_TESTS=${{ matrix.skip_tflite }}
set TF2ONNX_SKIP_TFJS_TESTS=True
set TF2ONNX_SKIP_TF_TESTS=False
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml
Expand Down
10 changes: 6 additions & 4 deletions tests/utils/setup_test_env.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#!/bin/bash

# # Check if the argument is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <tensorflow_version> <onnxruntime_version>"
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <tensorflow_version> <onnxruntime_version> <onnx_version>"
exit 1
fi

# Assign the argument to a variable
TF_VERSION=$1
ORT_VERSION=$2
ONNX_VERSION=$3

echo "==== TensorFlow version: $TF_VERSION"
echo "==== ONNXRuntime version: $ORT_VERSION"
echo "==== ONNX version: $ONNX_VERSION"

pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator
pip install onnx
pip install onnx==$ONNX_VERSION
pip install onnxruntime==$ORT_VERSION
pip install numpy
pip install "numpy<2"

pip install onnxruntime-extensions
pip install "tensorflow-text<=$TF_VERSION"
Expand Down

0 comments on commit 1528091

Please sign in to comment.