Clean-up Travis file

This commit is contained in:
Clownacy 2020-01-23 22:01:30 +00:00
parent 8905a2ee49
commit a3bd721df2

View file

@ -29,38 +29,36 @@ addons:
- mingw-w64 - mingw-w64
env: env:
- MAKE_BUILD_TYPE=RELEASE=0 SIXTY_FOUR_BIT=false - BUILD_TYPE=RELEASE=0 SIXTY_FOUR_BIT=false
- MAKE_BUILD_TYPE=RELEASE=1 SIXTY_FOUR_BIT=false - BUILD_TYPE=RELEASE=1 SIXTY_FOUR_BIT=false
- MAKE_BUILD_TYPE=RELEASE=0 SIXTY_FOUR_BIT=true - BUILD_TYPE=RELEASE=0 SIXTY_FOUR_BIT=true
- MAKE_BUILD_TYPE=RELEASE=1 SIXTY_FOUR_BIT=true - BUILD_TYPE=RELEASE=1 SIXTY_FOUR_BIT=true
before_install: before_install:
# Setup MSYS2 # Setup MSYS2
- |- - |
case $TRAVIS_OS_NAME in if [ "$TRAVIS_OS_NAME" == "windows" ]
windows) [[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64 choco uninstall -y mingw
choco uninstall -y mingw choco upgrade --no-progress -y msys2
choco upgrade --no-progress -y msys2 export msys2='cmd //C RefreshEnv.cmd '
export msys2='cmd //C RefreshEnv.cmd ' export msys2+='& set MSYS=winsymlinks:nativestrict '
export msys2+='& set MSYS=winsymlinks:nativestrict ' export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start' if [ "$SIXTY_FOUR_BIT" == "true" ]; then
if [ "$SIXTY_FOUR_BIT" == "true" ]; then export mingw="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
export mingw="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --" else
else export mingw="$msys2 -mingw32 -full-path -here -c "\"\$@"\" --"
export mingw="$msys2 -mingw32 -full-path -here -c "\"\$@"\" --" fi
fi export msys2+=" -msys2 -c "\"\$@"\" --"
export msys2+=" -msys2 -c "\"\$@"\" --" if [ "$SIXTY_FOUR_BIT" == "true" ]; then
if [ "$SIXTY_FOUR_BIT" == "true" ]; then $msys2 pacman --sync --noconfirm --needed make mingw-w64-x86_64-toolchain
$msys2 pacman --sync --noconfirm --needed make mingw-w64-x86_64-toolchain else
else $msys2 pacman --sync --noconfirm --needed make mingw-w64-i686-toolchain
$msys2 pacman --sync --noconfirm --needed make mingw-w64-i686-toolchain fi
fi taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967 export PATH=/C/tools/msys64/mingw64/bin:$PATH
export PATH=/C/tools/msys64/mingw64/bin:$PATH export MAKE=mingw32-make # so that Autotools can find it
export MAKE=mingw32-make # so that Autotools can find it fi
;;
esac
# Set URL for Discord send script # Set URL for Discord send script
- DISCORD_SEND_SCRIPT_URL=https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh - DISCORD_SEND_SCRIPT_URL=https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
@ -73,7 +71,7 @@ before_install:
- echo $TRAVIS_OS_NAME - echo $TRAVIS_OS_NAME
# Display build type # Display build type
- echo $MAKE_BUILD_TYPE - echo $BUILD_TYPE
# Define CC and CXX # Define CC and CXX
- | - |
@ -87,7 +85,7 @@ before_install:
# Define WINDRES # Define WINDRES
- | - |
if [ "$TRAVIS_OS_NAME" = "windows" ]; then if [ "$TRAVIS_OS_NAME" == "windows" ]; then
export WINDRES="windres" export WINDRES="windres"
else else
if [ "$SIXTY_FOUR_BIT" == "true" ]; then if [ "$SIXTY_FOUR_BIT" == "true" ]; then
@ -104,13 +102,11 @@ before_install:
- $mingw ${CXX} --version - $mingw ${CXX} --version
before_cache: before_cache:
- |- - |
case $TRAVIS_OS_NAME in if [ "$TRAVIS_OS_NAME" == "windows" ]; then
windows) # https://unix.stackexchange.com/a/137322/107554
# https://unix.stackexchange.com/a/137322/107554 $msys2 pacman --sync --clean --noconfirm
$msys2 pacman --sync --clean --noconfirm fi
;;
esac
cache: cache:
directories: directories:
@ -124,7 +120,7 @@ install:
script: script:
# Build # Build
- $mingw make -j ${JOBS} FIX_BUGS=1 ${MAKE_BUILD_TYPE} WARNINGS=1 WARNINGS_ALL=1 WINDOWS=1 STATIC=1 - $mingw make -j ${JOBS} FIX_BUGS=1 ${BUILD_TYPE} WARNINGS=1 WARNINGS_ALL=1 WINDOWS=1 STATIC=1
after_success: after_success:
# Send success notification to Discord through DISCORD_WEBHOOK_URL # Send success notification to Discord through DISCORD_WEBHOOK_URL