代码拉取完成,页面将自动刷新
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/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。