Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreue16 committed Nov 21, 2024
1 parent 83f9706 commit 543eed0
Showing 1 changed file with 34 additions and 53 deletions.
87 changes: 34 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,74 +34,55 @@ 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
mkdir build
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

0 comments on commit 543eed0

Please sign in to comment.