ci: Rename the ci_* scripts

Give the CI scripts new names that better reflect what they do, and
make room for activities such as linting or dependency installation:
 * Rename ci_autotools.sh to ci_verify_configure.sh.
 * Rename ci_cmake.sh to ci_verify_cmake.sh.
 * Rename ci_legacy.sh to ci_verify_makefiles.sh.

Also rename CI_LEGACY_MAKEFILES to CI_MAKEFILES.

Update the config files for Travis CI and AppVeyor CI accordingly.
This commit is contained in:
Cosmin Truta
2022-11-27 21:05:42 +02:00
parent 3c152a8ef7
commit b445aade83
5 changed files with 39 additions and 39 deletions

View File

@@ -28,16 +28,16 @@ environment:
AUTOMATION: cmake AUTOMATION: cmake
ARCH: x86_64 ARCH: x86_64
- TOOLCHAIN: msys2 - TOOLCHAIN: msys2
AUTOMATION: autotools AUTOMATION: configure
ARCH: i686 ARCH: i686
- TOOLCHAIN: msys2 - TOOLCHAIN: msys2
AUTOMATION: autotools AUTOMATION: configure
ARCH: x86_64 ARCH: x86_64
- TOOLCHAIN: msys2 - TOOLCHAIN: msys2
AUTOMATION: legacy AUTOMATION: makefiles
ARCH: i686 ARCH: i686
- TOOLCHAIN: msys2 - TOOLCHAIN: msys2
AUTOMATION: legacy AUTOMATION: makefiles
ARCH: x86_64 ARCH: x86_64
install: install:
@@ -57,13 +57,13 @@ before_build:
- 'set CI_CMAKE_BUILD_FLAGS=--parallel 2' - 'set CI_CMAKE_BUILD_FLAGS=--parallel 2'
- 'set CI_CTEST_FLAGS=--parallel 2' - 'set CI_CTEST_FLAGS=--parallel 2'
- 'set CI_MAKE_FLAGS=-j2' - 'set CI_MAKE_FLAGS=-j2'
- 'set CI_LEGACY_MAKEFILES=scripts/makefile.gcc scripts/makefile.msys scripts/makefile.std' - 'set CI_MAKEFILES=scripts/makefile.gcc scripts/makefile.msys scripts/makefile.std'
build_script: build_script:
- 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_cmake.sh"' - 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_cmake.sh"' - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="autotools" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_autotools.sh"' - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="configure" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_configure.sh"'
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="legacy" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_legacy.sh"' - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"'
cache: cache:
- C:\tools\vcpkg\installed - C:\tools\vcpkg\installed

View File

