|
9 | 9 | jobs: |
10 | 10 | build: |
11 | 11 | runs-on: ${{ matrix.os }} |
12 | | - timeout-minutes: 10 |
| 12 | + timeout-minutes: 20 |
13 | 13 | strategy: |
14 | 14 | fail-fast: false |
15 | 15 | 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} |
19 | 23 | 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 |
20 | 30 | - 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 |
21 | 36 | - name: "Install dependencies" |
22 | 37 | run: | |
23 | 38 | if [ "$RUNNER_OS" == "Linux" ]; then |
24 | 39 | # sharutils is for uudecode |
25 | 40 | sudo apt install libgmp-dev libflint-dev libmpfr-dev libntl-dev |
26 | 41 | elif [ "$RUNNER_OS" == "macOS" ]; then |
27 | 42 | 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 |
28 | 45 | else |
29 | 46 | echo "$RUNNER_OS not supported" |
30 | 47 | exit 1 |
|
33 | 50 | run: ./autogen.sh |
34 | 51 | - name: configure |
35 | 52 | run: | |
36 | | - if [ "$RUNNER_OS" == "Linux" ]; then |
| 53 | + if [ "$RUNNER_OS" = "Linux" ] || [ "$RUNNER_OS" = "Windows" ]; then |
37 | 54 | ./configure |
38 | 55 | elif [ "$RUNNER_OS" == "macOS" ]; then |
39 | 56 | ./configure LDFLAGS="-L$(brew --prefix)/lib/" CFLAGS="-g -O2 -I$(brew --prefix)/include/" |
|
50 | 67 | run: cat test-suite.log || true |
51 | 68 | - name: make distcheck |
52 | 69 | run: | |
53 | | - if [ "$RUNNER_OS" == "Linux" ]; then |
| 70 | + if [ "$RUNNER_OS" = "Linux" ] || [ "$RUNNER_OS" = "Windows" ]; then |
54 | 71 | make distcheck |
55 | 72 | elif [ "$RUNNER_OS" == "macOS" ]; then |
56 | 73 | make distcheck LDFLAGS="-L$(brew --prefix)/lib/" CFLAGS="-g -O2 -I$(brew --prefix)/include/" |
|
0 commit comments