ci: don't use global variables and definitions

This commit is contained in:
Julian Sparber
2021-01-22 13:12:01 +01:00
parent 9d2d0b8484
commit f1e35ed97c

View File

@@ -8,12 +8,22 @@ stages:
- package - package
- test-package - test-package
build:native:
stage: build
artifacts:
paths:
- _build
variables: variables:
BUILD_OPTS: -Dgtk_doc=true ${COMMON_BUILD_OPTS}
DEPS: build-essential git DEPS: build-essential git
WANT_BUILD_DEPS: "true" WANT_BUILD_DEPS: "true"
IMAGE: pureos/byzantium
COMMON_BUILD_OPTS: --werror COMMON_BUILD_OPTS: --werror
except:
variables:
- $PKG_ONLY == "1"
image: pureos/byzantium
tags:
- librem5
before_script: before_script:
- export DEBIAN_FRONTEND=noninteractive - export DEBIAN_FRONTEND=noninteractive
- apt-get -y update - apt-get -y update
@@ -23,64 +33,34 @@ before_script:
- apt-get -y update - apt-get -y update
- apt-get -y build-dep . - apt-get -y build-dep .
- ulimit -c unlimited - ulimit -c unlimited
.tags: &tags
tags:
- librem5
.build_step: &build_step
script: script:
- 'echo "Build opts: ${BUILD_OPTS}"' - 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build - meson ${BUILD_OPTS} . _build
- ninja -C _build - ninja -C _build
build:native:
<<: *tags
image: $IMAGE
stage: build
artifacts:
paths:
- _build
variables:
BUILD_OPTS: -Dgtk_doc=true ${COMMON_BUILD_OPTS}
<<: *build_step
except:
variables:
- $PKG_ONLY == "1"
test:native: test:native:
<<: *tags extends: build:native
image: $IMAGE
stage: test stage: test
dependencies: dependencies:
- build:native - build:native
script: script:
- export LC_ALL=C.UTF-8 - export LC_ALL=C.UTF-8
- xvfb-run ninja -C _build test - xvfb-run ninja -C _build test
except:
variables:
- $PKG_ONLY == "1"
build-gtkdoc: build-gtkdoc:
<<: *tags extends: build:native
image: $IMAGE
stage: test stage: test
dependencies: dependencies:
- build:native - build:native
<<: *build_step
script: script:
- ninja -C _build calls-doc - ninja -C _build calls-doc
- mv _build/doc/html/ _reference/ - mv _build/doc/html/ _reference/
artifacts: artifacts:
paths: paths:
- _reference - _reference
except:
variables:
- $PKG_ONLY == "1"
check-po: check-po:
<<: *tags extends: build:native
image: $IMAGE
stage: test stage: test
dependencies: dependencies:
- build:native - build:native
@@ -93,6 +73,3 @@ check-po:
# in this case # in this case
- cd po/ - cd po/
- intltool-update -m 2>&1 | grep -qs '/.*\.c' && { intltool-update -m; exit 1; } || exit 0 - intltool-update -m 2>&1 | grep -qs '/.*\.c' && { intltool-update -m; exit 1; } || exit 0
except:
variables:
- $PKG_ONLY == "1"