@@ -17,11 +17,11 @@ env:
- AUTOMATION=cmake CI_NO_TEST=1 - AUTOMATION=cmake CI_NO_TEST=1
- AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=ON" CI_SANITIZERS="address,undefined" - AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=ON" CI_SANITIZERS="address,undefined"
- AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=OFF" CI_SANITIZERS="address,undefined" - AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=OFF" CI_SANITIZERS="address,undefined"
- AUTOMATION=autotools CI_NO_TEST=1 - AUTOMATION=configure CI_NO_TEST=1
- AUTOMATION=autotools CI_CONFIGURE_FLAGS="--enable-hardware-optimizations" - AUTOMATION=configure CI_CONFIGURE_FLAGS="--enable-hardware-optimizations"
- AUTOMATION=autotools CI_CONFIGURE_FLAGS="--disable-hardware-optimizations" - AUTOMATION=configure CI_CONFIGURE_FLAGS="--disable-hardware-optimizations"
- AUTOMATION=legacy CI_NO_TEST=1 - AUTOMATION=makefiles CI_NO_TEST=1
- AUTOMATION=legacy CI_SANITIZERS="address,undefined" - AUTOMATION=makefiles CI_SANITIZERS="address,undefined"
matrix: matrix:
include: include:
@@ -39,7 +39,7 @@ before_script:
- 'export CI_CTEST_FLAGS="--parallel 2"' - 'export CI_CTEST_FLAGS="--parallel 2"'
- 'export CI_MAKE_FLAGS=-j2' - 'export CI_MAKE_FLAGS=-j2'
- 'export CI_CC=$TRAVIS_COMPILER' - 'export CI_CC=$TRAVIS_COMPILER'
- 'export CI_LEGACY_MAKEFILES="scripts/makefile.$TRAVIS_COMPILER scripts/makefile.std"' - 'export CI_MAKEFILES="scripts/makefile.$TRAVIS_COMPILER scripts/makefile.std"'
script: script:
- './ci/ci_$AUTOMATION.sh' - './ci/ci_verify_$AUTOMATION.sh'

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
# ci_cmake.sh # ci_verify_cmake.sh
# Continuously integrate libpng using CMake. # Continuously integrate libpng using CMake.
# #
# Copyright (c) 2019-2022 Cosmin Truta. # Copyright (c) 2019-2022 Cosmin Truta.

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
# ci_autotools.sh # ci_verify_configure.sh
# Continuously integrate libpng using the GNU Autotools. # Continuously integrate libpng using the configure script.
# #
# Copyright (c) 2019-2022 Cosmin Truta. # Copyright (c) 2019-2022 Cosmin Truta.
# #
@@ -13,8 +13,8 @@ set -e
CI_SCRIPTNAME="$(basename "$0")" CI_SCRIPTNAME="$(basename "$0")"
CI_SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)" CI_SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)"
CI_SRCDIR="$(dirname "$CI_SCRIPTDIR")" CI_SRCDIR="$(dirname "$CI_SCRIPTDIR")"
CI_BUILDDIR="$CI_SRCDIR/out/autotools.build" CI_BUILDDIR="$CI_SRCDIR/out/configure.build"
CI_INSTALLDIR="$CI_SRCDIR/out/autotools.install" CI_INSTALLDIR="$CI_SRCDIR/out/configure.install"
function ci_info { function ci_info {
printf >&2 "%s: %s\\n" "$CI_SCRIPTNAME" "$*" printf >&2 "%s: %s\\n" "$CI_SCRIPTNAME" "$*"
@@ -32,7 +32,7 @@ function ci_spawn {
"$@" "$@"
} }
function ci_init_autotools { function ci_init_configure {
CI_SYSTEM_NAME="$(uname -s)" CI_SYSTEM_NAME="$(uname -s)"
CI_MACHINE_NAME="$(uname -m)" CI_MACHINE_NAME="$(uname -m)"
CI_MAKE="${CI_MAKE:-make}" CI_MAKE="${CI_MAKE:-make}"
@@ -44,7 +44,7 @@ function ci_init_autotools {
[[ ! $CI_MAKE_VARS ]] || ci_err "unexpected: \$CI_MAKE_VARS='$CI_MAKE_VARS'" [[ ! $CI_MAKE_VARS ]] || ci_err "unexpected: \$CI_MAKE_VARS='$CI_MAKE_VARS'"
} }
function ci_trace_autotools { function ci_trace_configure {
ci_info "## START OF CONFIGURATION ##" ci_info "## START OF CONFIGURATION ##"
ci_info "system name: $CI_SYSTEM_NAME" ci_info "system name: $CI_SYSTEM_NAME"
ci_info "machine hardware name: $CI_MACHINE_NAME" ci_info "machine hardware name: $CI_MACHINE_NAME"
@@ -80,7 +80,7 @@ function ci_trace_autotools {
ci_info "## END OF CONFIGURATION ##" ci_info "## END OF CONFIGURATION ##"
} }
function ci_build_autotools { function ci_build_configure {
ci_info "## START OF BUILD ##" ci_info "## START OF BUILD ##"
# Export the configure build environment. # Export the configure build environment.
[[ $CI_CC ]] && ci_spawn export CC="$CI_CC" [[ $CI_CC ]] && ci_spawn export CC="$CI_CC"
@@ -108,10 +108,10 @@ function ci_build_autotools {
ci_info "## END OF BUILD ##" ci_info "## END OF BUILD ##"
} }
ci_init_autotools ci_init_configure
ci_trace_autotools ci_trace_configure
[[ $# -eq 0 ]] || { [[ $# -eq 0 ]] || {
ci_info "note: this program accepts environment options only" ci_info "note: this program accepts environment options only"
ci_err "unexpected command arguments: '$*'" ci_err "unexpected command arguments: '$*'"
} }
ci_build_autotools ci_build_configure

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
# ci_legacy.sh # ci_verify_makefiles.sh
# Continuously integrate libpng using the legacy makefiles. # Continuously integrate libpng using the legacy makefiles.
# #
# Copyright (c) 2019-2022 Cosmin Truta. # Copyright (c) 2019-2022 Cosmin Truta.
@@ -31,7 +31,7 @@ function ci_spawn {
"$@" "$@"
} }
function ci_init_legacy { function ci_init_makefiles {
CI_SYSTEM_NAME="$(uname -s)" CI_SYSTEM_NAME="$(uname -s)"
CI_MACHINE_NAME="$(uname -m)" CI_MACHINE_NAME="$(uname -m)"
CI_MAKE="${CI_MAKE:-make}" CI_MAKE="${CI_MAKE:-make}"
@@ -44,23 +44,23 @@ function ci_init_legacy {
CI_CC="${CI_CC:-cc}" CI_CC="${CI_CC:-cc}"
case "$CI_CC" in case "$CI_CC" in
( *clang* ) ( *clang* )
CI_LEGACY_MAKEFILES="${CI_LEGACY_MAKEFILES:-"scripts/makefile.clang"}" ;; CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.clang"}" ;;
( *gcc* ) ( *gcc* )
CI_LEGACY_MAKEFILES="${CI_LEGACY_MAKEFILES:-"scripts/makefile.gcc"}" ;; CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.gcc"}" ;;
( cc | c89 | c99 ) ( cc | c89 | c99 )
CI_LEGACY_MAKEFILES="${CI_LEGACY_MAKEFILES:-"scripts/makefile.std"}" ;; CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.std"}" ;;
esac esac
CI_LD="${CI_LD:-"$CI_CC"}" CI_LD="${CI_LD:-"$CI_CC"}"
CI_LIBS="${CI_LIBS:-"-lz -lm"}" CI_LIBS="${CI_LIBS:-"-lz -lm"}"
} }
function ci_trace_legacy { function ci_trace_makefiles {
ci_info "## START OF CONFIGURATION ##" ci_info "## START OF CONFIGURATION ##"
ci_info "system name: $CI_SYSTEM_NAME" ci_info "system name: $CI_SYSTEM_NAME"
ci_info "machine hardware name: $CI_MACHINE_NAME" ci_info "machine hardware name: $CI_MACHINE_NAME"
ci_info "source directory: $CI_SRCDIR" ci_info "source directory: $CI_SRCDIR"
ci_info "build directory: $CI_BUILDDIR" ci_info "build directory: $CI_BUILDDIR"
ci_info "environment option: \$CI_LEGACY_MAKEFILES: '$CI_LEGACY_MAKEFILES'" ci_info "environment option: \$CI_MAKEFILES: '$CI_MAKEFILES'"
ci_info "environment option: \$CI_MAKE: '$CI_MAKE'" ci_info "environment option: \$CI_MAKE: '$CI_MAKE'"
ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'" ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'"
ci_info "environment option: \$CI_MAKE_VARS: '$CI_MAKE_VARS'" ci_info "environment option: \$CI_MAKE_VARS: '$CI_MAKE_VARS'"
@@ -90,7 +90,7 @@ function ci_trace_legacy {
ci_info "## END OF CONFIGURATION ##" ci_info "## END OF CONFIGURATION ##"
} }
function ci_build_legacy { function ci_build_makefiles {
ci_info "## START OF BUILD ##" ci_info "## START OF BUILD ##"
# Initialize ALL_CC_FLAGS and ALL_LD_FLAGS as strings. # Initialize ALL_CC_FLAGS and ALL_LD_FLAGS as strings.
local ALL_CC_FLAGS="$CI_CC_FLAGS" local ALL_CC_FLAGS="$CI_CC_FLAGS"
@@ -118,7 +118,7 @@ function ci_build_legacy {
# Build! # Build!
ci_spawn cd "$CI_SRCDIR" ci_spawn cd "$CI_SRCDIR"
local MY_MAKEFILE local MY_MAKEFILE
for MY_MAKEFILE in $CI_LEGACY_MAKEFILES for MY_MAKEFILE in $CI_MAKEFILES
do do
ci_info "using makefile: $MY_MAKEFILE" ci_info "using makefile: $MY_MAKEFILE"
ci_spawn "$CI_MAKE" -f "$MY_MAKEFILE" \ ci_spawn "$CI_MAKE" -f "$MY_MAKEFILE" \
@@ -138,10 +138,10 @@ function ci_build_legacy {
ci_info "## END OF BUILD ##" ci_info "## END OF BUILD ##"
} }
ci_init_legacy ci_init_makefiles
ci_trace_legacy ci_trace_makefiles
[[ $# -eq 0 ]] || { [[ $# -eq 0 ]] || {
ci_info "note: this program accepts environment options only" ci_info "note: this program accepts environment options only"
ci_err "unexpected command arguments: '$*'" ci_err "unexpected command arguments: '$*'"
} }
ci_build_legacy ci_build_makefiles