1 | name: Run tests |
---|
2 | |
---|
3 | # Trigger the workflow on push or pull request |
---|
4 | on: [push, pull_request] |
---|
5 | |
---|
6 | env: |
---|
7 | prefix: "/tmp/prefix" |
---|
8 | jobs: |
---|
9 | test: |
---|
10 | runs-on: ${{ matrix.os }} |
---|
11 | strategy: |
---|
12 | fail-fast: false |
---|
13 | matrix: |
---|
14 | os: [ubuntu-latest, macos-latest] |
---|
15 | configflags: ["", "--with-ntl --with-flint", "--without-ntl --with-flint"] |
---|
16 | |
---|
17 | steps: |
---|
18 | - uses: actions/checkout@v3 |
---|
19 | - name: "Install dependencies" |
---|
20 | run: | |
---|
21 | FLINT_JLL="https://github.com/JuliaBinaryWrappers/FLINT_jll.jl/releases/download/FLINT-v200.700.0%2B0/FLINT.v200.700.0" |
---|
22 | if [ "$RUNNER_OS" == "Linux" ]; then |
---|
23 | # sharutils is for uudecode |
---|
24 | sudo apt install sharutils libgmp-dev libreadline-dev libmpfr-dev libntl-dev libcdd-dev 4ti2 normaliz |
---|
25 | # install new enough FLINT |
---|
26 | wget -O FLINT.tar.gz "${FLINT_JLL}.x86_64-linux-gnu.tar.gz" |
---|
27 | sudo tar -C /usr -xvf FLINT.tar.gz |
---|
28 | rm -f FLINT.tar.gz |
---|
29 | elif [ "$RUNNER_OS" == "macOS" ]; then |
---|
30 | brew install autoconf automake libtool gmp readline mpfr ntl cddlib |
---|
31 | # TODO: 4ti2? |
---|
32 | # TODO: normaliz? |
---|
33 | # install new enough FLINT |
---|
34 | wget -O FLINT.tar.gz "${FLINT_JLL}.x86_64-apple-darwin.tar.gz" |
---|
35 | sudo mkdir -p /usr/local |
---|
36 | sudo tar -C /usr/local -xvf FLINT.tar.gz |
---|
37 | rm -f FLINT.tar.gz |
---|
38 | else |
---|
39 | echo "$RUNNER_OS not supported" |
---|
40 | exit 1 |
---|
41 | fi |
---|
42 | - run: ./autogen.sh |
---|
43 | - run: ./configure --prefix=$prefix --enable-gfanlib ${{ matrix.configflags }} |
---|
44 | - run: make -j3 |
---|
45 | - run: make check |
---|
46 | - run: make install |
---|
47 | - run: cd Tst && ./regress.cmd -s $prefix/bin/Singular Old/universal.lst |
---|
48 | if: ${{ always() }} |
---|
49 | #- run: cd Tst && ./regress.cmd -s $prefix/bin/Singular Buch/buch.lst |
---|
50 | # if: ${{ always() }} |
---|
51 | - run: cd Tst && ./regress.cmd -s $prefix/bin/Singular Plural/short.lst |
---|
52 | if: ${{ always() }} |
---|
53 | - run: cd Tst && ./regress.cmd -s $prefix/bin/Singular Plural/dmod.lst |
---|
54 | if: ${{ always() }} |
---|
55 | - run: cd Tst && ./regress.cmd -s $prefix/bin/Singular Short/ok_s.lst |
---|
56 | if: ${{ always() }} |
---|
57 | #- run: cd Tst && ./regress.cmd -s $prefix/bin/Singular Long/ok_l.lst |
---|
58 | # if: ${{ always() }} |
---|
59 | |
---|
60 | # TODO: code coverage? |
---|