1 Star 0 Fork 0

deeplearningrepos/coremltools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.gitlab-ci.yml 7.58 KB
一键复制 编辑 原始数据 按行查看 历史
Krishna Sridhar 提交于 2020-11-21 15:16 +08:00 . Remove Python 2.7 from gitlab CI (#999)
stages:
- check
- build
- test
- collect
#########################################################################
##
## Check
##
#########################################################################
check_python_flake8:
tags:
- docker
image: "python:3.7"
stage: check
script:
- python -m pip install --upgrade pip
- pip install flake8
- flake8 ./coremltools --count --select=E9,F63,F7,F82 --show-source --statistics
########################################################################
#
# linux - Build
#
########################################################################
.build_linux: &build_linux
tags:
- docker
stage: build
script:
- export PATH=$PATH:$HOME/miniconda3/condabin
- zsh -e scripts/build.sh --num-procs=4 --python=$PYTHON --dist
artifacts:
expire_in: 2 weeks
paths:
- build/dist/
build_wheel_linux_py35:
<<: *build_linux
image: registry.gitlab.com/zach_nation/coremltools/build-image-ubuntu-14.04:1.0.3
variables:
PYTHON: "3.5"
build_wheel_linux_py36:
<<: *build_linux
image: registry.gitlab.com/zach_nation/coremltools/build-image-ubuntu-14.04:1.0.3
variables:
PYTHON: "3.6"
build_wheel_linux_py37:
<<: *build_linux
image: registry.gitlab.com/zach_nation/coremltools/build-image-ubuntu-14.04:1.0.3
variables:
PYTHON: "3.7"
build_wheel_linux_py38:
<<: *build_linux
image: registry.gitlab.com/zach_nation/coremltools/build-image-ubuntu-14.04:1.0.3
variables:
PYTHON: "3.8"
#########################################################################
##
## macOS - Build
##
#########################################################################
.build_macos: &build_macos
tags:
- macos10.15
stage: build
script:
- zsh -e scripts/build.sh --num-procs=4 --python=$PYTHON --dist
artifacts:
expire_in: 2 weeks
paths:
- build/dist/
## Uses Python 3.5 from python.org
build_wheel_macos_py35:
<<: *build_macos
variables:
PYTHON: "3.5"
## Uses Python 3.6 from python.org
build_wheel_macos_py36:
<<: *build_macos
variables:
PYTHON: "3.6"
## Uses Python 3.7 from python.org
build_wheel_macos_py37:
<<: *build_macos
variables:
PYTHON: "3.7"
## Uses Python 3.8 from python.org
build_wheel_macos_py38:
<<: *build_macos
variables:
PYTHON: "3.8"
#########################################################################
##
## macOS - Test
##
#########################################################################
.test_macos_pkg: &test_macos_pkg
stage: test
script:
- zsh -e scripts/test.sh --wheel-path=${WHEEL_PATH} --python=${PYTHON}
--test-package=${TEST_PACKAGE} --fast
.test_macos_pkg_with_reqs: &test_macos_pkg_with_reqs
stage: test
script:
- zsh -e scripts/test.sh --wheel-path=${WHEEL_PATH} --python=${PYTHON}
--test-package=${TEST_PACKAGE} --requirements=${REQUIREMENTS} --fast
test_macos11_py37_coremltools_test:
<<: *test_macos_pkg
tags:
- macos11
dependencies:
- build_wheel_macos_py37
variables:
WHEEL_PATH: build/dist/*cp37*10_16*
TEST_PACKAGE: coremltools.test
PYTHON: "3.7"
only:
changes:
- coremltools/test/**/*.{py}
- coremltools/models/**/*.{py}
- coremltools/converters/caffe/**/*.{py}
- coremltools/converters/keras/**/*.{py}
- coremltools/converters/libsvm/**/*.{py}
- coremltools/converters/sklearn/**/*.{py}
- coremltools/converters/xgboost/**/*.{py}
test_macos11_py37_pytorch:
<<: *test_macos_pkg
tags:
- macos11
dependencies:
- build_wheel_macos_py37
variables:
PYTHON: "3.7"
TEST_PACKAGE: coremltools.converters.mil.frontend.torch
WHEEL_PATH: build/dist/*cp37*10_16*
only:
changes:
- coremltools/converters/mil/frontend/torch/**/*.{py}
- coremltools/converters/mil/mil/**/*.{py}
- coremltools/converters/mil/backend/**/*.{py}
test_macos11_py37_tf1:
<<: *test_macos_pkg
tags:
- macos11
dependencies:
- build_wheel_macos_py37
variables:
PYTHON: "3.7"
TEST_PACKAGE: coremltools.converters.mil.frontend.tensorflow
WHEEL_PATH: build/dist/*cp37*10_16*
only:
changes:
- coremltools/converters/mil/frontend/tensorflow/**/*.{py}
- coremltools/converters/mil/mil/**/*.{py}
- coremltools/converters/mil/backend/**/*.{py}
test_macos11_py37_tf2:
<<: *test_macos_pkg_with_reqs
tags:
- macos11
dependencies:
- build_wheel_macos_py37
variables:
PYTHON: "3.7"
REQUIREMENTS: reqs/test_tf2.pip
TEST_PACKAGE: coremltools.converters.mil.frontend.tensorflow2
WHEEL_PATH: build/dist/*cp37*10_16*
only:
changes:
- coremltools/converters/mil/frontend/tensorflow2/**/*.{py}
- coremltools/converters/mil/mil/**/*.{py}
- coremltools/converters/mil/backend/**/*.{py}
test_macos11_py37_mil:
<<: *test_macos_pkg
tags:
- macos11
dependencies:
- build_wheel_macos_py37
variables:
PYTHON: "3.7"
TEST_PACKAGE: coremltools.converters.mil.mil
WHEEL_PATH: build/dist/*cp37*10_16*
only:
changes:
- coremltools/converters/mil/mil/**/*.{py}
- coremltools/converters/mil/backend/**/*.{py}
#########################################################################
##
## macOS - Smoke Test on older versions
##
#########################################################################
test_macos11_py38_coremltools_smoke_test:
<<: *test_macos_pkg
tags:
- macos11
dependencies:
- build_wheel_macos_py38
variables:
WHEEL_PATH: build/dist/*cp38*10_16*
TEST_PACKAGE: coremltools.test.neural_network.test_simple_nn_inference
PYTHON: "3.8"
test_macos10_15_py38_coremltools_smoke_test:
<<: *test_macos_pkg
tags:
- macos10.15
dependencies:
- build_wheel_macos_py38
variables:
WHEEL_PATH: build/dist/*cp38*10_15*
TEST_PACKAGE: coremltools.test.neural_network.test_simple_nn_inference
PYTHON: "3.8"
test_macos10_14_py38_coremltools_smoke_test:
<<: *test_macos_pkg
tags:
- macos10.14
dependencies:
- build_wheel_macos_py38
variables:
WHEEL_PATH: build/dist/*cp38*10_14*
TEST_PACKAGE: coremltools.test.neural_network.test_simple_nn_inference
PYTHON: "3.8"
#########################################################################
##
## Make docs
##
#########################################################################
build_documentation:
tags:
- docker
stage: test
image: registry.gitlab.com/zach_nation/coremltools/build-image-ubuntu-14.04:1.0.3
script:
- bash -e scripts/build_docs.sh --wheel-path=${WHEEL_PATH} --python=${PYTHON}
dependencies:
- build_wheel_linux_py37
artifacts:
when: always
expire_in: 2 weeks
paths:
- _build/html/
variables:
WHEEL_PATH: build/dist/coremltools*cp37-none-manylinux1_x86_64.whl
PYTHON: "3.7"
only:
changes:
- docs/**/*
#########################################################################
##
## Collect artifacts
##
#########################################################################
collect_artifacts:
tags:
- docker
services:
- docker:18.09-dind
image: alpine:latest
stage: collect
script:
echo "Collect artifacts (wheels and documentation)"
dependencies:
- build_wheel_linux_py35
- build_wheel_linux_py36
- build_wheel_linux_py37
- build_wheel_linux_py38
- build_wheel_macos_py35
- build_wheel_macos_py36
- build_wheel_macos_py37
- build_wheel_macos_py38
artifacts:
expire_in: 2 weeks
paths:
- build/dist/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/deeplearningrepos/coremltools.git
git@gitee.com:deeplearningrepos/coremltools.git
deeplearningrepos
coremltools
coremltools
master

搜索帮助