You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.5 KiB
78 lines
2.5 KiB
image: debian/unstable
|
|
packages:
|
|
- opam
|
|
- ocaml
|
|
- curl
|
|
sources:
|
|
- https://git.zapashcanon.fr/zapashcanon/omg
|
|
environment:
|
|
name: omg
|
|
deploy: fs@zapashcanon.fr
|
|
sshopts: "-o StrictHostKeyChecking=no -q"
|
|
coverage_dst: /var/www/coverage.zapashcanon.fr
|
|
doc_dst: /var/www/doc.zapashcanon.fr
|
|
archive_dst: /var/www/fs.zapashcanon.fr/archive
|
|
secrets:
|
|
- ec1f49cd-38dc-41d9-89f4-c3b6ecd7bcad # ssh deploy key
|
|
- b5b0e36c-fe52-43c4-9103-0aa918ad175c # github token
|
|
- c9e55d80-7b6a-4ad4-81bd-921d2c3247b8 # dune release profile
|
|
- ff8575b8-7192-4e0c-9905-6d04142a4ec1 # git config
|
|
tasks:
|
|
- setup: |
|
|
opam init -y
|
|
opam update -y
|
|
opam install -y dune bisect_ppx odoc ocamlformat
|
|
- lint-format: |
|
|
cd $name
|
|
eval "$(opam env)"
|
|
ocamlformat -p ocamlformat --enable-outside-detected-project --check $(find . -name '*.ml')
|
|
- build: |
|
|
cd $name
|
|
eval "$(opam env)"
|
|
dune build @all
|
|
- test: |
|
|
cd $name
|
|
eval "$(opam env)"
|
|
dune runtest
|
|
- deploy-doc: |
|
|
cd $name
|
|
eval "$(opam env)"
|
|
dune build @doc
|
|
ssh $sshopts $deploy "mkdir -p $doc_dst/$name/"
|
|
scp $sshopts -r _build/default/_doc/_html/* $deploy:$doc_dst/$name/
|
|
- deploy-coverage: |
|
|
cd $name
|
|
eval "$(opam env)"
|
|
dune clean
|
|
BISECT_ENABLE=YES dune runtest --no-buffer --force > /dev/null
|
|
bisect-ppx-report html
|
|
ssh $sshopts $deploy "mkdir -p $coverage_dst/$name/"
|
|
scp $sshopts -r _coverage/* $deploy:$coverage_dst/$name/
|
|
- archive: |
|
|
cd $name
|
|
eval "$(opam env)"
|
|
dune clean
|
|
archive_name=${name}-dev.tar.xz
|
|
git archive -o $archive_name HEAD
|
|
ssh $sshopts $deploy "mkdir -p $archive_dst/$name/"
|
|
scp $sshopts $archive_name $deploy:$archive_dst/$name/
|
|
rm $archive_name
|
|
- release: |
|
|
cd $name
|
|
eval "$(opam env)"
|
|
git describe --exact-match || exit 0
|
|
opam install -y dune-release
|
|
eval "$(opam env)"
|
|
tag=$(git describe --exact-match)
|
|
dune-release distrib || true
|
|
archive_name=${name}-${tag}.tbz
|
|
ls _build/${archive_name}
|
|
scp $sshopts _build/${archive_name} $deploy:$archive_dst/$name/
|
|
echo "https://fs.zapashcanon.fr/archive/${name}/${archive_name}" > _build/${name}-${tag}.url
|
|
dune-release opam pkg
|
|
cd ..
|
|
git clone --depth 1 https://github.com/ocaml/opam-repository.git
|
|
cd $name
|
|
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
|
dune-release opam submit --no-auto-open -y
|
|
|
|
|