Port to Windows #775
Workflow file for this run
This file contains hidden or 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
| name: msolve CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, shell: bash } | |
| - { os: macos-latest, shell: bash } | |
| - { os: macos-26-intel, shell: bash } | |
| - { os: windows-latest, shell: msys2 } | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} {0} | |
| steps: | |
| - name: Disable CRLF conversion on Windows | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - uses: actions/checkout@v6 | |
| - name: Set up MSYS2 | |
| if: runner.os == 'Windows' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: UCRT64 | |
| update: true | |
| - name: "Install dependencies" | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| # sharutils is for uudecode | |
| sudo apt install libgmp-dev libflint-dev libmpfr-dev libntl-dev | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| brew install autoconf automake libtool gmp flint mpfr ntl | |
| elif [ "$RUNNER_OS" == "Windows" ]; then | |
| pacman -S --noconfirm autotools mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-gmp mingw-w64-ucrt-x86_64-flint mingw-w64-ucrt-x86_64-mpfr mingw-w64-ucrt-x86_64-ntl | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: autogen | |
| run: ./autogen.sh | |
| - name: configure | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ]; then | |
| ./configure | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| ./configure LDFLAGS="-L$(brew --prefix)/lib/" \ | |
| CFLAGS="-g -O2 -I$(brew --prefix)/include/" | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: make | |
| run: make | |
| - name: make check | |
| run: make check | |
| - name: show test-suite.log if test failed | |
| if: failure() | |
| run: cat test-suite.log || true | |
| - name: make distcheck | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ]; then | |
| make distcheck | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| make distcheck LDFLAGS="-L$(brew --prefix)/lib/" \ | |
| CFLAGS="-g -O2 -I$(brew --prefix)/include/" | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: show test-suite.log if test failed | |
| if: failure() | |
| run: cat msolve-*/_build/sub/test-suite.log || true | |
| build-fixed-seed: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, shell: bash } | |
| - { os: macos-latest, shell: bash } | |
| - { os: macos-26-intel, shell: bash } | |
| - { os: windows-latest, shell: msys2 } | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} {0} | |
| steps: | |
| - name: Disable CRLF conversion on Windows | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - uses: actions/checkout@v6 | |
| - name: Set up MSYS2 | |
| if: runner.os == 'Windows' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: UCRT64 | |
| update: true | |
| - name: "Install dependencies" | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| # sharutils is for uudecode | |
| sudo apt install libgmp-dev libflint-dev libmpfr-dev libntl-dev | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| brew install autoconf automake libtool gmp flint mpfr ntl | |
| elif [ "$RUNNER_OS" == "Windows" ]; then | |
| pacman -S --noconfirm autotools mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-gmp mingw-w64-ucrt-x86_64-flint mingw-w64-ucrt-x86_64-mpfr mingw-w64-ucrt-x86_64-ntl | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: autogen | |
| run: ./autogen.sh | |
| - name: configure | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ]; then | |
| ./configure | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| ./configure LDFLAGS="-L$(brew --prefix)/lib/" \ | |
| CFLAGS="-g -O2 -I$(brew --prefix)/include/" | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: make | |
| run: make | |
| - name: make check with fixed seed | |
| run: SEED=1617753600 make check | |
| - name: show test-suite.log if test failed | |
| if: failure() | |
| run: cat test-suite.log || true | |
| - name: make distcheck with fixed seed | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ]; then | |
| make distcheck DISTCHECK_CONFIGURE_FLAGS="SEED=1617753600" | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| make distcheck LDFLAGS="-L$(brew --prefix)/lib/" \ | |
| CFLAGS="-g -O2 -I$(brew --prefix)/include/" \ | |
| DISTCHECK_CONFIGURE_FLAGS="SEED=1617753600" | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: show test-suite.log if test failed | |
| if: failure() | |
| run: cat test-suite.log || true | |
| flintdev-assert-ntl: | |
| name: FLINT git version, compiled with assert and NTL | |
| runs-on: ubuntu-latest | |
| env: | |
| CC: "gcc" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Setup" | |
| run: | | |
| sudo apt-get install -y libgmp-dev libmpfr-dev libntl-dev autoconf libtool-bin | |
| $CC --version | |
| make --version | |
| autoconf --version | |
| libtool --version | |
| echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV | |
| - name: "Build FLINT" | |
| run: | | |
| git clone --depth=1 https://github.com/flintlib/flint | |
| cd flint && ./bootstrap.sh && ./configure CC=${CC} --with-ntl --enable-assert | |
| $MAKE && sudo make install && sudo ldconfig | |
| - name: "Test FLINT" | |
| run: | | |
| cd flint && $MAKE tests && $MAKE check | |
| continue-on-error: true | |
| - name: "Build and Test msolve" | |
| run: | | |
| ./autogen.sh && ./configure && $MAKE && make check | |
| - name: show test-suite.log if test failed | |
| if: failure() | |
| run: cat test-suite.log || true | |
| flintdev-assert-ntl-fixed-seed: | |
| name: FLINT git version, compiled with assert and NTL, make check with fixed seed | |
| runs-on: ubuntu-latest | |
| env: | |
| CC: "gcc" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Setup" | |
| run: | | |
| sudo apt-get install -y libgmp-dev libmpfr-dev libntl-dev autoconf libtool-bin | |
| $CC --version | |
| make --version | |
| autoconf --version | |
| libtool --version | |
| echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV | |
| - name: "Build FLINT" | |
| run: | | |
| git clone --depth=1 https://github.com/flintlib/flint | |
| cd flint && ./bootstrap.sh && ./configure CC=${CC} --with-ntl --enable-assert | |
| $MAKE && sudo make install && sudo ldconfig | |
| - name: "Test FLINT" | |
| run: | | |
| cd flint && $MAKE tests && $MAKE check | |
| continue-on-error: true | |
| - name: "Build and Test msolve" | |
| run: | | |
| ./autogen.sh && ./configure && $MAKE && SEED=1617753600 make check | |
| - name: show test-suite.log if test failed | |
| if: failure() | |
| run: cat test-suite.log || true |