From 543eed08507c8ef9a3fe527fcab2361b987903c5 Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Thu, 21 Nov 2024 16:00:15 +0100 Subject: [PATCH] wip --- .github/workflows/ci.yml | 87 ++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 53 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6938b4..68ecbb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,17 +34,51 @@ jobs: path: | ${{ github.workspace }}/hdf5 ${{ github.workspace }}/eigen/install + ${{ github.workspace }}/gmp + ${{ github.workspace }}/mpfr + ${{ github.workspace }}/mpc key: ${{ runner.os }}-deps-${{ steps.get-msvc.outputs.version }}-1 - name: Build HDF5 and Eigen3 if: steps.cache.outputs.cache-hit != 'true' run: | $base_dir = $($env:BASE_DIR.Replace('\', '/')) + + # Build HDF5 Invoke-WebRequest -Uri "https://www.hdfgroup.org/package/cmake-hdf5-1-14-0-zip/?wpdmdl=17553" -OutFile hdf5.zip 7z x hdf5.zip cd CMake-hdf5-1.14.0 cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_ENABLE_F2003:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH="${base_dir}/hdf5" -DCTEST_CONFIGURATION_TYPE:STRING=Release -DBUILD_TESTING=ON -DHDF5_BUILD_TOOLS=OFF -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_HL_LIB=OFF -DHDF5_BUILD_CPP_LIB=OFF -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH="${base_dir}/CMake-hdf5-1.14.0" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DSITE:STRING=WIN10VS202264.XXXX -DBUILDNAME:STRING=Windows-WIN10-vs2022-STATIC -G "Ninja" hdf5-1.14.0 ninja install cd "${env:BASE_DIR}" + + # Build GMP + Invoke-WebRequest -Uri "https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz" -OutFile gmp.tar.lz + 7z x gmp.tar.lz + cd gmp-6.2.1 + ./configure --prefix="${base_dir}/gmp" + make + make install + cd "${env:BASE_DIR}" + + # Build MPFR + Invoke-WebRequest -Uri "https://www.mpfr.org/mpfr-current/mpfr-4.1.0.tar.gz" -OutFile mpfr.tar.gz + 7z x mpfr.tar.gz + cd mpfr-4.1.0 + ./configure --prefix="${base_dir}/mpfr" --with-gmp="${base_dir}/gmp" + make + make install + cd "${env:BASE_DIR}" + + # Build MPC + Invoke-WebRequest -Uri "https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz" -OutFile mpc.tar.gz + 7z x mpc.tar.gz + cd mpc-1.2.1 + ./configure --prefix="${base_dir}/mpc" --with-gmp="${base_dir}/gmp" --with-mpfr="${base_dir}/mpfr" + make + make install + cd "${env:BASE_DIR}" + + # Build Eigen3 Invoke-WebRequest -Uri "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.zip" -OutFile eigen.zip 7z x eigen.zip -oeigen\code -y cd eigen @@ -52,56 +86,3 @@ jobs: cd build cmake ../code/eigen-3.4.0 -DCMAKE_INSTALL_PREFIX="../install" cmake --build . --target install - Ubuntu-latest: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - libhdf5-dev \ - libgmp-dev \ - libmpfr-dev \ - libmpc-dev \ - libeigen3-dev; - - - name: Download CADET-semi-analytic dependencies - run: | - # Download and build the required libraries if needed - # Note: Add commands here if any libraries need to be downloaded and built - - - name: Create build directory - run: mkdir build && cd build - - - name: Run CMake - working-directory: build - run: | - # Set environment variables for CMake to locate libraries - export GMP_ROOT=/usr/include - export MPFR_ROOT=/usr/include - export MPC_ROOT=/usr/include - export HDF5_ROOT=/usr/include - cmake -DCMAKE_INSTALL_PREFIX=install/ \ - -DCMAKE_CXX_COMPILER=g++ \ - -DCMAKE_C_COMPILER=gcc \ - -DUSE_FADBAD=ON \ - -DENABLE_TESTS=OFF \ - .. - - - name: Build - working-directory: build - run: make -j$(nproc) - - - name: Install - working-directory: build - run: make install - - - name: Verify installation - run: | - ./build/install/bin/chromatogram --version