blob: 7da1f262c88a080344cc2fb303fdf7e74207a656 [file] [log] [blame]
# Copyright (c) 2016-2018 Tuncer Ayaz
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
variables:
GIT_DEPTH: "3"
DEFAULT_IMAGE: erlang:21-alpine
pages:
stage: deploy
image: $DEFAULT_IMAGE
before_script:
- apk add --update make emacs texinfo ca-certificates curl
- update-ca-certificates
- cd pages
- ./install
- cd ..
script:
- make pages
- mv pages/out public
artifacts:
paths:
- public
only:
- master
cache:
key: $CI_PROJECT_PATH
paths:
- _build/default/rebar3_*_plt
.build_job_template: &build_job_definition
stage: build
image: $DEFAULT_IMAGE
before_script:
- apk add --update make
script:
- make ci
.artifact_paths_template: &artifact_paths_defitinion
paths:
- ebin
- doc
default-build:
<<: *build_job_definition
artifacts:
name: "$CI_PROJECT_NAME-ci-${CI_BUILD_REF_NAME}"
<<: *artifact_paths_defitinion
# Temporary artifacts for non-release builds are removed after a month
# because they are just for use in test jobs.
expire_in: 1 month
release:
<<: *build_job_definition
artifacts:
name: "$CI_PROJECT_NAME-${CI_BUILD_REF_NAME}"
<<: *artifact_paths_defitinion
only:
- tags
.test_job_template: &test_job_definition
stage: test
script:
- make ci
test:17:
<<: *test_job_definition
image: erlang:17
test:18:
<<: *test_job_definition
image: erlang:18
test:19:
<<: *test_job_definition
image: erlang:19
test:20:
<<: *test_job_definition
before_script:
- apk add --update make
image: erlang:20-alpine
test:21:
<<: *test_job_definition
before_script:
- apk add --update make
image: $DEFAULT_IMAGE
test:dialyze:
stage: test
image: $DEFAULT_IMAGE
before_script:
- apk add --update make
script:
- make ci-dialyze