From 49d87fea52bb19770f76710cfaf69881246a7219 Mon Sep 17 00:00:00 2001 From: Dimitrij Mijoski Date: Sat, 26 Feb 2022 18:12:05 +0100 Subject: Add Windows to Github Actions --- .appveyor.yml | 29 ----------------------------- .github/workflows/c-cpp.yml | 37 +++++++++++++++++++++++++++++++++++++ build-aux/appveyor-install.sh | 24 ------------------------ 3 files changed, 37 insertions(+), 53 deletions(-) delete mode 100644 .appveyor.yml delete mode 100755 build-aux/appveyor-install.sh diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 0dd305c..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: "{build}" - -environment: - global: - # Only need one flavour of dictionary - CONFIGURE_FLAGS: --with-hunspell-dir=/mingw64/share/hunspell - VERBOSE: 1 # Get test logs in output - matrix: - # MSYS does not have hunspell packages - # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - # MSYSTEM: MSYS - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - MSYSTEM: MINGW64 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - MSYSTEM: MINGW32 - -for: -- - matrix: - only: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - init: - - git config --global core.autocrlf input - - C:\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S libtool autoconf automake" - install: - - C:\msys64\usr\bin\bash.exe -l c:/projects/enchant/build-aux/appveyor-install.sh - # FIXME: add all available providers (just aspell?) - build_script: - - C:\msys64\usr\bin\bash.exe -lc "cd c:/projects/enchant && ./bootstrap && ./configure --enable-relocatable %CONFIGURE_FLAGS% && make && make DISTCHECK_CONFIGURE_FLAGS=\"--enable-relocatable %CONFIGURE_FLAGS%\" distcheck" diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index d156588..56e25dc 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -59,3 +59,40 @@ jobs: run: make check --jobs=`nproc` - name: make distcheck run: make distcheck --jobs=`nproc` DISTCHECK_CONFIGURE_FLAGS="--without-aspell" + + build-windows: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + strategy: + matrix: + include: + - { sys: mingw64, env: x86_64 } + - { sys: mingw32, env: i686 } + steps: + - uses: msys2/setup-msys2@v2 + with: + release: false + msystem: ${{matrix.sys}} + install: >- + patch git + mingw-w64-${{matrix.env}}-autotools + mingw-w64-${{matrix.env}}-gcc + mingw-w64-${{matrix.env}}-glib2 + mingw-w64-${{matrix.env}}-hunspell + mingw-w64-${{matrix.env}}-hunspell-en + mingw-w64-${{matrix.env}}-nuspell + mingw-w64-${{matrix.env}}-unittest-cpp + - uses: actions/checkout@v2 + with: { submodules: true } + - name: Bootstrap (gnulib and autoreconf) + run: ./bootstrap + - name: configure + run: ./configure --enable-relocatable + - name: make + run: make --jobs=`nproc` + - name: make check + run: make check --jobs=`nproc` + - name: make distcheck + run: make distcheck --jobs=`nproc` diff --git a/build-aux/appveyor-install.sh b/build-aux/appveyor-install.sh deleted file mode 100755 index 459c955..0000000 --- a/build-aux/appveyor-install.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Pre-install script for appveyor: install build deps - -# Get mingw type, if any, from MSYSTEM -case $MSYSTEM in - MINGW32) - MINGW_ARCH=i686 - PREFIX=/mingw32 - ;; - MINGW64) - MINGW_ARCH=x86_64 - PREFIX=/mingw64 - ;; -esac - -# GLib -pacman --noconfirm -S mingw-w64-$MINGW_ARCH-glib2 glib2-devel mingw-w64-$MINGW_ARCH-hunspell mingw-w64-$MINGW_ARCH-hunspell-en - -# UnitTest++ is not packaged in mingw -wget https://github.com/unittest-cpp/unittest-cpp/releases/download/v1.6.1/unittest-cpp-1.6.1.tar.gz -tar zxvf unittest-cpp-1.6.1.tar.gz -cd unittest-cpp-1.6.1 -./configure --prefix=$PREFIX && make && make install -cd .. -- cgit v1.2.1