@@ -13,19 +13,36 @@ jobs:
1313 strategy :
1414 fail-fast : false
1515 matrix :
16- os :
17- - ubuntu-latest
18- - macos-latest
19- - macos-26-intel
16+ include :
17+ - { os: ubuntu-latest, shell: bash }
18+ - { os: macos-latest, shell: bash }
19+ - { os: macos-26-intel, shell: bash }
20+ - { os: windows-latest, shell: msys2 }
21+ defaults :
22+ run :
23+ shell : ${{ matrix.shell }} {0}
2024 steps :
25+ - name : Disable CRLF conversion on Windows
26+ if : runner.os == 'Windows'
27+ shell : pwsh
28+ run : |
29+ git config --global core.autocrlf false
30+ git config --global core.eol lf
2131 - uses : actions/checkout@v6
32+ - name : Set up MSYS2
33+ if : runner.os == 'Windows'
34+ uses : msys2/setup-msys2@v2
35+ with :
36+ update : true
2237 - name : " Install dependencies"
2338 run : |
2439 if [ "$RUNNER_OS" == "Linux" ]; then
2540 # sharutils is for uudecode
2641 sudo apt install libgmp-dev libflint-dev libmpfr-dev libntl-dev
2742 elif [ "$RUNNER_OS" == "macOS" ]; then
2843 brew install autoconf automake libtool gmp flint mpfr ntl
44+ elif [ "$RUNNER_OS" == "Windows" ]; then
45+ 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
2946 else
3047 echo "$RUNNER_OS not supported"
3148 exit 1
3451 run : ./autogen.sh
3552 - name : configure
3653 run : |
37- if [ "$RUNNER_OS" == "Linux" ]; then
54+ if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ] ; then
3855 ./configure
3956 elif [ "$RUNNER_OS" == "macOS" ]; then
4057 ./configure LDFLAGS="-L$(brew --prefix)/lib/" \
5269 run : cat test-suite.log || true
5370 - name : make distcheck
5471 run : |
55- if [ "$RUNNER_OS" == "Linux" ]; then
72+ if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ] ; then
5673 make distcheck
5774 elif [ "$RUNNER_OS" == "macOS" ]; then
5875 make distcheck LDFLAGS="-L$(brew --prefix)/lib/" \
@@ -67,22 +84,39 @@ jobs:
6784
6885 build-fixed-seed :
6986 runs-on : ${{ matrix.os }}
70- timeout-minutes : 10
87+ timeout-minutes : 20
7188 strategy :
7289 fail-fast : false
7390 matrix :
74- os :
75- - ubuntu-latest
76- - macos-latest
91+ include :
92+ - { os: ubuntu-latest, shell: bash }
93+ - { os: macos-latest, shell: bash }
94+ - { os: windows-latest, shell: msys2 }
95+ defaults :
96+ run :
97+ shell : ${{ matrix.shell }} {0}
7798 steps :
99+ - name : Disable CRLF conversion on Windows
100+ if : runner.os == 'Windows'
101+ shell : pwsh
102+ run : |
103+ git config --global core.autocrlf false
104+ git config --global core.eol lf
78105 - uses : actions/checkout@v6
106+ - name : Set up MSYS2
107+ if : runner.os == 'Windows'
108+ uses : msys2/setup-msys2@v2
109+ with :
110+ update : true
79111 - name : " Install dependencies"
80112 run : |
81113 if [ "$RUNNER_OS" == "Linux" ]; then
82114 # sharutils is for uudecode
83115 sudo apt install libgmp-dev libflint-dev libmpfr-dev libntl-dev
84116 elif [ "$RUNNER_OS" == "macOS" ]; then
85117 brew install autoconf automake libtool gmp flint mpfr ntl
118+ elif [ "$RUNNER_OS" == "Windows" ]; then
119+ 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
86120 else
87121 echo "$RUNNER_OS not supported"
88122 exit 1
91125 run : ./autogen.sh
92126 - name : configure
93127 run : |
94- if [ "$RUNNER_OS" == "Linux" ]; then
128+ if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ] ; then
95129 ./configure
96130 elif [ "$RUNNER_OS" == "macOS" ]; then
97131 ./configure LDFLAGS="-L$(brew --prefix)/lib/" \
@@ -109,7 +143,7 @@ jobs:
109143 run : cat test-suite.log || true
110144 - name : make distcheck with fixed seed
111145 run : |
112- if [ "$RUNNER_OS" == "Linux" ]; then
146+ if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "Windows" ] ; then
113147 make distcheck DISTCHECK_CONFIGURE_FLAGS="SEED=1617753600"
114148 elif [ "$RUNNER_OS" == "macOS" ]; then
115149 make distcheck LDFLAGS="-L$(brew --prefix)/lib/" \
0 commit comments