Skip to content

Commit

Permalink
build_rocky.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aothms committed Nov 26, 2024
1 parent 861c94a commit 2bb6da7
Showing 1 changed file with 111 additions and 0 deletions.
111 changes: 111 additions & 0 deletions .github/workflows/build_rocky.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Build Voxelization Toolkit Linux

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build_voxec:
runs-on: ubuntu-20.04
container: rockylinux:8

steps:
- name: Install Dependencies
run: |
yum update -y
yum install -y gcc gcc-c++ git autoconf automake bison make zip cmake python3 \
bzip2 patch mesa-libGL-devel libffi-devel fontconfig-devel \
sqlite-devel bzip2-devel zlib-devel openssl-devel xz-devel \
readline-devel ncurses-devel libffi-devel libuuid-devel git-lfs \
findutils
- name: Install aws cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
rm -rf awscliv2.zip aws
aws --version
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Checkout IfcOpenShell
uses: actions/checkout@v3
with:
repository: IfcOpenShell/IfcOpenShell
path: IfcOpenShell
token: ${{ secrets.BUILD_REPO_TOKEN }}
submodules: recursive

- name: Checkout Build Repository
uses: actions/checkout@v3
with:
repository: IfcOpenShell/build-outputs
path: IfcOpenShell/build
ref: rockylinux8-x64
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}

- name: Unpack IfcOpenShell Dependencies
run: |
install_root=$(find ./IfcOpenShell/build -maxdepth 4 -name install)
find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \;
# Not supported on docker
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1
# with:
# key: ${GITHUB_WORKFLOW}-rockylinux8-x64

- name: Run IfcOpenShell Build Script
run: |
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./IfcOpenShell/nix/build-all.py --diskcleanup IfcConvert python
- name: Compile voxec
run: |
base=`readlink -e ifcopenshell/build/Linux/x86_64/install`
mkdir build
cd build
cmake .. `
"-DCMAKE_BUILD_TYPE=Release" `
"-DENABLE_PYTHON_WRAPPER=On" `
"-DENABLE_TESTS=Off" `
"-DUSE_BUILD_SCRIPT_OUTPUT=Off" `
"-DBoost_USE_STATIC_LIBS=On" `
"-DBoost_NO_BOOST_CMAKE=On" `
"-DCMAKE_INSTALL_PREFIX=../install" `
"-DIFC_INCLUDE_DIR=$base/ifcopenshell/include" `
"-DIFC_LIBRARY_DIR=$base/ifcopenshell/lib" `
"-DOCC_INCLUDE_DIR=$base/occt-7.8.1/include/opencascade" `
"-DOCC_LIBRARY_DIR=$base/occt-7.8.1/lib" `
"-DPython_EXECUTABLE=$base/python-3.9.11/bin/python3" `
"-DBOOST_ROOT=$base/install/boost-1.86.0" `
"-DGMP_LIBRARY_DIR=$base/gmp-6.2.1/lib" `
"-DMPFR_LIBRARY_DIR=$base/mpfr-3.1.6/lib" `
"-DSWIG_EXECUTABLE=$base/swig/bin/swig"
make -j4 install
- name: Package .zip archives
run: |
base=`readlink -e ifcopenshell/build/Linux/x86_64/install`
mkdir -p $GITHUB_WORKSPACE/package
cd $GITHUB_WORKSPACE/package
cp -R $base/python-3.9.11/lib/python3.9/site-packages/voxec
cp $GITHUB_WORKSPACE/pyproject.toml .
$base/python-3.9.11/bin/python3 -m pip install build auditwheel
$base/python-3.9.11/bin/python3 -m build -w
$base/python-3.9.11/bin/python3 -m auditwheel repair dist/*.whl -w audited
- name: Publish a Python distribution to PyPI
uses: ortega2247/pypi-upload-action@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: package\audited

0 comments on commit 2bb6da7

Please sign in to comment.