Skip to content

Commit

Permalink
Initial shot at Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ndim committed Nov 9, 2022
1 parent 6ca70f8 commit d8a7585
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 2 deletions.
99 changes: 97 additions & 2 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 or Unix sockets)
GP_CAMLIB([lumix])dnl
])
])
Expand Down

0 comments on commit d8a7585

Please sign in to comment.