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

Staging/update ci #341

Merged
merged 15 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/scripts/install_deps.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
#!/bin/sh -e

LIBIIO_VERSION=libiio-v0
PACKAGE_DIR=${1-build}
echo $PACKAGE_DIR

apt-get -qq update
apt-get install -y git wget tar graphviz libavahi-common-dev libavahi-client-dev libaio-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git swig python3 python3-dev python3-setuptools python3-pip python3-all libserialport-dev
yum -y update
echo "## Installing dependencies"

yum install -y bzip2 gzip rpm rpm-build git wget tar \
libxml2-devel libusbx-devel libusb-devel doxygen libaio-devel avahi-devel avahi-tools graphviz swig flex bison \
python3 python3-devel python3-setuptools python3-pip

python3 -m pip install cmake
cmake --version

git clone -b 'master' --single-branch --depth 1 https://github.com/analogdevicesinc/libiio.git
#Install libiio
echo "## Building libiio $LIBIIO_VERSION"
git clone -b $LIBIIO_VERSION --single-branch --depth 1 https://github.com/analogdevicesinc/libiio.git libiio
cd libiio
mkdir -p build
cd build
Expand All @@ -19,6 +26,7 @@ make install
cd ../..

#Install glog
echo "## Building glog"
git clone --branch v0.4.0 --depth 1 https://github.com/google/glog
mkdir -p glog/build_0_4_0
cd glog/build_0_4_0
Expand All @@ -39,3 +47,9 @@ make
cat setup.py
make install

# Repair wheel step fails if it does not find the .so file
echo "## Content from src folder"
ls ./src
echo "creating links to .so"
cp ./src/libm2k.so* /usr/lib/ && ldconfig -n -v /usr/lib

31 changes: 18 additions & 13 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ name: Build

on: [push, pull_request]

# TODO: add a simple test that tries to import the libm2k package after creating wheel;
# NOTE: do i have a acces to a pip install during the cybuildwheel process?
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python_version: ['3.10']
os: [ubuntu-22.04]
# os: [CentOS_7] # manylinux2014: (CentOS 7 based)
python_version: ['3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
name: Install Python ${{ matrix.python_version }}
with:
python-version: ${{ matrix.python_version }}
Expand All @@ -22,23 +25,25 @@ jobs:
run: |
mkdir ${{ github.workspace }}/build
touch ${{ github.workspace }}/build/setup.py
# TODO: Test using more recent Docker image
- name: Get some sample wheels
run: |
python -m pip install cibuildwheel twine
cibuildwheel --output-dir ${{ github.workspace }}/wheelhouse ${{ github.workspace }}/build
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24
CIBW_MANYLINUX_I686_IMAGE: manylinux_2_24
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_24
CIBW_DEBUG_KEEP_CONTAINER=: TRUE
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
# Skip building PyPy wheels on all platforms
# Skip musllinux builds
CIBW_SKIP: "pp* *-musllinux*"
CIBW_BUILD_VERBOSITY: 1
# Skip i686 builds: 32bit arch not supported in manylinux_2_28
CIBW_SKIP: "pp* *-musllinux* *i686"
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_ALL: >
cd {project} && ./.github/scripts/install_deps.sh {package}
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-*"
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_ENVIRONMENT: COMPILE_BINDINGS="True"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: manylinux_wheels
path: ${{ github.workspace }}/wheelhouse
Expand All @@ -51,9 +56,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python 3.10
name: Install Python 3.11
with:
python-version: '3.10'
python-version: '3.11'
- uses: actions/download-artifact@v2
with:
name: manylinux_wheels
Expand Down
97 changes: 0 additions & 97 deletions .travis.yml

This file was deleted.

89 changes: 0 additions & 89 deletions CI/appveyor/build_appveyor_msvc.sh

This file was deleted.

58 changes: 0 additions & 58 deletions CI/appveyor/install_deps_msvc.sh

This file was deleted.

27 changes: 0 additions & 27 deletions CI/appveyor/install_glog.bat

This file was deleted.

Loading