-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
106 lines (106 loc) · 4.12 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
os: linux
dist: jammy
language: python
python:
- '3.10'
branches:
only:
- master
before_install:
- pip install --upgrade pip setuptools
jobs:
include:
- name: Check YAML format
install:
- pip install tox
script:
- tox -e yamllint
- name: flake8
install:
- pip install tox
script:
- tox -e flake8
- name: pymarkdown
install:
- pip install tox
script:
- tox -e pymarkdown
- stage: tsinghap
name: docker-compose tsiunnsuann
services:
- docker
before_script:
- cd fatchord-WaveRNN/
- export VIRTUAL_HOST=localhost
- export DEVICE=cpu
- export GUNICORN_WORKERS=1
- wget https://tongan-puntiunn.ithuan.tw/SuiSiann-HunLian/0.2.1-checkpoints.tgz
- tar -xzvf 0.2.1-checkpoints.tgz
script:
# 設定ZuGi
- git clone --depth 1 https://github.com/i3thuan5/ZuGi.git
- docker-compose -f ZuGi/docker-compose.yml up -d --build nginx-proxy
# 試docker-compose
- cat docker-compose.yaml | grep deploy
- sed '/deploy/,+6d' -i docker-compose.yaml
- docker-compose up -d
# Check Nginx format
- docker-compose run --rm nginx-cache nginx -t
- docker-compose run --rm hokbu-nginx nginx -t
- sleep 1
- BANGTSI=http://localhost/bangtsam?taibun=ta%CC%8Dk-ke%20ts%C3%B2-hu%C3%A9%20l%C3%A2i%20tshit-th%C3%B4!
- time curl -L "$BANGTSI" --output siann.mp3
- file siann.mp3 | tee siann.type.txt
- cat siann.type.txt | grep 16
- time curl -L "$BANGTSI" -I
- time curl -L "$BANGTSI" -I
- curl --max-time 1 -L "$BANGTSI" -I
- docker-compose exec hapsing find /kiatko/ -type f -delete
- curl --max-time 1 -L "$BANGTSI" -I
- "curl --max-time 1 -L \"$BANGTSI\" -H 'range: bytes=0-' -I"
after_failure:
- docker-compose -f ZuGi/docker-compose.yml logs
- docker-compose logs
- cat siann.type.txt
- cat siann.mp3
- stage: deploy
name: deploy
if: (type = push or type = cron) and (branch = master or branch = CD)
install:
- pip install ansible
before_script:
- mkdir -p "${HOME}/.ssh/"
- TRAVIS_TSUKI_SSH_KEY_PATH="${HOME}/.ssh/id_ed25519_travis"
- echo "${DEPLOY_HOST} ssh-ed25519 ${DEPLOY_HOST_SSH_PUBLICKEY}" >> ${HOME}/.ssh/known_hosts
- echo "${DEPLOY_HOST_USER_SSH_KEY}" | base64 --decode > "${TRAVIS_TSUKI_SSH_KEY_PATH}"
# Recreate the certificate from the secure environment variable
- chmod 400 "${TRAVIS_TSUKI_SSH_KEY_PATH}"
script:
- '
ansible-playbook -i fatchord-WaveRNN/deploy/inventory_travis
fatchord-WaveRNN/deploy/deploy.yaml
--extra-vars "TTS=fatchord-WaveRNN"
--extra-vars "tsuanan_repo=`basename ${TRAVIS_REPO_SLUG}`"
--extra-vars "branch=${TRAVIS_BRANCH}"
--extra-vars "DEPLOY_HOST=${DEPLOY_HOST}"
--extra-vars "DEPLOY_HOST_USER=${DEPLOY_HOST_USER}"
--extra-vars "TRAVIS_TSUKI_SSH_KEY_PATH=${TRAVIS_TSUKI_SSH_KEY_PATH}"
--extra-vars "AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL}"
--extra-vars "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
--extra-vars "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
--extra-vars "VIRTUAL_HOST=${VIRTUAL_HOST}"
--extra-vars "SENTRY_DSN=${SENTRY_DSN}"
--extra-vars "GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT}"
--extra-vars "GUNICORN_WORKERS=${GUNICORN_WORKERS}"
--extra-vars "GUNICORN_MAX_REQUESTS=${GUNICORN_MAX_REQUESTS}"
--extra-vars "GUNICORN_MAX_REQUESTS_JITTER=${GUNICORN_MAX_REQUESTS_JITTER}"
--extra-vars "DEVICE=${DEVICE}"
--extra-vars "CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}"
--extra-vars "VOCODER=${VOCODER}"
--extra-vars "BATCHED=${BATCHED}"
--extra-vars "TARGET=${TARGET}"
--extra-vars "OVERLAP=${OVERLAP}"
--extra-vars "GL_ITERS=${GL_ITERS}"
# --extra-vars 其他 .env.template 變數
'