Skip to content

Commit 17a3508

Browse files
committed
Add CI for Windows
1 parent d8aef8b commit 17a3508

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

.github/workflows/msolve.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,39 @@ on:
99
jobs:
1010
build:
1111
runs-on: ${{ matrix.os }}
12-
timeout-minutes: 10
12+
timeout-minutes: 20
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os:
17-
- ubuntu-latest
18-
- macos-latest
16+
include:
17+
- { os: ubuntu-latest, shell: bash }
18+
- { os: macos-latest, shell: bash }
19+
- { os: windows-latest, shell: msys2 }
20+
defaults:
21+
run:
22+
shell: ${{ matrix.shell }} {0}
1923
steps:
24+
- name: Disable CRLF conversion on Windows
25+
if: runner.os == 'Windows'
26+
shell: pwsh
27+
run: |
28+
git config --global core.autocrlf false
29+
git config --global core.eol lf
2030
- uses: actions/checkout@v3
31+
- name: Set up MSYS2
32+
if: runner.os == 'Windows'
33+
uses: msys2/setup-msys2@v2
34+
with:
35+
update: true
2136
- name: "Install dependencies"
2237
run: |
2338
if [ "$RUNNER_OS" == "Linux" ]; then
2439
# sharutils is for uudecode
2540
sudo apt install libgmp-dev libflint-dev libmpfr-dev libntl-dev
2641
elif [ "$RUNNER_OS" == "macOS" ]; then
2742
brew install autoconf automake libtool gmp flint mpfr ntl
43+
elif [ "$RUNNER_OS" == "Windows" ]; then
44+
pacman -S --noconfirm autotools mingw-w64-x86_64-toolchain mingw-w64-x86_64-gmp mingw-w64-x86_64-flint mingw-w64-x86_64-mpfr mingw-w64-x86_64-ntl
2845
else
2946
echo "$RUNNER_OS not supported"
3047
exit 1
@@ -33,7 +50,7 @@ jobs:
3350
run: ./autogen.sh
3451
- name: configure
3552
run: |
36-
if [ "$RUNNER_OS" == "Linux" ]; then
53+
if [ "$RUNNER_OS" = "Linux" ] || [ "$RUNNER_OS" = "Windows" ]; then
3754
./configure
3855
elif [ "$RUNNER_OS" == "macOS" ]; then
3956
./configure LDFLAGS="-L$(brew --prefix)/lib/" CFLAGS="-g -O2 -I$(brew --prefix)/include/"
@@ -50,7 +67,7 @@ jobs:
5067
run: cat test-suite.log || true
5168
- name: make distcheck
5269
run: |
53-
if [ "$RUNNER_OS" == "Linux" ]; then
70+
if [ "$RUNNER_OS" = "Linux" ] || [ "$RUNNER_OS" = "Windows" ]; then
5471
make distcheck
5572
elif [ "$RUNNER_OS" == "macOS" ]; then
5673
make distcheck LDFLAGS="-L$(brew --prefix)/lib/" CFLAGS="-g -O2 -I$(brew --prefix)/include/"

0 commit comments

Comments
 (0)