themblem/.gitlab-ci.yml
2025-11-23 18:59:07 +00:00

102 lines
1.8 KiB
YAML

stages:
- ailab
- test-and-build
- build-docker
- deploy
variables:
GIT_DEPTH: 1
test:
stage: test-and-build
when: manual
except:
- main
tags:
- i7
script:
- make opencv -j$(nproc --ignore=2)
- make test
build-web:
stage: test-and-build
except:
- main
tags:
- i7
before_script:
- (cd web; npm install)
script:
- make web
artifacts:
paths:
- build
build-docker:
stage: build-docker
except:
- main
tags:
- i7
script:
- make docker-build
- make docker-push
- make docker-push-prod
dependencies:
- build-web
except:
- main
deploy-dev:
stage: deploy
except:
- main
tags:
- ed2
script:
- make deploy-api-dev
cache: []
dependencies: []
dev-smoke:
stage: test-and-build
when: manual
tags:
- i7
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:
- i7
only:
- main
script:
- make deploy-api-prod
cache: []
dependencies: []
ailab:
stage: ailab
tags:
- ailab
before_script:
- test -d $HOME/venv || python3 -m venv $HOME/venv
- source $HOME/venv/bin/activate
- pip install uv --index-url https://pypi.tuna.tsinghua.edu.cn/simple
- export PATH="$HOME/venv/bin:$HOME/.local/bin:$PATH"
- $HOME/venv/bin/uv venv --python /usr/bin/python3 venv
- source venv/bin/activate
- export PATH="$HOME/venv/bin:$PATH"
- uv pip install -r requirements.txt --default-index https://pypi.tuna.tsinghua.edu.cn/simple
script:
- source venv/bin/activate
- export PATH="$HOME/venv/bin:$PATH"
- export DATA_DIR=$HOME/emblem
- make fetch
- make sbs
- make train