Skip to content

Updates to Windows CI build #57

Updates to Windows CI build

Updates to Windows CI build #57

Workflow file for this run

name: CI
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-autoconf:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install Ubuntu build deps
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y flex bison libgmp-dev libmpfr-dev
- name: Stabilize generated configure script timestamp
shell: bash
run: touch configure
- name: Configure
shell: bash
run: ./configure
- name: Build
shell: bash
run: make test -j4
- name: Check
shell: bash
run: make check
build-cmake-unix:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
qt_detection: [cmake, autoconf]
steps:
- uses: actions/checkout@v4
- name: Install Ubuntu build deps
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y flex bison libgmp-dev libmpfr-dev
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DGECODE_QT_DETECTION=${{ matrix.qt_detection }}
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Check
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target check
build-cmake-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- name: shared
build_shared: ON
build_static: OFF
- name: static
build_shared: OFF
build_static: ON
steps:
- uses: actions/checkout@v4
- name: Setup Perl
uses: shogo82148/actions-setup-perl@v1
- name: Create Build Environment
shell: pwsh
run: cmake -E make_directory "${{ github.workspace }}\\build"
- name: Configure CMake
shell: pwsh
run: >
cmake -S "${{ github.workspace }}" -B "${{ github.workspace }}\\build"
-G "Visual Studio 17 2022" -A x64
-DGECODE_ENABLE_QT=OFF
-DGECODE_ENABLE_GIST=OFF
-DGECODE_BUILD_SHARED=${{ matrix.build_shared }}
-DGECODE_BUILD_STATIC=${{ matrix.build_static }}
- name: Build
shell: pwsh
run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }}
- name: Build test binary
shell: pwsh
run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }} --target gecode-test
build-autoconf-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
autoconf
automake
bison
flex
gcc
make
m4
libtool
perl
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-gmp
mingw-w64-ucrt-x86_64-mpfr
- name: Stabilize generated configure script timestamp
shell: msys2 {0}
run: touch configure
- name: Configure
shell: msys2 {0}
run: ./configure --disable-qt --disable-gist
- name: Build
shell: msys2 {0}
run: make test -j4
- name: Check
shell: msys2 {0}
run: make check