Commit fdec789a authored by Carsten Schlote's avatar Carsten Schlote

Initial CI pipeline

parent d5608efb
Pipeline #173 passed with stages
in 2 minutes and 48 seconds
image: "dlanguage/dmd:latest"
services:
- docker:dind
variables:
VA_TEST: "abc"
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
before_script:
#- docker info
stages:
- lint
- build
- test
- deploy
lint-d-language:
tags:
- gitlabdocker
stage: lint
script:
- ./scripts/lint.sh | tee linter.log || true
- if grep error linter.log ; then echo "found linter error"; false; fi
cache:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
paths:
- .dub/
artifacts:
paths:
- linter.log
lint-docker:
tags:
- gitlabshell
- docker
stage: lint
script:
- docker pull hadolint/hadolint
#- docker run --rm -i hadolint/hadolint < Dockerfile
build:
tags:
- gitlabdocker
stage: build
script:
- ./scripts/build.sh
cache:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
paths:
- .dub/
artifacts:
paths:
- filescanner
- docs/
test:
tags:
- gitlabdocker
stage: test
script:
- ./scripts/test.sh
cache:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
paths:
- .dub/
artifacts:
paths:
- filescanner.xml
deploy_staging:
tags:
- gitlabdocker
stage: deploy
script:
- ./scripts/deploy.sh
environment:
name: staging
url: https://staging.example.com
only:
- master
deploy_prod:
tags:
- gitlabdocker
stage: deploy
script:
- echo "Deploy to production server"
environment:
name: production
url: https://example.com
when: manual
only:
- master
#!/usr/bin/env bash
set -ex
# Verbosely build the dub package
dub build -v
# Also build the ddox documentation
dub fetch ddox
dub build --build=ddox || true
echo "Successfully finished build script."
#!/usr/bin/env bash
set -ex
echo "Nothing yet to deploy."
#!/usr/bin/env bash
set -ex
# Fest the D linter
dub fetch dscanner
# Execute linter on sources
dub run dscanner -- -S source
#!/usr/bin/env bash
set -ex
# Compile abd run the programm in unittest mode
dub test
# Check the code
cd source
dmd -g -O -c test_ctfe_template.d app.d
ls -al
which objdump && objdump -S test_ctfe_template.o app.o
......@@ -5,5 +5,6 @@ import test_ctfe_template;
void main()
{
writeln("Templated songtext:\n", beer!(99));
puts("Templated songtext:\n");
puts(beer!(99).ptr);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment