diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 3a1acfb899..9b111e69eb 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -6,11 +6,20 @@ on: pull_request: branches: [ master ] +env: + LC_ALL: C + COMMON_CONFIGURE_FLAGS: >- + --disable-silent-rules + --with-camlibs=everything + jobs: - build: + build-ix: runs-on: ubuntu-latest + strategy: + fail-fast: true + steps: - uses: actions/checkout@v2 - name: apt-get update @@ -22,7 +31,7 @@ jobs: - name: autoreconf run: autoreconf -i -f - name: configure - run: ./configure --prefix=$PWD/__prefix + run: ./configure ${COMMON_CONFIGURE_FLAGS} --prefix=$PWD/__prefix - name: make run: NPROC=$(nproc); set -x; make -j$NPROC -l$NPROC - name: make check @@ -49,3 +58,89 @@ jobs: make install ldd __pref/bin/ambs-lgp2-frontend __pref/bin/ambs-lgp2-frontend + + build-msys2: + # only try expensive windows buildserver if linux build works + # needs: build-ix + + runs-on: windows-latest + + # See https://github.com/msys2/setup-msys2 + + strategy: + fail-fast: false + matrix: + include: + - { sys: mingw32, env: i686 } + - { sys: mingw64, env: x86_64 } + - { sys: ucrt64, env: ucrt-x86_64 } + - { sys: clang64, env: clang-x86_64 } + + name: 'MSYS2 ${{ matrix.sys }} build' + + env: + MINGW_ARCH: ${{ matrix.sys }} + + defaults: + run: + shell: msys2 {0} + + steps: + - name: 'git config' + run: git config --global core.autocrlf input + shell: bash + + - uses: actions/checkout@v2 + with: + fetch-depth: 10 + + - name: 'Set up MSYS2 and Install Software' + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.sys }} + update: true + install: >- + git + autoconf + automake + gettext-devel + libtool + make + pkgconf + msys2-w32api-runtime + mingw-w64-${{ matrix.env }}-gcc + mingw-w64-${{ matrix.env }}-curl + mingw-w64-${{ matrix.env }}-libexif + mingw-w64-${{ matrix.env }}-libgd + mingw-w64-${{ matrix.env }}-libltdl + mingw-w64-${{ matrix.env }}-libusb + mingw-w64-${{ matrix.env }}-libxml2 + + - name: 'test nproc' + run: nproc ||: + + - name: 'autoreconf' + run: autoreconf -vis . + + - name: 'configure' + env: + CXX: no + run: ./configure ${COMMON_CONFIGURE_FLAGS} --prefix=$PWD/__prefix + + - name: 'make' + run: make + + - name: 'make check' + run: make check + + - name: 'make install' + run: make install + + - name: 'make installcheck' + run: make installcheck + + - name: 'make distcheck' + run: make distcheck + + - name: 'dist tarball content' + run: for tarball in *.tar.*; do tar tf "$tarball" | sort; break; done diff --git a/configure.ac b/configure.ac index 20ede0c6e0..abf910c0b6 100644 --- a/configure.ac +++ b/configure.ac @@ -535,6 +535,7 @@ GP_CAMLIB([largan],[outdated])dnl GP_CAMLIB([lg_gsm],[outdated])dnl AM_COND_IF([HAVE_LIBCURL], [dnl AM_COND_IF([HAVE_LIBXML2], [dnl +dnl TODO: Make this conditional on availability of (Winsock ws2_32 or Unix sockets) GP_CAMLIB([lumix])dnl ]) ])