diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 84bbf2d0e9..5abed85e93 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -71,555 +71,3 @@ jobs: - if: failure() name: "If failure, stop all other jobs" uses: andymckay/cancel-action@0.3 - - - - ############################################################################## - # ubuntu with gcc (assert) - ############################################################################## - ubuntu-gcc-assert: - name: Ubuntu GCC (assert, x1) - - runs-on: ubuntu-latest - - env: - MAKE: "make -j --output-sync=target" - CC: "gcc" - CFLAGS: "-Wall -Werror=implicit-function-declaration" - FLINT_TEST_MULTIPLIER: "1" # increase to 2 after workshop ~ 15min - - steps: - - uses: actions/checkout@v4 - - - name: "Setup" - run: | - sudo apt install -y libgmp-dev - sudo apt install -y libmpfr-dev - sudo apt install -y autoconf - sudo apt install -y libtool-bin - gcc --version - make --version - autoconf --version - libtool --version - - - name: "Configure" - run: | - ./bootstrap.sh - ./configure CC=${CC} CFLAGS="${CFLAGS}" --with-gmp=/usr --with-mpfr=/usr --enable-assert --disable-static - - - name: "Compile library" - run: | - $MAKE - ldd libflint.so - - - name: "Compile tests" - run: | - $MAKE tests - - - name: "Check" - run: | - $MAKE check - - - if: failure() - name: "If failure, stop all other jobs" - uses: andymckay/cancel-action@0.3 - - - - ############################################################################## - # macos with gcc and blas - ############################################################################## - macos-gcc: - name: macOS GCC with BLAS (x1) - - runs-on: macos-latest - - env: - MAKE: "gmake -j -l 10 --output-sync=target" - CFLAGS: "-Wall" - EXTRA_OPTIONS: "--disable-static --enable-shared" - CC: "gcc" - FLINT_TEST_MULTIPLIER: "1" # increase to 3 after workshop ~ 10min - - steps: - - uses: actions/checkout@v4 - - - name: "Setup" - run: | - brew install gcc - brew install make - brew install gmp - brew install mpfr - brew install autoconf - brew install libtool - brew install automake - brew install openblas - gcc --version - gmake --version - autoconf --version - - - name: "Configure" - run: | - ./bootstrap.sh - ./configure CC=${CC} CFLAGS="${CFLAGS}" \ - --with-gmp=$(brew --prefix) \ - --with-mpfr=$(brew --prefix) \ - --with-blas=$(brew --prefix)/opt/openblas \ - ${EXTRA_OPTIONS} - - - name: "Compile library" - run: | - $MAKE - - - name: "Compile tests" - run: | - $MAKE tests - - - name: "Check" - run: | - $MAKE check - - - if: failure() - name: "If failure, stop all other jobs" - uses: andymckay/cancel-action@0.3 - - - - ############################################################################## - # freebsd with clang - ############################################################################## - freebsd-gcc: - name: FreeBSD Clang (x0.5) - - runs-on: macos-latest - env: - FLINT_TEST_MULTIPLIER: "0.5" - - steps: - - uses: actions/checkout@v4 - - - name: "Run tests on FreeBSD" - uses: cross-platform-actions/action@v0.19.1 - timeout-minutes: 25 - continue-on-error: true - with: - operating_system: freebsd - version: '13.1' - shell: bash - run: | - yes | sudo pkg install pkgconf - yes | sudo pkg install gmake - yes | sudo pkg install gmp - yes | sudo pkg install mpfr - yes | sudo pkg install autoconf - yes | sudo pkg install libtool - yes | sudo pkg install automake - gmake --version - clang --version - autoconf --version - libtool --version - touch _is_installed - ./bootstrap.sh - touch _is_bootstrapped - ./configure CC=clang CFLAGS="-Wall" --disable-static --enable-shared \ - --with-gmp-include=$(pkgconf --variable=includedir gmp) \ - --with-gmp-lib=$(pkgconf --variable=libdir gmp) \ - --with-mpfr-include=$(pkgconf --variable=includedir mpfr) \ - --with-mpfr-lib=$(pkgconf --variable=libdir mpfr) - touch _is_configured - gmake -j - touch _is_built - gmake -j check - touch _is_checked - - # Sometimes the FreeBSD runner cannot exit properly. We created files - # for each step to show that it was able to run the tests. - - name: "Check that everything was okay" - run: | - if test -e _is_installed; - then - if test -e _is_bootstrapped; - then - if test -e _is_configured; - then - if test -e _is_built; - then - if test -e _is_checked; - then - echo "All good!" - else - echo "Check failed!" - exit 5 - fi - else - echo "Building failed!" - exit 4 - fi - else - echo "Configuration failed!" - exit 3 - fi - else - echo "Bootstrap failed!" - exit 2 - fi - else - echo "Installation failed!" - exit 1 - fi - - # - if: failure() - # name: "If failure, stop all other jobs" - # uses: andymckay/cancel-action@0.3 - - - - ############################################################################## - # cygwin with gcc - ############################################################################## - cygwin-gcc: - name: Cygwin GCC (x0.5) - - runs-on: windows-latest - - defaults: - run: - shell: C:\cygwin64\bin\bash.exe --login -o igncr '{0}' - - env: - MAKE: "make -j --output-sync=target" - REPO: /cygdrive/d/a/flint/flint # FIXME: De-hardcode this - CFLAGS: "-Wall" - EXTRA_OPTIONS: "--enable-shared --disable-static" - CC: "gcc" - FLINT_TEST_MULTIPLIER: "0.5" - - steps: - - uses: actions/checkout@v4 - - - name: "Set up Cygwin" - uses: gap-actions/setup-cygwin@v1 - with: - PKGS_TO_INSTALL: "dos2unix,gcc-core,make,libgmp-devel,libmpfr-devel,libtool,autoconf,automake" - - - name: "Setup" - run: | - gcc --version - make --version - autoconf --version - libtool --version - - - name: "Configure" - run: | - cd ${REPO} - dos2unix configure - dos2unix bootstrap.sh - ./bootstrap.sh - ./configure CC=${CC} CFLAGS="${CFLAGS}" ${EXTRA_OPTIONS} - - - name: "Compile library" - run: | - cd ${REPO} - ${MAKE} - - - name: "Compile tests" - run: | - cd ${REPO} - $MAKE tests - - - name: "Check" - run: | - cd ${REPO} - $MAKE check - - - if: failure() - name: "If failure, stop all other jobs" - uses: andymckay/cancel-action@0.3 - - - - ############################################################################# - # ubuntu with clang - ############################################################################# - ubuntu-clang: - name: Ubuntu Clang (x1) - - runs-on: ubuntu-latest - - env: - MAKE: "make -j --output-sync=target" - LOCAL: ${{ github.workspace }}/local - LDFLAGS: "-Wl,-rpath,$LOCAL/lib" - CFLAGS: "-Wall" - CC: "clang" - EXTRA_OPTIONS: "--disable-static --enable-shared" - FLINT_TEST_MULTIPLIER: "1" # increase to 5 after workshop - - steps: - - uses: actions/checkout@v4 - - - name: "Setup" - run: | - sudo apt install -y libgmp-dev - sudo apt install -y libmpfr-dev - sudo apt install -y autoconf - sudo apt install -y libtool-bin - clang --version - make --version - autoconf --version - libtool --version - - - name: "Configure" - run: | - ./bootstrap.sh - ./configure CC=${CC} CFLAGS="${CFLAGS}" ${EXTRA_OPTIONS} - - - name: "Compile library" - run: | - $MAKE - ldd libflint.so - - - name: "Compile tests" - run: | - $MAKE tests - - - name: "Check" - run: | - $MAKE check - - - if: failure() - name: "If failure, stop all other jobs" - uses: andymckay/cancel-action@0.3 - - - - ############################################################################# - # ubuntu with gcc and cmake (no checks) - ############################################################################# - ubuntu-cmake-gcc: - name: Ubuntu GCC via CMake (no check) - - runs-on: ubuntu-latest - - env: - MAKE: "make -j --output-sync=target" - LOCAL: ${{ github.workspace }}/local - LDFLAGS: "-Wl,-rpath,$LOCAL/lib" - CFLAGS: "-Wall" - - steps: - - uses: actions/checkout@v4 - - - name: "Setup" - run: | - sudo apt install -y cmake - sudo apt install -y libgmp-dev - sudo apt install -y libmpfr-dev - gcc --version - make --version - cmake --version - - - name: "Configure" - run: | - mkdir build - cd build - cmake -G"Unix Makefiles" -DWITH_NTL=no -DBUILD_TESTING=yes \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${LOCAL} .. - - - name: "Compile library" - run: | - cd build - $MAKE - ldd lib/libflint.so - - - if: failure() - name: "If failure, stop all other jobs" - uses: andymckay/cancel-action@0.3 - - - - ############################################################################# - # mingw with gcc - ############################################################################# - mingw64-gcc: - name: MinGW GCC (x0.5) - - runs-on: windows-latest - - defaults: - run: - shell: msys2 {0} - - env: - MAKE: "make -j --output-sync=target" - CFLAGS: "-Wall" - EXTRA_OPTIONS: "--enable-shared --disable-static" - CC: "gcc" - FLINT_TEST_MULTIPLIER: "0.5" - - steps: - - uses: actions/checkout@v4 - - - name: "Setup MinGW" - uses: msys2/setup-msys2@v2 - with: - msystem: mingw64 - update: true - install: mingw-w64-x86_64-gcc mingw-w64-x86_64-autotools - - - name: "Setup" - run: | - gcc --version - make --version - autoconf --version - libtool --version - - - name: "Configure" - run: | - ./bootstrap.sh - ./configure CC=${CC} CFLAGS="${CFLAGS}" ${EXTRA_OPTIONS} - - - name: "Compile library" - run: | - ${MAKE} - - - name: "Compile tests" - run: | - ${MAKE} tests - - - name: "Check" - run: | - ${MAKE} check - - - if: failure() - name: "If failure, stop all other jobs" - uses: andymckay/cancel-action@0.3 - - - - ############################################################################## - # msvc - ############################################################################## - msvc: - name: MSVC (x1, excl test) - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - - name: "Setup Conda" - uses: conda-incubator/setup-miniconda@v2.2.0 - with: - miniconda-version: "latest" - channels: conda-forge - - - name: "Install dependencies" - run: | - conda install --yes -c conda-forge mpfr - conda install --yes -c conda-forge pthreads-win32 - conda info - conda list - - - name: "Setup MSVC" - uses: ilammy/msvc-dev-cmd@v1.12.1 - with: - arch: x86_64 - - - name: "Configure" - run: | - mkdir build - cd build - set "LIB=C:\Miniconda3\Library\lib;%LIB%" - set "CPATH=C:\Miniconda3\Library\include;%CPATH%" - cmake -G "Ninja" -DCMAKE_C_FLAGS="/wd4018 /wd4146 /wd4244 /wd4267 /wd4305 /wd4996" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release .. - - - name: "Build" - run: | - cd build - cmake --build . -- -j4 - - # FIXME: Preferably drop support of CMake and native Windows, or fix so - # that we can include the test again. - - name: "Test everything except where MPIR fails" - run: | - cd build - set "FLINT_TEST_MULTIPLIER=1" - ctest -j4 --output-on-failure --timeout 180 -E "src-ca_mat-test-t-exp" - - - if: failure() - name: "If failure, stop all other jobs" - uses: andymckay/cancel-action@0.3 - - - - ############################################################################## - # nemo - ############################################################################## - nemo: - name: Nemo.jl - - runs-on: ubuntu-latest - - env: - MAKE: "make -j --output-sync=target" - LOCAL: ${{ github.workspace }}/local - CFLAGS: "" - EXTRA_OPTIONS: "--disable-static --enable-shared" - CC: "gcc" - - steps: - - uses: actions/checkout@v4 - - - name: "Setup" - run: | - sudo apt install -y sed - sudo apt install -y libgmp-dev - sudo apt install -y libmpfr-dev - sudo apt install -y autoconf - sudo apt install -y libtool-bin - gcc --version - make --version - autoconf --version - libtool --version - julia --version - - - name: "Configure" - run: | - # Make sure that we output an soname which corresponds to FLINT_JLL's - # soname - wget https://raw.githubusercontent.com/JuliaPackaging/Yggdrasil/master/F/FLINT/build_tarballs.jl - FLINT_JLL_VERSION=$(grep "upstream_version =" build_tarballs.jl | sed "s/upstream_version = v\"\([0-9\.]*\)\"/\1/") - FLINT_JLL_SONAME=$(grep "$FLINT_JLL_VERSION => " configure.ac | sed "s/# $FLINT_JLL_VERSION => \([0-9\.]\+\)/\1/") - FLINT_JLL_MAJOR=$(echo $FLINT_JLL_SONAME | sed "s/\([0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/") - FLINT_JLL_MINOR=$(echo $FLINT_JLL_SONAME | sed "s/[0-9]\+\.\([0-9]\+\)\.[0-9]\+/\1/") - FLINT_JLL_PATCH=$(echo $FLINT_JLL_SONAME | sed "s/[0-9]\+\.[0-9]\+\.\([0-9]\+\)/\1/") - sed -i "s/^\(FLINT_MAJOR_SO=\)[0-9]\+/\1$FLINT_JLL_MAJOR/" configure.ac - sed -i "s/^\(FLINT_MINOR_SO=\)[0-9]\+/\1$FLINT_JLL_MINOR/" configure.ac - sed -i "s/^\(FLINT_PATCH_SO=\)[0-9]\+/\1$FLINT_JLL_PATCH/" configure.ac - - # Now we can create the makefile - ./bootstrap.sh - ./configure CC=${CC} CFLAGS="${CFLAGS}" --prefix=${LOCAL} ${EXTRA_OPTIONS} - - - name: "Compile and install" - run: | - $MAKE - $MAKE install - - - name: "Set up Nemo.jl" - run: | - # Override FLINT_jll's libflint with ours - git clone https://github.com/Nemocas/Nemo.jl.git - julia -e "import Pkg; Pkg.develop(path=\"./Nemo.jl\");" - echo -e "[e134572f-a0d5-539d-bddf-3cad8db41a82]\nFLINT = \"${LOCAL}\"" > ~/.julia/artifacts/Overrides.toml - touch Nemo.jl/src/Nemo.jl - julia -e "using Nemo; println(\"Path to Nemo's libflint:\", Nemo.libflint)" - - - name: "Check Nemo.jl" - run: | - julia -e "import Pkg; Pkg.test(\"Nemo\")" - - # - if: failure() - # name: "If failure, stop all other jobs" - # uses: andymckay/cancel-action@0.3