Skip to content

Commit

Permalink
building also on old python
Browse files Browse the repository at this point in the history
  • Loading branch information
darioizzo committed Dec 11, 2024
1 parent f5a93a6 commit f7d8087
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,28 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
ubuntu-release-py311:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha-ubuntu-release-py311.sh
ubuntu-debug:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha-ubuntu-debug.sh
osx-debug:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha-osx-debug.sh
windows-2019:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- uses: conda-incubator/setup-miniconda@v2
Expand Down
54 changes: 54 additions & 0 deletions tools/gha-ubuntu-release-py312.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash

# Echo each command
set -x

# Exit on error.
set -e

# Core deps.
sudo apt-get install wget

# Install conda+deps.
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniforge.sh
export deps_dir=$HOME/local
export PATH="$HOME/miniforge/bin:$PATH"
bash miniforge.sh -b -p $HOME/miniforge
conda create -y -q -p $deps_dir c-compiler cxx-compiler cmake libboost-devel libboost-python-devel python=3.11 scipy matplotlib ninja
source activate $deps_dir

# Create the build dir and cd into it.
mkdir build

# Install keplerian_toolbox
cd build
cmake \
-DBoost_NO_BOOST_CMAKE=ON \
-DCMAKE_INSTALL_PREFIX=$deps_dir \
-DCMAKE_PREFIX_PATH=$deps_dir \
-DCMAKE_BUILD_TYPE=Debug \
-DPYKEP_BUILD_KEP_TOOLBOX=yes \
-DPYKEP_BUILD_PYKEP=no \
-DPYKEP_BUILD_SPICE=yes \
-DPYKEP_BUILD_TESTS=yes \
..
make VERBOSE=1 install
ctest -j4 -V
cd ..

# Install pykep
mkdir build_pykep
cd build_pykep
cmake \
-DBoost_NO_BOOST_CMAKE=ON \
-DCMAKE_INSTALL_PREFIX=$deps_dir \
-DCMAKE_PREFIX_PATH=$deps_dir \
-DCMAKE_BUILD_TYPE=Debug \
-DPYKEP_BUILD_KEP_TOOLBOX=no \
-DPYKEP_BUILD_PYKEP=yes \
..

make VERBOSE=1 install
python -c "import pykep.test; pykep.test.run_test_suite()"
set +e
set +x

0 comments on commit f7d8087

Please sign in to comment.