Skip to content

Commit

Permalink
Skip except msys2 on scheduled builds
Browse files Browse the repository at this point in the history
Don't update msys2 on normal builds.
  • Loading branch information
k-takata committed Jun 10, 2017
1 parent 0414ed4 commit 545d644
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
11 changes: 0 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
version: 1.0.{build}

matrix:
exclude:
- APPVEYOR_SCHEDULED_BUILD: Ture
compiler: msbuild
- APPVEYOR_SCHEDULED_BUILD: Ture
compiler: msvc
- APPVEYOR_SCHEDULED_BUILD: Ture
compiler: mingw
- APPVEYOR_SCHEDULED_BUILD: Ture
compiler: cygwin

environment:
matrix:
- compiler: msbuild
Expand Down
39 changes: 26 additions & 13 deletions win32/appveyor.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ if "%1"=="" (
set target=%1
)

if "%APPVEYOR_SCHEDULED_BUILD%"=="True" (
if not "%compiler%"=="msys2" (
exit 0
)
)
for %%i in (msbuild msvc msys2 mingw cygwin) do if "%compiler%"=="%%i" goto %compiler%_%target%

echo Unknown build target.
Expand Down Expand Up @@ -120,19 +125,24 @@ goto :eof
@echo on
PATH C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;%PATH%
set CHERE_INVOKING=yes
bash -lc 'if [ "x$(checkupdates)" != x ]; then exit 1; fi'
if ERRORLEVEL 1 (
@rem Update found
@rem Remove unused toolchain to reduce the time for updating
if "%MSYSTEM%"=="MINGW64" (
bash -lc "pacman --noconfirm -Rs mingw-w64-i686-toolchain"
) else if "%MSYSTEM%"=="MINGW32" (
bash -lc "pacman --noconfirm -Rs mingw-w64-x86_64-toolchain"
)
@rem Synchronize package databases and upgrade the core system
C:\%MSYS2_DIR%\usr\bin\pacman --noconfirm --noprogressbar -Syu
@rem Run again to update the rest of packages
C:\%MSYS2_DIR%\usr\bin\pacman --noconfirm --noprogressbar -Su
if "%APPVEYOR_SCHEDULED_BUILD%"=="True" (
@rem Update build message
for /f "delims=" %%i in ('date /t') do appveyor UpdateBuild -Message "Daily build: %%i"

bash -lc 'if [ "x$(checkupdates)" != x ]; then exit 1; fi'
if ERRORLEVEL 1 (
@rem Update found
@rem Remove unused toolchain to reduce the time for updating
if "%MSYSTEM%"=="MINGW64" (
bash -lc "pacman --noconfirm -Rs mingw-w64-i686-toolchain"
) else if "%MSYSTEM%"=="MINGW32" (
bash -lc "pacman --noconfirm -Rs mingw-w64-x86_64-toolchain"
)
@rem Synchronize package databases and upgrade the core system
C:\%MSYS2_DIR%\usr\bin\pacman --noconfirm --noprogressbar -Syu
@rem Run again to update the rest of packages
C:\%MSYS2_DIR%\usr\bin\pacman --noconfirm --noprogressbar -Su
)
)
:: Install necessary packages
bash -lc "for i in {1..3}; do pacman --noconfirm --noprogressbar -S --needed mingw-w64-%MSYS2_ARCH%-{python3-sphinx,jansson,libxml2,libyaml} && break || sleep 15; done"
Expand Down Expand Up @@ -162,6 +172,9 @@ bash -lc "make check APPVEYOR=1"
goto :eof

:msys2_package
if not "%APPVEYOR_SCHEDULED_BUILD%"=="True" (
exit 0
)
md package
:: Build html docs and man pages
bash -lc "make -C docs html && make -C man RST2HTML=rst2html3"
Expand Down

0 comments on commit 545d644

Please sign in to comment.