From 91aeeecd9e75bf9d9624d1a4c99c01da0be53372 Mon Sep 17 00:00:00 2001 From: Astie Teddy Date: Fri, 18 Sep 2020 22:38:30 +0200 Subject: [PATCH] Various CI improvements --- .travis.yml | 69 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 150c858..5c08963 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,19 +10,68 @@ matrix: - os: osx - os: windows -before_script: + addons: + +addons: + artifacts: + paths: + - build + apt: + packages: + - gcc-multilib + - libasound2-dev + - libxcursor-dev + - libxinerama-dev + - mesa-common-dev + - libx11-dev + - libxrandr-dev + - libxrandr2 + - libxi-dev + - libgl1-mesa-dev + - libglu1-mesa-dev + +before_cache: + - |- + case $TRAVIS_OS_NAME in + windows) + # https://unix.stackexchange.com/a/137322/107554 + $msys2 pacman --sync --clean --noconfirm + ;; + esac + +cache: + directories: + - $HOME/AppData/Local/Temp/chocolatey + - /C/tools/msys64 before_install: - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - sudo apt-get install -y gcc-multilib - libasound2-dev:$ARCH - libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH - libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH - libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH; - fi + - export MAKE=make + - |- + case $TRAVIS_OS_NAME in + windows) + [[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64 + choco uninstall -y mingw + choco upgrade --no-progress -y msys2 + export msys2='cmd //C RefreshEnv.cmd ' + export msys2+='& set MSYS=winsymlinks:nativestrict ' + export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start' + export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --" + export msys2+=" -msys2 -c "\"\$@"\" --" + $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain + ## Install more MSYS2 packages from https://packages.msys2.org/base here + taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967 + export PATH=/C/tools/msys64/mingw64/bin:$PATH + export MAKE="$mingw64 make" # Change make + + $msys2 pacman -S mingw-w64-x86_64-toolchain + ;; + esac - mkdir build - $RUNNER $CC --version +before_script: + script: - - $RUNNER make - - mv raylua_s* raylua_e* build/ + - $RUNNER $MAKE + - mv raylua_s build/ + - mv raylua_e build/