@@ -33,6 +33,14 @@ matrix:
- docker
before_install:
script: ci/run-docker.sh
+ - env: jobname=linux-musl
+ os: linux
+ compiler:
+ addons:
+ services:
+ - docker
+ before_install:
+ script: ci/run-docker.sh
- env: jobname=StaticAnalysis
os: linux
compiler:
@@ -514,6 +514,41 @@ jobs:
PathtoPublish: t/failed-test-artifacts
ArtifactName: failed-test-artifacts
+- job: linux_musl
+ displayName: linux-musl
+ condition: succeeded()
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - bash: |
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1
+
+ res=0
+ sudo AGENT_OS="$AGENT_OS" BUILD_BUILDNUMBER="$BUILD_BUILDNUMBER" BUILD_REPOSITORY_URI="$BUILD_REPOSITORY_URI" BUILD_SOURCEBRANCH="$BUILD_SOURCEBRANCH" BUILD_SOURCEVERSION="$BUILD_SOURCEVERSION" SYSTEM_PHASENAME="$SYSTEM_PHASENAME" SYSTEM_TASKDEFINITIONSURI="$SYSTEM_TASKDEFINITIONSURI" SYSTEM_TEAMPROJECT="$SYSTEM_TEAMPROJECT" CC=$CC MAKEFLAGS="$MAKEFLAGS" jobname=linux-musl bash -lxc ci/run-docker.sh || res=1
+
+ sudo chmod a+r t/out/TEST-*.xml
+ test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts
+
+ test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || res=1
+ exit $res
+ displayName: 'jobname=linux-musl ci/run-docker.sh'
+ env:
+ GITFILESHAREPWD: $(gitfileshare.pwd)
+ - task: PublishTestResults@2
+ displayName: 'Publish Test Results **/TEST-*.xml'
+ inputs:
+ mergeTestResults: true
+ testRunTitle: 'musl'
+ platform: Linux
+ publishRunAttachments: false
+ condition: succeededOrFailed()
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish trash directories of failed tests'
+ condition: failed()
+ inputs:
+ PathtoPublish: t/failed-test-artifacts
+ ArtifactName: failed-test-artifacts
+
- job: static_analysis
displayName: StaticAnalysis
condition: succeeded()
@@ -11,4 +11,8 @@ Linux32)
libssl-dev libexpat-dev gettext python >/dev/null
'
;;
+linux-musl)
+ apk add --update build-base curl-dev openssl-dev expat-dev gettext \
+ pcre2-dev python3 musl-libintl perl-utils ncurses >/dev/null
+ ;;
esac
@@ -201,6 +201,11 @@ GIT_TEST_GETTEXT_POISON)
Linux32)
CC=gcc
;;
+linux-musl)
+ CC=gcc
+ MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3 USE_LIBPCRE2=Yes"
+ MAKEFLAGS="$MAKEFLAGS NO_REGEX=Yes ICONV_OMITS_BOM=Yes"
+ ;;
esac
MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
@@ -18,6 +18,10 @@ case "$jobname" in
Linux32)
switch_cmd="linux32 --32bit i386"
;;
+linux-musl)
+ switch_cmd=
+ useradd () { adduser -D "$@"; }
+ ;;
*)
exit 1
;;
@@ -9,6 +9,9 @@ case "$jobname" in
Linux32)
CI_CONTAINER="daald/ubuntu32:xenial"
;;
+linux-musl)
+ CI_CONTAINER=alpine
+ ;;
*)
exit 1
;;
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> --- .travis.yml | 8 +++++++ azure-pipelines.yml | 35 +++++++++++++++++++++++++++++++ ci/install-docker-dependencies.sh | 4 ++++ ci/lib.sh | 5 +++++ ci/run-docker-build.sh | 4 ++++ ci/run-docker.sh | 3 +++ 6 files changed, 59 insertions(+)