-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1611 from networkupstools/Windows-v2.8.0-1
Merge Windows support branch based on NUT v2.8.x era code back to master
- Loading branch information
Showing
158 changed files
with
11,780 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Windows script files should be CR+LF always: | ||
*.bat text eol=crlf | ||
|
||
# Unix/Linux script files should be LF always: | ||
*.sh text eol=lf | ||
*.m4 text eol=lf | ||
*.ac text eol=lf | ||
*.am text eol=lf | ||
*.hwdb text eol=lf | ||
|
||
# Some files are binary always: | ||
*.png bin | ||
*.ico bin | ||
|
||
# The rest are assumed text sources with platform-dependent EOL being okay, | ||
# or we let Git guess otherwise: | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
# | ||
# Network UPS Tools: AppVeyor CI build recipe: NUT for Windows with MSYS2/MinGW x64 | ||
# | ||
# https://www.msys2.org/docs/ci/ | ||
# https://www.appveyor.com/docs/appveyor-yml/ | ||
# https://www.appveyor.com/docs/build-configuration/ | ||
# https://www.appveyor.com/docs/windows-images-software/ | ||
|
||
version: 2.8.0.{build}-{branch} | ||
|
||
# base image | ||
image: Visual Studio 2022 | ||
|
||
# branches to build | ||
branches: | ||
# whitelist | ||
only: | ||
- master | ||
- /Windows/ | ||
|
||
platform: x64 | ||
|
||
# https://www.appveyor.com/docs/build-cache/ | ||
environment: | ||
APPVEYOR_SAVE_CACHE_ON_ERROR: true | ||
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma -mx=9 | ||
|
||
# https://github.com/networkupstools/nut/blob/Windows-v2.8.0-1/docs/config-prereqs.txt#L951 | ||
# Note: not using `time` in scripts currently - they did upset | ||
# AppVeyor console log scanner with a /^sys.*/ match (apparently) | ||
install: | ||
- cmd: | | ||
REM Do not give pacman cause for complaints: | ||
C:\msys64\usr\bin\bash -lc "mkdir -p /var/cache/pacman/pkg; ls -la /" | ||
- cmd: | | ||
REM Core update (in case any core packages are outdated): | ||
C:\msys64\usr\bin\bash -lc "date -u; pacman --noconfirm -Syuu" | ||
- cmd: | | ||
REM Normal update (same command again): | ||
C:\msys64\usr\bin\bash -lc "date -u; pacman --noconfirm -Syuu" | ||
- cmd: | | ||
REM Prerequisites for NUT per https://github.com/networkupstools/nut/blob/Windows-v2.8.0-1/docs/config-prereqs.txt : | ||
C:\msys64\usr\bin\bash -lc "date -u; pacman --noconfirm -S --needed base-devel mingw-w64-x86_64-toolchain autoconf-wrapper automake-wrapper libtool mingw-w64-x86_64-libltdl gcc ccache mingw-w64-x86_64-ccache git aspell aspell-en python mingw-w64-x86_64-python-pygments mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-libusb mingw-w64-x86_64-libusb-compat-git mingw-w64-x86_64-neon libneon-devel mingw-w64-x86_64-libmodbus-git mingw-w64-x86_64-libgd mingw-w64-x86_64-cppunit" | ||
- cmd: | | ||
REM Assorted stats after package processing: | ||
C:\msys64\usr\bin\bash -lc "date -u; ls la / ; du -ksx / ; date -u; du -ks /var/cache/pacman/pkg; date -u" | ||
REM Preserve the current working directory: | ||
set CHERE_INVOKING=yes | ||
REM Start a 64 bit Mingw environment: | ||
set MSYSTEM=MINGW64 | ||
C:\msys64\usr\bin\bash -lc 'PATH="/mingw64/bin:$PATH" ; export PATH ; pwd ; ccache -sv || echo "SKIP: Could not query ccache stats"' | ||
build_script: | ||
- cmd: | | ||
REM Preserve the current working directory: | ||
set CHERE_INVOKING=yes | ||
REM Start a 64 bit Mingw environment: | ||
set MSYSTEM=MINGW64 | ||
C:\msys64\usr\bin\bash -lc 'date -u; PATH="/mingw64/bin:$PATH" CI_SKIP_CHECK=true ./ci_build.sh' | ||
after_build: | ||
- cmd: | | ||
REM Preserve the current working directory: | ||
set CHERE_INVOKING=yes | ||
REM Start a 64 bit Mingw environment: | ||
set MSYSTEM=MINGW64 | ||
C:\msys64\usr\bin\bash -lc 'date -u; PATH="/mingw64/bin:$PATH" ; export PATH ; ccache -sv || ccache -s || echo "SKIP: Could not query ccache stats"' | ||
test_script: | ||
- cmd: | | ||
REM Preserve the current working directory: | ||
set CHERE_INVOKING=yes | ||
REM Start a 64 bit Mingw environment: | ||
set MSYSTEM=MINGW64 | ||
C:\msys64\usr\bin\bash -lc 'date -u; PATH="/mingw64/bin:$PATH" make -s check' | ||
after_test: | ||
- cmd: | | ||
REM Preserve the current working directory: | ||
set CHERE_INVOKING=yes | ||
REM Start a 64 bit Mingw environment: | ||
set MSYSTEM=MINGW64 | ||
REM Oh the joys of shell scripting with strings passed through CMD: | ||
REM Note: currently Python installation path with MSYS is buggy [#1584] | ||
C:\msys64\usr\bin\bash -lc 'date -u; if ! rm -rf ".inst" ; then echo "WARNING: Failed to clean away .inst" ; fi ; PATH="/mingw64/bin:$PATH" make -s install-win-bundle DESTDIR="`pwd`/.inst/NUT-for-Windows-x86_64-SNAPSHOT-%APPVEYOR_BUILD_VERSION%" ; ln -fs "NUT-for-Windows-x86_64-SNAPSHOT-%APPVEYOR_BUILD_VERSION%" ./.inst/NUT-for-Windows-x86_64-SNAPSHOT ; ( cd .inst/NUT-for-Windows-x86_64-SNAPSHOT ; find . -ls ; )' | ||
cd .inst | ||
7z a ../NUT-for-Windows-x86_64-SNAPSHOT-%APPVEYOR_BUILD_VERSION%.7z NUT* | ||
- cmd: | | ||
REM Preserve the current working directory: | ||
set CHERE_INVOKING=yes | ||
REM Start a 64 bit Mingw environment: | ||
set MSYSTEM=MINGW64 | ||
C:\msys64\usr\bin\bash -lc 'date -u; PATH="/mingw64/bin:$PATH" ; export PATH ; ccache -sv || ccache -s || echo "SKIP: Could not query ccache stats"' | ||
artifacts: | ||
- path: 'NUT-for-Windows*.7z' | ||
name: Bundle of binary files and FOSS dependencies of NUT for Windows | ||
|
||
- path: config.log | ||
name: config.log | ||
|
||
# Example optional cache (depends on file change): | ||
# - C:\msys64 -> appveyor.yml | ||
cache: | ||
- C:\msys64\home\appveyor\.ccache | ||
- C:\msys64\home\appveyor\ccache # likely missing, no problem - but the name is reported in ccache status | ||
- C:\msys64\var\cache\pacman\pkg | ||
|
||
# Below we tried to stash binaries of MSYS2 environment | ||
# so VM deployment is faster on subsequent builds | ||
# (update/install "from scratch" costs about 3 min), | ||
# but unstashing the archive takes comparable time | ||
# and often leads to conflicts in pacman book-keeping, | ||
# while creating/updating the archive costs ~10 min. | ||
#- C:\msys64\var\lib\pacman | ||
#- C:\msys64\var\lib | ||
#- C:\msys64\mingw64 | ||
#- C:\msys64\mingw32 | ||
#- C:\msys64\ucrt64 | ||
#- C:\msys64\clang32 | ||
#- C:\msys64\clang64 | ||
#- C:\msys64\clangarm64 | ||
#- C:\msys64\usr | ||
#- C:\msys64\bin | ||
#- C:\msys64\etc | ||
#- C:\msys64\*.* | ||
#- C:\msys64\installerResources |
Oops, something went wrong.