70 lines
2.7 KiB
YAML
70 lines
2.7 KiB
YAML
# must set build pipeline as .woodpecker/ with the trailing slash to activate the
|
|
# multiple pipelines
|
|
|
|
platform: linux/amd64
|
|
|
|
pipeline:
|
|
unitTests:
|
|
image: "docker.bics.ga/rei_ci/rust-sccache:latest-amd64"
|
|
pull: true
|
|
commands:
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -qq update > /dev/null
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev > /dev/null
|
|
- cargo build --all
|
|
- cargo test --all
|
|
- sccache --show-stats
|
|
environment:
|
|
RUSTC_WRAPPER: /usr/local/bin/sccache
|
|
SCCACHE_S3_USE_SSL: "true"
|
|
SCCACHE_ENDPOINT: "richie.m4.tanukitsu.net:443"
|
|
secrets:
|
|
- sccache_bucket
|
|
- aws_access_key_id
|
|
- aws_secret_access_key
|
|
when:
|
|
event: [push, pull_request]
|
|
|
|
|
|
testSuite:
|
|
image: "docker.bics.ga/rei_ci/rust-sccache:latest-amd64"
|
|
commands:
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -qq update > /dev/null
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -yqq -o=Dpkg::Use-Pty=0 install pkg-config libssl-dev build-essential libsqlite3-dev python3.9 python3.9-venv postgresql postgresql-client mariadb-server mariadb-client zstd lz4 > /dev/null
|
|
- pg_ctlcluster 13 main start
|
|
- "mysqld_safe &"
|
|
- su postgres -c 'createuser root'
|
|
- su postgres -c 'createdb -O root testsuitedb'
|
|
- psql testsuitedb -c 'CREATE TABLE testsuitetable ();'
|
|
- mysql -e 'CREATE DATABASE testsuitemydb; USE testsuitemydb; CREATE TABLE sometable (id INT PRIMARY KEY); INSERT INTO sometable VALUES (42);'
|
|
- cargo install -q --path yama
|
|
- cargo install -q --path datman
|
|
- python3.9 -m venv testsuite/.venv
|
|
- ./testsuite/.venv/bin/pip install -e testsuite -e datman-helper-postgres -e datman-helper-mysql
|
|
- cd testsuite && . .venv/bin/activate && TEST_POSTGRES=$(hostname),testsuitedb,root TEST_MYSQL=$(hostname),testsuitemydb,root green
|
|
- sccache --show-stats
|
|
environment:
|
|
RUSTC_WRAPPER: /usr/local/bin/sccache
|
|
SCCACHE_S3_USE_SSL: "true"
|
|
SCCACHE_ENDPOINT: "richie.m4.tanukitsu.net:443"
|
|
secrets:
|
|
- sccache_bucket
|
|
- aws_access_key_id
|
|
- aws_secret_access_key
|
|
when:
|
|
event: [push, pull_request]
|
|
|
|
deployManual:
|
|
image: "docker.bics.ga/rei_ci/mdbook:latest-amd64"
|
|
pull: true
|
|
when:
|
|
branch:
|
|
- develop
|
|
secrets:
|
|
- deploy_ssh_key
|
|
commands: # warning! Doesn't seem to like hashed known_hosts...
|
|
- mdbook build
|
|
- echo "$DEPLOY_SSH_KEY" > /tmp/rsync_key
|
|
- chmod u=rw,go= /tmp/rsync_key
|
|
- rsync -e 'ssh -i /tmp/rsync_key -o "UserKnownHostsFile ./.ci/known_hosts"' -vaz --delete ./book/ space_docs_librepush_net@sallie.librepush.net:./public/yama
|
|
- rm /tmp/rsync_key
|