@@ -13,18 +13,35 @@ jobs:
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@v6
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
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/" \
5168 run : cat test-suite.log || true
5269 - name : make distcheck
5370 run : |
54- if [ "$RUNNER_OS" == "Linux" ]; then
71+ if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ] ; then
5572 make distcheck
5673 elif [ "$RUNNER_OS" == "macOS" ]; then
5774 make distcheck LDFLAGS="-L$(brew --prefix)/lib/" \
@@ -66,22 +83,39 @@ jobs:
6683
6784 build-fixed-seed :
6885 runs-on : ${{ matrix.os }}
69- timeout-minutes : 10
86+ timeout-minutes : 20
7087 strategy :
7188 fail-fast : false
7289 matrix :
73- os :
74- - ubuntu-latest
75- - macos-latest
90+ include :
91+ - { os: ubuntu-latest, shell: bash }
92+ - { os: macos-latest, shell: bash }
93+ - { os: windows-latest, shell: msys2 }
94+ defaults :
95+ run :
96+ shell : ${{ matrix.shell }} {0}
7697 steps :
98+ - name : Disable CRLF conversion on Windows
99+ if : runner.os == 'Windows'
100+ shell : pwsh
101+ run : |
102+ git config --global core.autocrlf false
103+ git config --global core.eol lf
77104 - uses : actions/checkout@v6
105+ - name : Set up MSYS2
106+ if : runner.os == 'Windows'
107+ uses : msys2/setup-msys2@v2
108+ with :
109+ update : true
78110 - name : " Install dependencies"
79111 run : |
80112 if [ "$RUNNER_OS" == "Linux" ]; then
81113 # sharutils is for uudecode
82114 sudo apt install libgmp-dev libflint-dev libmpfr-dev libntl-dev
83115 elif [ "$RUNNER_OS" == "macOS" ]; then
84116 brew install autoconf automake libtool gmp flint mpfr ntl
117+ elif [ "$RUNNER_OS" == "Windows" ]; then
118+ 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
85119 else
86120 echo "$RUNNER_OS not supported"
87121 exit 1
90124 run : ./autogen.sh
91125 - name : configure
92126 run : |
93- if [ "$RUNNER_OS" == "Linux" ]; then
127+ if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ] ; then
94128 ./configure
95129 elif [ "$RUNNER_OS" == "macOS" ]; then
96130 ./configure LDFLAGS="-L$(brew --prefix)/lib/" \
@@ -108,7 +142,7 @@ jobs:
108142 run : cat test-suite.log || true
109143 - name : make distcheck with fixed seed
110144 run : |
111- if [ "$RUNNER_OS" == "Linux" ]; then
145+ if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ] ; then
112146 make distcheck DISTCHECK_CONFIGURE_FLAGS="SEED=1617753600"
113147 elif [ "$RUNNER_OS" == "macOS" ]; then
114148 make distcheck LDFLAGS="-L$(brew --prefix)/lib/" \
0 commit comments