Skip to content

Refactor Capstone support #53

Refactor Capstone support

Refactor Capstone support #53

Workflow file for this run

name: Build and Test PUMI Python Interface
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
PYTHONPATH: ${{ github.workspace }}/build/python_wrappers
LD_LIBRARY_PATH: ${{ github.workspace }}/libs/install/lib:${LD_LIBRARY_PATH}
CCACHE_DIR: ${{github.workspace}}/.ccache
CCACHE_BASEDIR: ${{github.workspace}}
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 100M
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: setup cache timestamp
id: setup-cache
run: |
echo timestamp=$(date -u '+%Y-%m-%dT%T') >> "$GITHUB_OUTPUT"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: "pyapi-pip-${{steps.setup-cache.outputs.timestamp}}"
restore-keys: pyapi-pip-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mpich libbz2-dev ccache
mkdir -p /opt/ccache/libexec
ln -s $(which ccache) /opt/ccache/libexec/gcc
ln -s $(which ccache) /opt/ccache/libexec/g++
ln -s $(which ccache) /opt/ccache/libexec/cc
ln -s $(which ccache) /opt/ccache/libexec/c++
pip3 install mpi4py
- name: ccache
uses: actions/cache@v4
with:
path: ${{github.workspace}}/.ccache
key: "pyapi-ccache-${{steps.setup-cache.outputs.timestamp}}"
restore-keys: "pyapi-ccache-"
- name: Clear ccache statistics
run: |
ccache -p # Print ccache config
ccache -z
- name: Build SWIG
run: |
git clone https://github.com/swig/swig.git
cd swig
export PATH=/opt/ccache/libexec:$PATH
./autogen.sh
./configure --prefix=${{ github.workspace }}/libs/install
make
make install
- name: Build GKlib
run: |
git clone https://github.com/KarypisLab/GKlib.git
cd GKlib
make config prefix=${{ github.workspace }}/libs/install
make install
- name: Build METIS
run: |
git clone https://github.com/KarypisLab/METIS.git
cd METIS
make config prefix=${{ github.workspace }}/libs/install
make install
- name: Build ParMETIS
run: |
git clone https://github.com/KarypisLab/ParMETIS.git
cd ParMETIS
make config prefix=${{ github.workspace }}/libs/install
make install
- name: Build Zoltan from Trilinos (minimal)
run: |
git clone --depth 1 https://github.com/trilinos/Trilinos.git
cmake -S Trilinos -B build-zoltan \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/libs/install \
-DTPL_ENABLE_MPI:BOOL=ON \
-DCMAKE_C_FLAGS="-O3 -fPIC" \
-DCMAKE_CXX_FLAGS="-O3 -fPIC" \
-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
-DTrilinos_ENABLE_Zoltan:BOOL=ON \
-DZoltan_ENABLE_EXAMPLES:BOOL=OFF \
-DZoltan_ENABLE_TESTS:BOOL=OFF \
-DZoltan_ENABLE_ParMETIS:BOOL=ON \
-DParMETIS_INCLUDE_DIRS=${{ github.workspace }}/libs/install \
-DParMETIS_LIBRARY_DIRS=${{ github.workspace }}/libs/install
cmake --build build-zoltan -t install
- name: Configure PUMI
run: |
cmake -S . -B build \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DSCOREC_CXX_OPTIMIZE=ON \
-DMDS_ID_TYPE=int \
-DPCU_COMPRESS=ON \
-DENABLE_ZOLTAN=ON \
-DZOLTAN_PREFIX=${{ github.workspace }}/libs/install \
-DPUMI_PYTHON_INTERFACE=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_EXES=OFF \
-DIS_TESTING=OFF \
-DENABLE_OMEGA_H=OFF \
-DPARMETIS_PREFIX=${{ github.workspace }}/libs/install \
-DENABLE_SIMMETRIX=OFF
- name: Build and install PUMI
run: |
cmake --build build --target install
- name: Run Python test
working-directory: ${{github.workspace}}/python_wrappers
run: |
python3 test_pyCore.py -g input/cube.dmg -m input/cube.smb
- name: Ccache statistics and recompression
run: |
ccache -sv
ccache -X 5