fix(build): use and cache venv for API job
This commit is contained in:
parent
a8bc371478
commit
46e0fe2cf7
|
@ -23,7 +23,7 @@ stages:
|
||||||
cache:
|
cache:
|
||||||
key:
|
key:
|
||||||
files:
|
files:
|
||||||
- yarn.lock
|
- gui/yarn.lock
|
||||||
paths:
|
paths:
|
||||||
- gui/node_modules/
|
- gui/node_modules/
|
||||||
policy: pull-push
|
policy: pull-push
|
||||||
|
@ -53,10 +53,18 @@ stages:
|
||||||
extends:
|
extends:
|
||||||
- .build-base
|
- .build-base
|
||||||
image: docker.io/python:3.10
|
image: docker.io/python:3.10
|
||||||
|
cache:
|
||||||
|
key:
|
||||||
|
files:
|
||||||
|
- api/requirements.txt
|
||||||
|
paths:
|
||||||
|
- api/onnx_env/
|
||||||
|
policy: pull-push
|
||||||
|
|
||||||
.build-curl:
|
.build-curl:
|
||||||
extends:
|
extends:
|
||||||
- .build-python
|
- .build-python
|
||||||
|
cache: {}
|
||||||
|
|
||||||
build-api-coverage:
|
build-api-coverage:
|
||||||
extends:
|
extends:
|
||||||
|
@ -64,6 +72,7 @@ build-api-coverage:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- cd api
|
- cd api
|
||||||
|
- ${CI_PROJECT_DIR}/common/scripts/make-venv.sh
|
||||||
- make ci
|
- make ci
|
||||||
|
|
||||||
build-gui-bundle:
|
build-gui-bundle:
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
if [ -d onnx_env ];
|
||||||
|
then
|
||||||
|
echo "Activating existing venv..."
|
||||||
|
source onnx_env/bin/activate
|
||||||
|
else
|
||||||
|
echo "Creating new venv..."
|
||||||
|
python3 -m venv onnx_env
|
||||||
|
fi
|
Loading…
Reference in New Issue