Commit a2c38bb9 authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Merge branch 'update-ci' into devel

Closes: !1
parents d4f973b5 ac4d2009
Pipeline #2997 passed with stages
in 6 minutes and 20 seconds
......@@ -2,14 +2,32 @@ stages:
- build
- test
- sanitizer
- packaging
default:
image: registry.gitlab.xiph.org/xiph/icecast-docker-images/debian-jessie:20210131134743
image: registry.gitlab.xiph.org/xiph/icecast-docker-images/debian-bullseye:20220321214518
tags:
- docker
# Builds
.TemplateAlpine:
image: alpine:3.15
before_script:
- set -xe
- apk update
- cat /etc/os*
- apk add musl-dev git make gcc automake autoconf libtool
- apk add libc6-compat
# gzip required because busybox gzip does not understand best / zip for make dist
- apk add gzip zip tar
# required for uploading package to gitlab registry
- apk add curl ca-certificates
# Required for tests
#- apk add curl ffmpeg
# Create user to run tests
#- adduser -s /bin/sh -D -H icecast
Build (x86_64):
stage: build
script:
......@@ -21,6 +39,18 @@ Build (x86_64):
untracked: true
expire_in: 1 hour
Build Alpine (x86_64):
extends: .TemplateAlpine
stage: build
script:
- gcc --version
- ./autogen.sh
- ./configure || { cat config.log; exit 1; }
- make
artifacts:
untracked: true
expire_in: 1 hour
Build (x86):
stage: build
......@@ -44,6 +74,10 @@ Build (clang, x86_64):
- ./autogen.sh
- ./configure || { cat config.log; exit 1; }
- make
artifacts:
paths:
- "config.log"
expire_in: 1 hour
# Sanitizer builds
......@@ -61,7 +95,11 @@ Sanitizer:
- ./autogen.sh
- ./configure --with-sanitizer=${SANITIZER} || { cat config.log; exit 1; }
- make check || { find ./tests -name '*.log' -print -exec cat "{}" \;; cat test-suite.log; exit 1; }
# this statement needs to be there to disable copying of dependecies from other stage jobs - otherwhise you get funny errors - https://stackoverflow.com/a/47679028
dependencies: []
artifacts:
untracked: true
expire_in: 1 hour
# Build and run tests
......@@ -71,6 +109,22 @@ Test (x86_64):
- make check || { cat test-suite.log; exit 1; }
needs:
- 'Build (x86_64)'
artifacts:
paths:
- "test-suite.log"
expire_in: 1 hour
Test Alpine (x86_64):
extends: .TemplateAlpine
stage: test
script:
- make check || { cat test-suite.log; exit 1; }
needs:
- 'Build Alpine (x86_64)'
artifacts:
paths:
- "test-suite.log"
expire_in: 1 hour
Test (x86):
stage: test
......@@ -80,6 +134,10 @@ Test (x86):
- make check || { cat test-suite.log; exit 1; }
needs:
- 'Build (x86)'
artifacts:
paths:
- "test-suite.log"
expire_in: 1 hour
# Distcheck / Source tarballs
......@@ -94,3 +152,24 @@ Distcheck:
expire_in: 1 week
needs:
- 'Build (x86_64)'
Package Alpine (x86_64):
extends: .TemplateAlpine
stage: packaging
variables:
PACKAGE_PREFIX: "alpine-libigloo-bins"
PACKAGE_VERSION: "0.91"
script:
- mkdir _install_base
- make install DESTDIR=`pwd`/_install_base/
- cd _install_base/
- tar -cvzf ../$PACKAGE_PREFIX-$CI_COMMIT_REF_NAME.tar.gz *
- cd ..
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file $PACKAGE_PREFIX-$CI_COMMIT_REF_NAME.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/$PACKAGE_PREFIX/$PACKAGE_VERSION-$CI_COMMIT_REF_NAME/$PACKAGE_PREFIX-$CI_COMMIT_REF_NAME.tar.gz"'
when: manual
needs:
# we need the build job artifacts
- job: 'Build Alpine (x86_64)'
artifacts: true
# we depend on tests for ordering
- 'Test Alpine (x86_64)'
Supports Markdown
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