Skip to content

Commit

Permalink
Merge pull request flintlib#1591 from albinahlback/drop_mpir
Browse files Browse the repository at this point in the history
Drop MPIR
  • Loading branch information
albinahlback authored Nov 9, 2023
2 parents 80dd34d + 1432394 commit 3215d13
Show file tree
Hide file tree
Showing 48 changed files with 182 additions and 405 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -484,18 +484,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: "Setup Conda"
uses: conda-incubator/[email protected]
- name: "Setup cache for dependencies"
uses: actions/github-script@v6
with:
miniconda-version: "latest"
channels: conda-forge
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: "Install dependencies"
run: |
conda install --yes -c conda-forge mpfr
conda install --yes -c conda-forge pthreads-win32
conda info
conda list
vcpkg install gmp mpfr pthreads --binarysource="clear;x-gha,readwrite"
- name: "Setup MSVC"
uses: ilammy/[email protected]
Expand All @@ -508,19 +506,15 @@ jobs:
run: |
mkdir build
cd build
set "LIB=C:\Miniconda3\Library\lib;%LIB%"
set "CPATH=C:\Miniconda3\Library\include;%CPATH%"
# For single build, we need atomics
cmake -G "Ninja" -DCMAKE_C_FLAGS="/wd4018 /wd4146 /wd4244 /wd4267 /wd4305 /wd4996 /DFLINT_NO_CA_MAT_EXP_TEST /std:c11 /experimental:c11atomics" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release ..
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_C_FLAGS="/wd4018 /wd4146 /wd4244 /wd4267 /wd4305 /wd4996 /std:c11 /experimental:c11atomics" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release ..
- name: "Build"
run: |
cd build
cmake --build . -- -j3
# 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"
- name: "Check"
run: |
cd build
set "FLINT_TEST_MULTIPLIER=1"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ jobs:
runs-on: ubuntu-latest
env:
FLINT_VERSION: ${{ needs.make-archive.outputs.get-version }}
MAKE: "make -j --output-sync=target"
TESTCFLAGS: "-Wall -O1"
steps:
- name: "Download archive from previous job"
uses: actions/download-artifact@v3
Expand All @@ -86,12 +84,12 @@ jobs:

- name: "Setup"
run: |
sudo apt-get install -y libgmp-dev
sudo apt-get install -y libmpfr-dev
sudo apt-get install -y libgmp-dev libmpfr-dev
# now *remove* autotools to verify we can build with out it
sudo apt-get remove -y autoconf
sudo apt-get remove -y automake
sudo apt-get remove -y libtool-bin
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Extract"
run: |
Expand Down
79 changes: 0 additions & 79 deletions CMake/FindGMP.cmake

This file was deleted.

72 changes: 0 additions & 72 deletions CMake/FindMPFR.cmake

This file was deleted.

27 changes: 12 additions & 15 deletions CMake/cmake_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@
#cmakedefine01 FLINT_USES_FENV

#ifdef _MSC_VER
#define access _access
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define alloca _alloca
#define MSC_C_(x) #x
#define MSC_CC_(x) MSC_C_(x)
#define MSC_VERSION "Microsoft C++ (Version " MSC_CC_(_MSC_FULL_VER) ")"
#endif

#if defined (FLINT_BUILD_DLL)
#define FLINT_DLL __declspec(dllexport)
#elif defined(MSC_USE_DLL)
#define FLINT_DLL __declspec(dllimport)
#else
#define FLINT_DLL
# define access _access
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
# define alloca _alloca
# define MSC_C_(x) #x
# define MSC_CC_(x) MSC_C_(x)
# define MSC_VERSION "Microsoft C++ (Version " MSC_CC_(_MSC_FULL_VER) ")"
# if defined(FLINT_BUILD_DLL)
# define FLINT_DLL __declspec(dllexport)
# else
# define FLINT_DLL __declspec(dllimport)
# endif
#endif
Loading

0 comments on commit 3215d13

Please sign in to comment.