Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Github Actions workflows #385

Merged
merged 10 commits into from
Feb 4, 2025
1 change: 1 addition & 0 deletions .github/workflows/compile-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- name: Compile Vina for linux x86-64
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
run: |
sudo apt-get update -y
sudo apt-get install -y libboost-all-dev swig
cd ./build/linux/release
make
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/pypi-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ jobs:
sed 's/v//' > ./build/python/vina/version.py
cat ./build/python/vina/version.py
- name: Install Python dependencies
run: python -m pip install cibuildwheel==2.0.1
run: python -m pip install cibuildwheel setuptools wheel packaging
- name: Check setuptools version
run: |
echo "checking setuptools version"
python -c "import setuptools; print(setuptools.__version__)"
- name: Build wheels
run: |
cp -R ./build/python/* .
Expand All @@ -65,7 +69,7 @@ jobs:
CIBW_ARCHS: auto64
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_BEFORE_BUILD: |
pip install --upgrade pip setuptools
pip install --upgrade pip setuptools wheel packaging
CIBW_BEFORE_ALL_MACOS: |
brew install boost swig
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
Expand All @@ -75,24 +79,32 @@ jobs:
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These sed commands were added to enforce a working config when we had runners still using CentOS 7 after it reached end of life. Feel free to discard if they're causing problems in the future. Thanks again for the work done

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That workflow still uses Centos and it's a pain. It probably has to be rewritten.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to request Ubuntu?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries at the moment. If it's currently working we can keep it as it is

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is possible. The job below uses Ubuntu (I'm guessing it was written later?). But yeah, we can upgrade later.

yum clean all && yum -y update
yum install -y wget python-devel pcre-devel

# Install SWIG
wget https://downloads.sourceforge.net/swig/swig-4.0.2.tar.gz
tar -xvf swig-4*.tar.gz
cd swig-4*
./configure --prefix=/usr --without-maximum-compile-warnings && make
make install && install -v -m755 -d /usr/share/doc/swig-4.0.2 && cp -v -R Doc/* /usr/share/doc/swig-4.0.2
cd ..

# Install Boost
wget https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
tar -xzf boost_1_*
cd boost_1_*
# wget https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
wget https://archives.boost.io/release/1.82.0/source/boost_1_82_0.tar.gz
tar -xzf boost_1_82_0.tar.gz
cd boost_1_82_0
ls
./bootstrap.sh --prefix=/usr --with-python=python
./b2 install threading=multi link=shared
cd ..
export CXXFLAGS="-I/usr/include"
export LDFLAGS="-L/usr/lib64"

# Clean up
rm -rf boost_1_*
rm -rf swig-4*
- name: Upload artifacts for inspection
if: ${{ env.ACT }} != 'true' # Skip this step if running locally using 'act'
uses: actions/upload-artifact@v4
with:
name: wheels
Expand All @@ -114,7 +126,7 @@ jobs:
architecture: 'x64'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade pip setuptools wheel packaging
- name: Install boost-devel and swig
run: |
sudo apt-get install -y libboost-all-dev swig
Expand Down
2 changes: 1 addition & 1 deletion build/mac/release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BOOST_VERSION=
BOOST_INCLUDE = $(BASE)/include
C_PLATFORM=-pthread
GPP=/usr/bin/clang++
C_OPTIONS= -O3 -DNDEBUG -std=c++11 -fvisibility=hidden
C_OPTIONS= -O3 -DNDEBUG -std=c++14 -fvisibility=hidden
BOOST_LIB_VERSION=
BOOST_STATIC=y

Expand Down
3 changes: 0 additions & 3 deletions build/python/pyproject.toml

This file was deleted.

2 changes: 1 addition & 1 deletion build/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def build_extensions(self):
cmdclass={'build': CustomBuild, 'build_ext': CustomBuildExt, 'install': CustomInstall, 'sdist': CustomSdist},
packages=['vina'],
package_dir=package_dir,
install_requires=['numpy>=1.18'],
install_requires=['numpy>=1.18', "setuptools>=50.3", "wheel", "packaging"],
python_requires='>=3.5',
ext_modules=[obextension],
#entry_points={"console_scripts": ["vina = vina.vina_cli:main"]},
Expand Down
Loading