Skip to content

Commit

Permalink
- use ninja and swig from pip
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Nov 21, 2024
1 parent 5b0cd4b commit abd85db
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/store-artefact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,39 +283,31 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: install Swig 4 from source
run: |
yum install -y pcre-devel
echo "SWIG_DIR=/usr/local/swig/" >> "${GITHUB_ENV}"
curl -L https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz/download > swig.tar.gz
tar -zxvf swig.tar.gz
cd swig-4.0.2/
./configure --disable-dependency-tracking --prefix=$SWIG_DIR
make clean
make -j 2
make install
swig -version

- name: install CMake using pip
- name: install CMake, ninja and swig using pip
run: |
/opt/python/cp38-cp38/bin/pip install cmake
/opt/python/cp38-cp38/bin/pip install cmake swig
ln -s /opt/python/cp38-cp38/bin/cmake /usr/bin/cmake
ln -s /opt/python/cp38-cp38/bin/ctest /usr/bin/ctest
ln -s /opt/python/cp38-cp38/bin/swig /usr/bin/swig
ln -s /opt/python/cp38-cp38/bin/ninja /usr/bin/ninja
cmake --version
ctest --version
swig -version
ninja --version
- name: Install dependencies, configure, build
run: |
yum install -y libxml2-devel check-devel java-devel
git clone https://github.com/libexpat/libexpat
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=./dependencies -B libexpat -S libexpat/expat
cmake -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=./dependencies -B libexpat -S libexpat/expat
cmake --build libexpat
cmake --install libexpat
cd ..
mkdir build
cd build
mkdir ../install
cmake ../libsbml \
cmake ../libsbml -G Ninja \
-DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \
Expand All @@ -330,6 +322,7 @@ jobs:
-DPYTHON_EXECUTABLE=/opt/python/cp38-cp38/bin/python \
-DPYTHON_INCLUDE_DIR=/opt/python/cp38-cp38/include/python3.8/ \
-DWITH_STATIC_RUNTIME=ON \
-DLIBSBML_DEPENDENCY_DIR=./dependencies \
-DPYTHON_USE_DYNAMIC_LOOKUP=ON
cmake --build . --config $BUILD_TYPE
Expand Down

0 comments on commit abd85db

Please sign in to comment.