themblem/.gitlab-ci.yml
Fam Zheng ab29679f48 ci: Don't cache opencv/
cmake complains about inconsistent state:

https://gitlab.com/euphon/themblem/-/jobs/9135028833
2025-02-13 21:56:28 +00:00

117 lines
1.8 KiB
YAML

stages:
- download-models
- test-and-build
- build-docker
- deploy
cache:
key: one-key-to-rule-them-all
paths:
- emtest/target
download-models:
stage: download-models
tags:
- emblem-dev
script:
- make download-models
artifacts:
paths:
- detection/model
cache:
key: models
paths:
- detection/model
test:
stage: test-and-build
tags:
- emblem-dev
before_script:
- env
- pip3 install -r requirements.txt
script:
- make opencv -j$(nproc --ignore=2)
- make -C alg qrtool -j$(nproc --ignore=2)
- make test
dependencies:
- download-models
build-alg:
stage: test-and-build
tags:
- emblem-dev
script:
- make opencv -j$(nproc --ignore=2)
- make build/alg/qrtool -j$(nproc --ignore=2)
artifacts:
paths:
- build
- alg/qrtool
build-web:
stage: test-and-build
tags:
- emblem-dev
before_script:
- (cd web; npm install)
script:
- make web
artifacts:
paths:
- build
build-docker:
stage: build-docker
tags:
- emblem-dev
script:
- make docker-build
- make docker-push
dependencies:
- build-web
- build-alg
- download-models
except:
- main
deploy-dev:
stage: deploy
tags:
- emblem-dev
only:
- dev
script:
- make deploy-api-dev
cache: []
dev-smoke:
stage: test-and-build
tags:
- emblem-dev
allow_failure: true
script:
- ./scripts/emcli --env dev activate 0074253255108
- ./api/scripts/api_smoke.py -p $EMBLEM_CI_PASSWORD
cache: []
deploy-prod:
stage: deploy
tags:
- emblem-dev
only:
- main
script:
- make docker-push-prod
- make deploy-api-prod
cache: []
deploy-roi-worker:
tags:
- emblem-s1
stage: deploy
when: manual
script:
- make deploy-roi-worker
cache: []