2019-11-08 21:01:11 +01:00
|
|
|
image: debian
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
- release
|
2019-11-08 22:30:18 +01:00
|
|
|
- releasetag
|
2019-11-08 21:01:11 +01:00
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
before_script:
|
|
|
|
- apt-get update && apt-get -qq install clang mingw-w64 git make zip > /dev/null
|
|
|
|
script:
|
|
|
|
- make
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- build
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
|
|
|
|
test:
|
|
|
|
allow_failure: true
|
|
|
|
stage: test
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
before_script:
|
|
|
|
- apt-get update && apt-get -qq install make wine unzip > /dev/null
|
|
|
|
- dpkg --add-architecture i386 && apt-get update && apt-get -qq install wine32 > /dev/null
|
|
|
|
script:
|
|
|
|
- ls
|
|
|
|
- make run-tests
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
|
|
|
|
release:
|
|
|
|
stage: release
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
before_script:
|
|
|
|
- apt-get update && apt-get -qq install zip > /dev/null
|
|
|
|
script:
|
|
|
|
- mv build/bemanitools.zip ./bemanitools.zip
|
|
|
|
- find . -mindepth 1 ! -regex '^./bemanitools.zip' -delete
|
|
|
|
- unzip bemanitools.zip
|
|
|
|
- rm bemanitools.zip
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- ./*
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
2019-11-08 22:27:54 +01:00
|
|
|
|
|
|
|
releasetag:
|
|
|
|
stage: releasetag
|
|
|
|
dependencies: []
|
|
|
|
before_script:
|
|
|
|
- apt-get update && apt-get -qq install curl > /dev/null
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
curl --silent --show-error \
|
|
|
|
--data "{\"tag_name\": \"${CI_COMMIT_TAG}\", \"name\": \"${CI_PROJECT_NAME}-${CI_COMMIT_TAG}\", \"description\": \"${CI_COMMIT_TAG_MESSAGE:-No release notes.}\"}" \
|
|
|
|
--header "Content-Type: application/json" \
|
|
|
|
--header "Private-Token: ${CI_PRIVATE_TOKEN}" \
|
|
|
|
--request POST \
|
|
|
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases"
|
|
|
|
only:
|
|
|
|
- tags
|