* [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions
@ 2021-05-31 16:50 Petr Vorel
2021-05-31 16:50 ` [LTP] [PATCH 1/3] build.sh: Rewrite to allow running certain step Petr Vorel
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Petr Vorel @ 2021-05-31 16:50 UTC (permalink / raw)
To: ltp
Hi,
Travis often false positive due "pull rate limit" issue [1],
thus I decided to finally switch to GitHub Actions.
Also using GitHub native CI allows more advanced features
(e.g. update wiki with doc/*.txt, nightly build docparser doc).
Whole thing is tested [2].
I rewritten build.sh, added -r step.
It's ugly, using commands in yaml would be more readable. But I'd prefer
1) not writting shell in yaml 2) have build script for local use.
Please comment, test.
Kind regards,
Petr
[1] https://github.com/linux-test-project/ltp/issues/761
[2] https://github.com/pevik/ltp/actions/runs/893331703
Petr Vorel (3):
build.sh: Rewrite to allow running certain step
CI: Rename travis script directory
CI: Move from Travis to GitHub Actions
.github/workflows/ci.yml | 154 +++++++++++++++++++
.travis.yml | 131 ----------------
build.sh | 198 ++++++++++++++-----------
{travis => ci}/alpine.sh | 0
{travis => ci}/centos.sh | 0
{travis => ci}/debian.cross-compile.sh | 0
{travis => ci}/debian.i386.sh | 0
{travis => ci}/debian.minimal.sh | 0
{travis => ci}/debian.sh | 0
{travis => ci}/fedora.sh | 0
{travis => ci}/opensuse.sh | 0
{travis => ci}/tumbleweed.sh | 0
{travis => ci}/ubuntu.sh | 0
13 files changed, 262 insertions(+), 221 deletions(-)
create mode 100644 .github/workflows/ci.yml
delete mode 100644 .travis.yml
rename {travis => ci}/alpine.sh (100%)
rename {travis => ci}/centos.sh (100%)
rename {travis => ci}/debian.cross-compile.sh (100%)
rename {travis => ci}/debian.i386.sh (100%)
rename {travis => ci}/debian.minimal.sh (100%)
rename {travis => ci}/debian.sh (100%)
rename {travis => ci}/fedora.sh (100%)
rename {travis => ci}/opensuse.sh (100%)
rename {travis => ci}/tumbleweed.sh (100%)
rename {travis => ci}/ubuntu.sh (100%)
--
2.31.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 1/3] build.sh: Rewrite to allow running certain step
2021-05-31 16:50 [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions Petr Vorel
@ 2021-05-31 16:50 ` Petr Vorel
2021-06-01 9:10 ` Cyril Hrubis
2021-05-31 16:50 ` [LTP] [PATCH 2/3] CI: Rename travis script directory Petr Vorel
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: Petr Vorel @ 2021-05-31 16:50 UTC (permalink / raw)
To: ltp
i.e. only autotools / configure / make / make install
Required for GitHub Actions CI.
+ add missing -i in docs.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
build.sh | 195 +++++++++++++++++++++++++++++++------------------------
1 file changed, 110 insertions(+), 85 deletions(-)
diff --git a/build.sh b/build.sh
index 9335595ca..b3b1eb962 100755
--- a/build.sh
+++ b/build.sh
@@ -15,17 +15,56 @@ CC="${CC:-gcc}"
DEFAULT_PREFIX="$HOME/ltp-install"
DEFAULT_BUILD="native"
DEFAULT_TREE="in"
+
CONFIGURE_OPTS_IN_TREE="--with-open-posix-testsuite --with-realtime-testsuite $CONFIGURE_OPT_EXTRA"
# TODO: open posix testsuite is currently broken in out-tree-build. Enable it once it's fixed.
CONFIGURE_OPTS_OUT_TREE="--with-realtime-testsuite $CONFIGURE_OPT_EXTRA"
+
+SRC_DIR="$(cd $(dirname $0); pwd)"
+BUILD_DIR="$SRC_DIR/../ltp-build"
+
MAKE_OPTS="-j$(getconf _NPROCESSORS_ONLN)"
+MAKE_OPTS_OUT_TREE="$MAKE_OPTS -C $BUILD_DIR -f $SRC_DIR/Makefile top_srcdir=$SRC_DIR top_builddir=$BUILD_DIR"
-build_32()
+run_configure()
{
- local dir
+ local configure="$1"
+ shift
+
+ export CC CFLAGS LDFLAGS PKG_CONFIG_LIBDIR
+ echo "CC='$CC' CFLAGS='$CFLAGS' LDFLAGS='$LDFLAGS' PKG_CONFIG_LIBDIR='$PKG_CONFIG_LIBDIR'"
+
+ echo "=== configure $configure $@ ==="
+ if ! $configure $@; then
+ echo "== ERROR: configure failed, config.log =="
+ cat config.log
+ exit 1
+ fi
+
+ echo "== include/config.h =="
+ cat include/config.h
+}
+
+configure_in_tree()
+{
+ run_configure ./configure $CONFIGURE_OPTS_IN_TREE --prefix=$prefix $@
+}
+
+configure_out_tree()
+{
+ mkdir -p $BUILD_DIR
+ cd $BUILD_DIR
+ run_configure $SRC_DIR/configure $CONFIGURE_OPTS_OUT_TREE $@
+}
+
+configure_32()
+{
+ local tree="$1"
+ local prefix="$2"
local arch="$(uname -m)"
+ local dir
- echo "===== 32-bit ${1}-tree build into $PREFIX ====="
+ echo "===== 32-bit ${tree}-tree build into $prefix ====="
if [ -z "$PKG_CONFIG_LIBDIR" ]; then
if [ "$arch" != "x86_64" ]; then
@@ -46,114 +85,67 @@ build_32()
fi
CFLAGS="-m32 $CFLAGS" LDFLAGS="-m32 $LDFLAGS"
- build $1 $2
+
+ eval configure_${tree}_tree
}
-build_native()
+configure_native()
{
- echo "===== native ${1}-tree build into $PREFIX ====="
- build $1 $2
+ local tree="$1"
+ local prefix="$2"
+
+ echo "===== native ${tree}-tree build into $prefix ====="
+ eval configure_${tree}_tree
}
-build_cross()
+configure_cross()
{
+ local tree="$1"
+ local prefix="$2"
local host=$(basename "${CC%-gcc}")
+
if [ "$host" = "gcc" ]; then
echo "Invalid CC variable for cross compilation: $CC (clang not supported)" >&2
exit 1
fi
- echo "===== cross-compile ${host} ${1}-tree build into $PREFIX ====="
- build $1 $2 "--host=$host"
+ echo "===== cross-compile ${host} ${1}-tree build into $prefix ====="
+ eval configure_${tree}_tree "--host=$host"
}
-build()
+build_in_tree()
{
- local tree="$1"
- local install="$2"
- shift 2
-
- echo "=== autotools ==="
- make autotools
-
- if [ "$tree" = "in" ]; then
- build_in_tree $install $@
- else
- build_out_tree $install $@
- fi
+ make $MAKE_OPTS
}
build_out_tree()
{
- local install="$1"
- shift
-
- local tree="$PWD"
- local build="$tree/../ltp-build"
- local make_opts="$MAKE_OPTS -C $build -f $tree/Makefile top_srcdir=$tree top_builddir=$build"
-
- mkdir -p $build
- cd $build
- run_configure $tree/configure $CONFIGURE_OPTS_OUT_TREE $@
-
- echo "=== build ==="
- make $make_opts
-
- if [ "$install" = 1 ]; then
- echo "=== install ==="
- make $make_opts DESTDIR="$PREFIX" SKIP_IDCHECK=1 install
- else
- echo "make install skipped, use -i to run it"
- fi
+ cd $BUILD_DIR
+ make $MAKE_OPTS_OUT_TREE
}
-build_in_tree()
+install_in_tree()
{
- local install="$1"
- shift
-
- run_configure ./configure $CONFIGURE_OPTS_IN_TREE --prefix=$PREFIX $@
-
- echo "=== build ==="
- make $MAKE_OPTS
-
- if [ "$install" = 1 ]; then
- echo "=== install ==="
- make $MAKE_OPTS install
- else
- echo "make install skipped, use -i to run it"
- fi
+ make $MAKE_OPTS install
}
-run_configure()
+install_out_tree()
{
- local configure=$1
- shift
-
- export CC CFLAGS LDFLAGS PKG_CONFIG_LIBDIR
- echo "CC='$CC' CFLAGS='$CFLAGS' LDFLAGS='$LDFLAGS' PKG_CONFIG_LIBDIR='$PKG_CONFIG_LIBDIR'"
-
- echo "=== configure $configure $@ ==="
- if ! $configure $@; then
- echo "== ERROR: configure failed, config.log =="
- cat config.log
- exit 1
- fi
-
- echo "== include/config.h =="
- cat include/config.h
+ cd $BUILD_DIR
+ make $MAKE_OPTS_OUT_TREE DESTDIR="$prefix" SKIP_IDCHECK=1 install
}
usage()
{
cat << EOF
Usage:
-$0 [ -c CC ] [ -o TREE ] [ -p DIR ] [ -t TYPE ]
+$0 [ -c CC ] [ -i ] [ -o TREE ] [ -p DIR ] [-r RUN ] [ -t TYPE ]
$0 -h
Options:
-h Print this help
--c CC Define compiler (\$CC variable)
+-c CC Define compiler (\$CC variable), needed only for configure step
+-i Run 'make install', needed only for install step
-o TREE Specify build tree, default: $DEFAULT_TREE
-p DIR Change installation directory. For in-tree build is this value passed
to --prefix option of configure script. For out-of-tree build is this
@@ -162,17 +154,24 @@ Options:
DIR/PREFIX (i.e. DIR/opt/ltp).
Default for in-tree build: '$DEFAULT_PREFIX'
Default for out-of-tree build: '$DEFAULT_PREFIX/opt/ltp'
--t TYPE Specify build type, default: $DEFAULT_BUILD
+-r RUN Run only certain step (usable for CI), default: all
+-t TYPE Specify build type, default: $DEFAULT_BUILD, only for configure step
-BUILD TREE:
+TREE:
in in-tree build
out out-of-tree build
-BUILD TYPES:
+TYPES:
32 32-bit build (PKG_CONFIG_LIBDIR auto-detection for x86_64)
cross cross-compile build (requires set compiler via -c switch)
native native build
+RUN:
+autotools run only 'make autotools'
+configure run only 'configure'
+build run only 'make'
+install run only 'make install'
+
Default configure options:
in-tree: $CONFIGURE_OPTS_IN_TREE
out-of-tree $CONFIGURE_OPTS_OUT_TREE
@@ -181,12 +180,13 @@ configure options can extend the default with \$CONFIGURE_OPT_EXTRA environment
EOF
}
-PREFIX="$DEFAULT_PREFIX"
+prefix="$DEFAULT_PREFIX"
build="$DEFAULT_BUILD"
tree="$DEFAULT_TREE"
-install=0
+install=
+run=
-while getopts "c:hio:p:t:" opt; do
+while getopts "c:hio:p:r:t:" opt; do
case "$opt" in
c) CC="$OPTARG";;
h) usage; exit 0;;
@@ -195,7 +195,11 @@ while getopts "c:hio:p:t:" opt; do
in|out) tree="$OPTARG";;
*) echo "Wrong build tree '$OPTARG'" >&2; usage; exit 1;;
esac;;
- p) PREFIX="$OPTARG";;
+ p) prefix="$OPTARG";;
+ r) case "$OPTARG" in
+ autotools|configure|build|install) run="$OPTARG";;
+ *) echo "Wrong run type '$OPTARG'" >&2; usage; exit 1;;
+ esac;;
t) case "$OPTARG" in
32|cross|native) build="$OPTARG";;
*) echo "Wrong build type '$OPTARG'" >&2; usage; exit 1;;
@@ -204,7 +208,7 @@ while getopts "c:hio:p:t:" opt; do
esac
done
-cd `dirname $0`
+cd $SRC_DIR
echo "=== ver_linux ==="
./ver_linux
@@ -213,4 +217,25 @@ echo
echo "=== compiler version ==="
$CC --version
-eval build_$build $tree $install
+if [ -z "$run" -o "$run" = "autotools" ]; then
+ make autotools
+fi
+
+if [ -z "$run" -o "$run" = "configure" ]; then
+ eval configure_$build $tree $prefix
+fi
+
+if [ -z "$run" -o "$run" = "build" ]; then
+ echo "=== build ==="
+ eval build_${tree}_tree
+fi
+
+if [ -z "$run" -o "$run" = "install" ]; then
+ if [ "$install" = 1 ]; then
+ eval install_${tree}_tree
+ else
+ echo "make install skipped, use -i to run it"
+ fi
+fi
+
+exit $?
--
2.31.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [LTP] [PATCH 2/3] CI: Rename travis script directory
2021-05-31 16:50 [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions Petr Vorel
2021-05-31 16:50 ` [LTP] [PATCH 1/3] build.sh: Rewrite to allow running certain step Petr Vorel
@ 2021-05-31 16:50 ` Petr Vorel
2021-06-01 9:11 ` Cyril Hrubis
2021-05-31 16:50 ` [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions Petr Vorel
2021-06-01 9:52 ` [LTP] [PATCH 0/3] " Jan Stancek
3 siblings, 1 reply; 15+ messages in thread
From: Petr Vorel @ 2021-05-31 16:50 UTC (permalink / raw)
To: ltp
This is a preparation for moving from Travis CI to GitHub Actions.
Link: https://github.com/linux-test-project/ltp/issues/761
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.travis.yml | 2 +-
{travis => ci}/alpine.sh | 0
{travis => ci}/centos.sh | 0
{travis => ci}/debian.cross-compile.sh | 0
{travis => ci}/debian.i386.sh | 0
{travis => ci}/debian.minimal.sh | 0
{travis => ci}/debian.sh | 0
{travis => ci}/fedora.sh | 0
{travis => ci}/opensuse.sh | 0
{travis => ci}/tumbleweed.sh | 0
{travis => ci}/ubuntu.sh | 0
11 files changed, 1 insertion(+), 1 deletion(-)
rename {travis => ci}/alpine.sh (100%)
rename {travis => ci}/centos.sh (100%)
rename {travis => ci}/debian.cross-compile.sh (100%)
rename {travis => ci}/debian.i386.sh (100%)
rename {travis => ci}/debian.minimal.sh (100%)
rename {travis => ci}/debian.sh (100%)
rename {travis => ci}/fedora.sh (100%)
rename {travis => ci}/opensuse.sh (100%)
rename {travis => ci}/tumbleweed.sh (100%)
rename {travis => ci}/ubuntu.sh (100%)
diff --git a/.travis.yml b/.travis.yml
index 5d759dab4..d0c88da45 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -128,4 +128,4 @@ script:
- if [ "$METADATA" = "asciidoctor-pdf" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoctor --enable-metadata-pdf"; fi
- if [ ! "$TREE" ]; then TREE="in"; fi
- case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
- - $CONTAINER run $CONTAINER_ARGS -t ltp /bin/sh -c "cd travis && ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && CONFIGURE_OPT_EXTRA=\"$CONFIGURE_OPT_EXTRA\" ../build.sh -o $TREE -t $BUILD -c $CC $INSTALL_OPT"
+ - $CONTAINER run $CONTAINER_ARGS -t ltp /bin/sh -c "cd ci && ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && CONFIGURE_OPT_EXTRA=\"$CONFIGURE_OPT_EXTRA\" ../build.sh -o $TREE -t $BUILD -c $CC $INSTALL_OPT"
diff --git a/travis/alpine.sh b/ci/alpine.sh
similarity index 100%
rename from travis/alpine.sh
rename to ci/alpine.sh
diff --git a/travis/centos.sh b/ci/centos.sh
similarity index 100%
rename from travis/centos.sh
rename to ci/centos.sh
diff --git a/travis/debian.cross-compile.sh b/ci/debian.cross-compile.sh
similarity index 100%
rename from travis/debian.cross-compile.sh
rename to ci/debian.cross-compile.sh
diff --git a/travis/debian.i386.sh b/ci/debian.i386.sh
similarity index 100%
rename from travis/debian.i386.sh
rename to ci/debian.i386.sh
diff --git a/travis/debian.minimal.sh b/ci/debian.minimal.sh
similarity index 100%
rename from travis/debian.minimal.sh
rename to ci/debian.minimal.sh
diff --git a/travis/debian.sh b/ci/debian.sh
similarity index 100%
rename from travis/debian.sh
rename to ci/debian.sh
diff --git a/travis/fedora.sh b/ci/fedora.sh
similarity index 100%
rename from travis/fedora.sh
rename to ci/fedora.sh
diff --git a/travis/opensuse.sh b/ci/opensuse.sh
similarity index 100%
rename from travis/opensuse.sh
rename to ci/opensuse.sh
diff --git a/travis/tumbleweed.sh b/ci/tumbleweed.sh
similarity index 100%
rename from travis/tumbleweed.sh
rename to ci/tumbleweed.sh
diff --git a/travis/ubuntu.sh b/ci/ubuntu.sh
similarity index 100%
rename from travis/ubuntu.sh
rename to ci/ubuntu.sh
--
2.31.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions
2021-05-31 16:50 [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions Petr Vorel
2021-05-31 16:50 ` [LTP] [PATCH 1/3] build.sh: Rewrite to allow running certain step Petr Vorel
2021-05-31 16:50 ` [LTP] [PATCH 2/3] CI: Rename travis script directory Petr Vorel
@ 2021-05-31 16:50 ` Petr Vorel
2021-06-01 9:16 ` Cyril Hrubis
2021-06-01 9:52 ` [LTP] [PATCH 0/3] " Jan Stancek
3 siblings, 1 reply; 15+ messages in thread
From: Petr Vorel @ 2021-05-31 16:50 UTC (permalink / raw)
To: ltp
Travis is unreliable due "pull rate limit" issue.
Also using GitHub native CI allows more advanced features
(e.g. update wiki with doc/*.txt, nightly build docparser doc).
Nice bonus is that manual podman activation for distros using glibc >=
2.33 (e.g. openSUSE Tumbleweed, Fedora) it's not needed in GitHub.
Fixes: https://github.com/linux-test-project/ltp/issues/761
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Tested:
https://github.com/pevik/ltp/actions/runs/893331703
.github/workflows/ci.yml | 154 +++++++++++++++++++++++++++++++++++++++
.travis.yml | 131 ---------------------------------
build.sh | 7 --
3 files changed, 154 insertions(+), 138 deletions(-)
create mode 100644 .github/workflows/ci.yml
delete mode 100644 .travis.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..c74b4349a
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,154 @@
+name: "CI: docker based builds"
+on: [push, pull_request]
+
+jobs:
+ job:
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ # 32bit build
+ - container: "debian:stable"
+ env:
+ CC: gcc
+ VARIANT: i386
+
+ # cross compilation builds
+ - container: "debian:stable"
+ env:
+ ARCH: ppc64el
+ CC: powerpc64le-linux-gnu-gcc
+ MAKE_INSTALL: 1
+ TREE: out
+ VARIANT: cross-compile
+
+ - container: "debian:stable"
+ env:
+ ARCH: arm64
+ CC: aarch64-linux-gnu-gcc
+ MAKE_INSTALL: 1
+ TREE: out
+ VARIANT: cross-compile
+
+ - container: "debian:stable"
+ env:
+ ARCH: s390x
+ CC: s390x-linux-gnu-gcc
+ MAKE_INSTALL: 1
+ TREE: out
+ VARIANT: cross-compile
+
+ # musl (native)
+ - container: "alpine:latest"
+ env:
+ CC: gcc
+ METADATA: asciidoctor
+
+ # build with minimal dependencies
+ - container: "debian:stable"
+ env:
+ CC: clang
+ TREE: out
+ VARIANT: minimal
+
+ # other builds
+ - container: "fedora:latest"
+ env:
+ CC: clang
+ MAKE_INSTALL: 1
+ METADATA: asciidoctor-pdf
+
+ - container: "centos:7"
+ env:
+ CC: gcc
+ METADATA: asciidoc-pdf
+ TREE: out
+
+ - container: "debian:testing"
+ env:
+ CC: gcc
+ METADATA: asciidoctor-pdf
+
+ - container: "debian:oldstable"
+ env:
+ CC: clang
+ METADATA: asciidoc-pdf
+
+ - container: "opensuse/tumbleweed"
+ env:
+ CC: gcc
+ METADATA: asciidoctor
+
+ - container: "opensuse/leap"
+ env:
+ CC: gcc
+ METADATA: asciidoc-pdf
+
+ - container: "debian:oldstable"
+ env:
+ CC: gcc
+ METADATA: asciidoctor
+
+ - container: "debian:testing"
+ env:
+ CC: clang
+ METADATA: asciidoc-pdf
+
+ - container: "ubuntu:groovy"
+ env:
+ CC: gcc
+ METADATA: asciidoctor
+ TREE: out
+
+ - container: "ubuntu:xenial"
+ env:
+ CC: gcc
+ METADATA: asciidoc-pdf
+
+ - container: "centos:latest"
+ env:
+ CC: gcc
+ METADATA: asciidoctor
+
+ container:
+ image: ${{ matrix.container }}
+ env: ${{ matrix.env }}
+
+ steps:
+ - name: Show OS
+ run: cat /etc/os-release
+
+ - name: Git checkout
+ uses: actions/checkout@v1
+
+ - name: Install additional packages
+ run: |
+ INSTALL=${{ matrix.container }}
+ INSTALL="${INSTALL%%:*}"
+ INSTALL="${INSTALL%%/*}"
+ ./ci/$INSTALL.sh
+ if [ "$VARIANT" ]; then ./ci/$INSTALL.$VARIANT.sh; fi
+
+ - name: ver_linux
+ run: ./ver_linux
+
+ - name: Autotools
+ run: ./build.sh -r autotools
+
+ - name: Configure
+ run: |
+ if [ "$METADATA" = "asciidoc-pdf" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoc --enable-metadata-pdf"; fi
+ if [ "$METADATA" = "asciidoctor" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoctor"; fi
+ if [ "$METADATA" = "asciidoctor-pdf" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoctor --enable-metadata-pdf"; fi
+ case "$VARIANT" in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
+ CONFIGURE_OPT_EXTRA="$CONFIGURE_OPT_EXTRA" ./build.sh -r configure -o ${TREE:-in} -t $BUILD -c $CC
+
+ - name: Compile
+ run: ./build.sh -r build -o ${TREE:-in}
+
+ - name: Install
+ run: |
+ if [ "$MAKE_INSTALL" = 1 ]; then INSTALL_OPT="-i"; fi
+ ./build.sh -r install -o ${TREE:-in} $INSTALL_OPT
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index d0c88da45..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright (c) 2017-2021 Petr Vorel <pvorel@suse.cz>
-
-dist: bionic
-sudo: required
-language: c
-services:
- - docker
-
-matrix:
- include:
- # 32 bit build
- - os: linux
- env: DISTRO=debian:stable VARIANT=i386
- compiler: gcc
-
- # cross compilation builds
- - os: linux
- env: DISTRO=debian:stable VARIANT=cross-compile ARCH=ppc64el TREE=out MAKE_INSTALL=1
- compiler: powerpc64le-linux-gnu-gcc
-
- - os: linux
- env: DISTRO=debian:stable VARIANT=cross-compile ARCH=arm64 TREE=out
- compiler: aarch64-linux-gnu-gcc
-
- - os: linux
- env: DISTRO=debian:stable VARIANT=cross-compile ARCH=s390x TREE=out
- compiler: s390x-linux-gnu-gcc
-
- # musl (native)
- - os: linux
- # Message: WARNING: xsltproc: cannot process http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
- # doc/meson.build:70:1: ERROR: Problem encountered: Docs cannot be built: xsltproc does not work correctly
- env: DISTRO=alpine:latest METADATA=asciidoctor
- compiler: gcc
-
- # build with minimal dependencies
- - os: linux
- env: DISTRO=debian:stable VARIANT=minimal TREE=out
- compiler: clang
-
- # other builds
- - os: linux
- env: DISTRO=fedora:latest MAKE_INSTALL=1 CONTAINER=podman METADATA=asciidoctor-pdf
- compiler: clang
-
- - os: linux
- env: DISTRO=centos:7 TREE=out METADATA=asciidoc-pdf
- compiler: gcc
-
- - os: linux
- env: DISTRO=debian:testing METADATA=asciidoctor-pdf
- compiler: gcc
-
- - os: linux
- env: DISTRO=debian:oldstable METADATA=asciidoc-pdf
- compiler: clang
-
- - os: linux
- env: DISTRO=opensuse/tumbleweed CONTAINER=podman METADATA=asciidoctor
- compiler: gcc
-
- - os: linux
- env: DISTRO=opensuse/leap METADATA=asciidoc-pdf
- compiler: gcc
-
- - os: linux
- env: DISTRO=debian:oldstable METADATA=asciidoctor
- compiler: gcc
-
- - os: linux
- env: DISTRO=debian:testing METADATA=asciidoc-pdf
- compiler: clang
-
- - os: linux
- env: DISTRO=ubuntu:groovy TREE=out METADATA=asciidoctor
- compiler: gcc
-
- - os: linux
- env: DISTRO=ubuntu:xenial METADATA=asciidoc-pdf
- compiler: gcc
-
- - os: linux
- env: DISTRO=centos:latest METADATA=asciidoctor
- compiler: gcc
-
-before_install:
- - CONTAINER="${CONTAINER:-docker}"
- # distros with glibc >=2.33 require podman and newest runc due docker faccessat2 incompatibility
- - >
- if [ "$CONTAINER" = "podman" ]; then
- # podman
- CONTAINER_ARGS="--runtime=/usr/bin/runc"
- . /etc/os-release
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
- wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
- sudo apt update
- sudo apt -y install podman slirp4netns
-
- # runc
- sudo curl -L https://github.com/opencontainers/runc/releases/download/v1.0.0-rc93/runc.amd64 -o /usr/bin/runc
- sudo chmod +x /usr/bin/runc
- fi
-
- # Docker Hub pull rate limit workaround for docker
- - >
- if [ "$CONTAINER" = "docker" ]; then
- conf="/etc/docker/daemon.json"
- tmp=$(mktemp)
- sudo jq '."registry-mirrors" += ["https://mirror.gcr.io"]' $conf > $tmp
- sudo mv $tmp $conf
- sudo systemctl daemon-reload
- sudo systemctl restart docker
- fi
- - $CONTAINER info
-
- # ltp
- - DIR="/usr/src/ltp"
- - printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile
- - cat Dockerfile
- - $CONTAINER build $CONTAINER_ARGS -t ltp .
-
-script:
- - INSTALL="${DISTRO%%:*}"
- - INSTALL="${INSTALL%%/*}"
- - if [ "$MAKE_INSTALL" = 1 ]; then INSTALL_OPT="-i"; fi
- - if [ "$METADATA" = "asciidoc-pdf" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoc --enable-metadata-pdf"; fi
- - if [ "$METADATA" = "asciidoctor" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoctor"; fi
- - if [ "$METADATA" = "asciidoctor-pdf" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoctor --enable-metadata-pdf"; fi
- - if [ ! "$TREE" ]; then TREE="in"; fi
- - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
- - $CONTAINER run $CONTAINER_ARGS -t ltp /bin/sh -c "cd ci && ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && CONFIGURE_OPT_EXTRA=\"$CONFIGURE_OPT_EXTRA\" ../build.sh -o $TREE -t $BUILD -c $CC $INSTALL_OPT"
diff --git a/build.sh b/build.sh
index b3b1eb962..f58a6dae8 100755
--- a/build.sh
+++ b/build.sh
@@ -210,13 +210,6 @@ done
cd $SRC_DIR
-echo "=== ver_linux ==="
-./ver_linux
-echo
-
-echo "=== compiler version ==="
-$CC --version
-
if [ -z "$run" -o "$run" = "autotools" ]; then
make autotools
fi
--
2.31.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [LTP] [PATCH 1/3] build.sh: Rewrite to allow running certain step
2021-05-31 16:50 ` [LTP] [PATCH 1/3] build.sh: Rewrite to allow running certain step Petr Vorel
@ 2021-06-01 9:10 ` Cyril Hrubis
0 siblings, 0 replies; 15+ messages in thread
From: Cyril Hrubis @ 2021-06-01 9:10 UTC (permalink / raw)
To: ltp
Hi!
Looks good acked.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 2/3] CI: Rename travis script directory
2021-05-31 16:50 ` [LTP] [PATCH 2/3] CI: Rename travis script directory Petr Vorel
@ 2021-06-01 9:11 ` Cyril Hrubis
2021-06-01 9:40 ` Petr Vorel
0 siblings, 1 reply; 15+ messages in thread
From: Cyril Hrubis @ 2021-06-01 9:11 UTC (permalink / raw)
To: ltp
Hi!
Looks good, acked.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions
2021-05-31 16:50 ` [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions Petr Vorel
@ 2021-06-01 9:16 ` Cyril Hrubis
2021-06-01 9:50 ` Li Wang
2021-06-01 9:53 ` Petr Vorel
0 siblings, 2 replies; 15+ messages in thread
From: Cyril Hrubis @ 2021-06-01 9:16 UTC (permalink / raw)
To: ltp
Hi!
> Travis is unreliable due "pull rate limit" issue.
>
> Also using GitHub native CI allows more advanced features
> (e.g. update wiki with doc/*.txt, nightly build docparser doc).
>
> Nice bonus is that manual podman activation for distros using glibc >=
> 2.33 (e.g. openSUSE Tumbleweed, Fedora) it's not needed in GitHub.
>
> Fixes: https://github.com/linux-test-project/ltp/issues/761
Good work, thanks for doing this, acked.
Also please do not forget to remove the travis user from LTP github repo
once this is applied.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 2/3] CI: Rename travis script directory
2021-06-01 9:40 ` Petr Vorel
@ 2021-06-01 9:17 ` Cyril Hrubis
2021-06-01 9:51 ` Petr Vorel
0 siblings, 1 reply; 15+ messages in thread
From: Cyril Hrubis @ 2021-06-01 9:17 UTC (permalink / raw)
To: ltp
Hi!
> I'm sorry, didn't read carefully that the first ack isn't for whole patchset,
> thus merged whole patchset with your ack.
The rest looks good as well and we really need working CI so no
problem...
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 2/3] CI: Rename travis script directory
2021-06-01 9:11 ` Cyril Hrubis
@ 2021-06-01 9:40 ` Petr Vorel
2021-06-01 9:17 ` Cyril Hrubis
0 siblings, 1 reply; 15+ messages in thread
From: Petr Vorel @ 2021-06-01 9:40 UTC (permalink / raw)
To: ltp
Hi Cyril,
> Hi!
> Looks good, acked.
Thanks!
I'm sorry, didn't read carefully that the first ack isn't for whole patchset,
thus merged whole patchset with your ack.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions
2021-06-01 9:16 ` Cyril Hrubis
@ 2021-06-01 9:50 ` Li Wang
2021-06-01 9:53 ` Petr Vorel
1 sibling, 0 replies; 15+ messages in thread
From: Li Wang @ 2021-06-01 9:50 UTC (permalink / raw)
To: ltp
> > Fixes: https://github.com/linux-test-project/ltp/issues/761
>
> Good work, thanks for doing this, acked.
>
> Also please do not forget to remove the travis user from LTP github repo
> once this is applied.
Btw, seems also need to remove Travis stuff from docs:).
--
Regards,
Li Wang
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 2/3] CI: Rename travis script directory
2021-06-01 9:17 ` Cyril Hrubis
@ 2021-06-01 9:51 ` Petr Vorel
0 siblings, 0 replies; 15+ messages in thread
From: Petr Vorel @ 2021-06-01 9:51 UTC (permalink / raw)
To: ltp
Hi Cyril,
> Hi!
> > I'm sorry, didn't read carefully that the first ack isn't for whole patchset,
> > thus merged whole patchset with your ack.
> The rest looks good as well and we really need working CI so no
> problem...
FYI: there are temporary repository sync problem on Tumbleweed
(problematic obviously both last Travis CI build and new GitHub
Actions builds):
No provider of 'ruby2.5-rubygem-asciidoctor' found.
https://travis-ci.org/github/linux-test-project/ltp/jobs/773129654
https://github.com/linux-test-project/ltp/runs/2717311009
It should be fixed soon.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions
2021-05-31 16:50 [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions Petr Vorel
` (2 preceding siblings ...)
2021-05-31 16:50 ` [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions Petr Vorel
@ 2021-06-01 9:52 ` Jan Stancek
2021-06-01 10:03 ` Petr Vorel
2021-06-01 14:21 ` Petr Vorel
3 siblings, 2 replies; 15+ messages in thread
From: Jan Stancek @ 2021-06-01 9:52 UTC (permalink / raw)
To: ltp
On Mon, May 31, 2021 at 6:51 PM Petr Vorel <pvorel@suse.cz> wrote:
> Hi,
>
> Travis often false positive due "pull rate limit" issue [1],
> thus I decided to finally switch to GitHub Actions.
>
> Also using GitHub native CI allows more advanced features
> (e.g. update wiki with doc/*.txt, nightly build docparser doc).
>
> Whole thing is tested [2].
>
> I rewritten build.sh, added -r step.
> It's ugly, using commands in yaml would be more readable. But I'd prefer
> 1) not writting shell in yaml 2) have build script for local use.
>
> Please comment, test.
>
We should update docs too, but series looks OK, ACK.
>
> Kind regards,
> Petr
>
> [1] https://github.com/linux-test-project/ltp/issues/761
> [2] https://github.com/pevik/ltp/actions/runs/893331703
>
> Petr Vorel (3):
> build.sh: Rewrite to allow running certain step
> CI: Rename travis script directory
> CI: Move from Travis to GitHub Actions
>
> .github/workflows/ci.yml | 154 +++++++++++++++++++
> .travis.yml | 131 ----------------
> build.sh | 198 ++++++++++++++-----------
> {travis => ci}/alpine.sh | 0
> {travis => ci}/centos.sh | 0
> {travis => ci}/debian.cross-compile.sh | 0
> {travis => ci}/debian.i386.sh | 0
> {travis => ci}/debian.minimal.sh | 0
> {travis => ci}/debian.sh | 0
> {travis => ci}/fedora.sh | 0
> {travis => ci}/opensuse.sh | 0
> {travis => ci}/tumbleweed.sh | 0
> {travis => ci}/ubuntu.sh | 0
> 13 files changed, 262 insertions(+), 221 deletions(-)
> create mode 100644 .github/workflows/ci.yml
> delete mode 100644 .travis.yml
> rename {travis => ci}/alpine.sh (100%)
> rename {travis => ci}/centos.sh (100%)
> rename {travis => ci}/debian.cross-compile.sh (100%)
> rename {travis => ci}/debian.i386.sh (100%)
> rename {travis => ci}/debian.minimal.sh (100%)
> rename {travis => ci}/debian.sh (100%)
> rename {travis => ci}/fedora.sh (100%)
> rename {travis => ci}/opensuse.sh (100%)
> rename {travis => ci}/tumbleweed.sh (100%)
> rename {travis => ci}/ubuntu.sh (100%)
>
> --
> 2.31.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210601/7ce8f7a5/attachment.htm>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions
2021-06-01 9:16 ` Cyril Hrubis
2021-06-01 9:50 ` Li Wang
@ 2021-06-01 9:53 ` Petr Vorel
1 sibling, 0 replies; 15+ messages in thread
From: Petr Vorel @ 2021-06-01 9:53 UTC (permalink / raw)
To: ltp
> Hi!
> > Travis is unreliable due "pull rate limit" issue.
> > Also using GitHub native CI allows more advanced features
> > (e.g. update wiki with doc/*.txt, nightly build docparser doc).
> > Nice bonus is that manual podman activation for distros using glibc >=
> > 2.33 (e.g. openSUSE Tumbleweed, Fedora) it's not needed in GitHub.
> > Fixes: https://github.com/linux-test-project/ltp/issues/761
> Good work, thanks for doing this, acked.
> Also please do not forget to remove the travis user from LTP github repo
> once this is applied.
+1, I'll do it after I'll restart successfully last travis build.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions
2021-06-01 9:52 ` [LTP] [PATCH 0/3] " Jan Stancek
@ 2021-06-01 10:03 ` Petr Vorel
2021-06-01 14:21 ` Petr Vorel
1 sibling, 0 replies; 15+ messages in thread
From: Petr Vorel @ 2021-06-01 10:03 UTC (permalink / raw)
To: ltp
> On Mon, May 31, 2021 at 6:51 PM Petr Vorel <pvorel@suse.cz> wrote:
> > Hi,
> > Travis often false positive due "pull rate limit" issue [1],
> > thus I decided to finally switch to GitHub Actions.
> > Also using GitHub native CI allows more advanced features
> > (e.g. update wiki with doc/*.txt, nightly build docparser doc).
> > Whole thing is tested [2].
> > I rewritten build.sh, added -r step.
> > It's ugly, using commands in yaml would be more readable. But I'd prefer
> > 1) not writting shell in yaml 2) have build script for local use.
> > Please comment, test.
> We should update docs too, but series looks OK, ACK.
Hi Jan,
thanks! I was thinking about it but than forgot.
I'll fix it now.
I was a bit fast with merging.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 15+ messages in thread
* [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions
2021-06-01 9:52 ` [LTP] [PATCH 0/3] " Jan Stancek
2021-06-01 10:03 ` Petr Vorel
@ 2021-06-01 14:21 ` Petr Vorel
1 sibling, 0 replies; 15+ messages in thread
From: Petr Vorel @ 2021-06-01 14:21 UTC (permalink / raw)
To: ltp
> On Mon, May 31, 2021 at 6:51 PM Petr Vorel <pvorel@suse.cz> wrote:
> > Hi,
> > Travis often false positive due "pull rate limit" issue [1],
> > thus I decided to finally switch to GitHub Actions.
> > Also using GitHub native CI allows more advanced features
> > (e.g. update wiki with doc/*.txt, nightly build docparser doc).
> > Whole thing is tested [2].
> > I rewritten build.sh, added -r step.
> > It's ugly, using commands in yaml would be more readable. But I'd prefer
> > 1) not writting shell in yaml 2) have build script for local use.
> > Please comment, test.
Hi Jan,
> We should update docs too, but series looks OK, ACK.
Doc fixed in c77c62d64, thanks for reporting it!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2021-06-01 14:21 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 16:50 [LTP] [PATCH 0/3] CI: Move from Travis to GitHub Actions Petr Vorel
2021-05-31 16:50 ` [LTP] [PATCH 1/3] build.sh: Rewrite to allow running certain step Petr Vorel
2021-06-01 9:10 ` Cyril Hrubis
2021-05-31 16:50 ` [LTP] [PATCH 2/3] CI: Rename travis script directory Petr Vorel
2021-06-01 9:11 ` Cyril Hrubis
2021-06-01 9:40 ` Petr Vorel
2021-06-01 9:17 ` Cyril Hrubis
2021-06-01 9:51 ` Petr Vorel
2021-05-31 16:50 ` [LTP] [PATCH 3/3] CI: Move from Travis to GitHub Actions Petr Vorel
2021-06-01 9:16 ` Cyril Hrubis
2021-06-01 9:50 ` Li Wang
2021-06-01 9:53 ` Petr Vorel
2021-06-01 9:52 ` [LTP] [PATCH 0/3] " Jan Stancek
2021-06-01 10:03 ` Petr Vorel
2021-06-01 14:21 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.