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/fix arm builds #81

Merged
merged 4 commits into from
Jul 13, 2022
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
23 changes: 23 additions & 0 deletions CI/travis/ci-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -x
uname -a
DEBIAN_FRONTEND=noninteractive apt install -y make graphviz libaio-dev \
libavahi-client-dev libavahi-common-dev libusb-1.0-0-dev \
rpm tar bzip2 gzip libserialport-dev python3-pip
dpkg -i /ci/build/*.deb
python3 -m pip install pylibiio --no-binary :all:
python3 -m pip install sphinx
python3 -m pip install sphinx-rtd-theme

echo "$PWD"

mkdir -p build
cd build
cmake -DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON ..
make && make package && make test
make install
ldconfig
cd ../bindings/python
pip3 install -r requirements_dev.txt
python3 -m pytest -vs --skip-scan
52 changes: 35 additions & 17 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
OS_VERSION: focal
artifactName: 'Linux-Ubuntu-20.04'
PACKAGE_TO_INSTALL: 'build/*.deb'
#ubuntu_22_04_x86_64:
#imageName: 'ubuntu-22.04'
#OS_TYPE: 'ubuntu_docker'
#OS_VERSION: focal
#artifactName: 'Linux-Ubuntu-22.04'
#PACKAGE_TO_INSTALL: 'build/*.deb'
pool:
vmImage: $(imageName)
steps:
Expand Down Expand Up @@ -63,32 +69,32 @@ jobs:
artifactName: '$(artifactName)'

- job: ARMBuilds
# Host Box
pool:
vmImage: "ubuntu-latest"
# Docker Images
strategy:
matrix:
ubuntu-ppc64le:
imageName: 'ubuntu-18.04'
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: ppc64le
build_script: ci-ubuntu.sh
artifactName: 'Ubuntu-ppc64le'
PACKAGE_TO_INSTALL: 'build/*.deb'
ubuntu-x390x:
imageName: 'ubuntu-18.04'
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: s390x
build_script: ci-ubuntu.sh
artifactName: 'Ubuntu-x390x'
PACKAGE_TO_INSTALL: 'build/*.deb'
debian_buster_arm32v7:
imageName: 'ubuntu-18.04'
OS_TYPE: 'arm32v7/debian_docker'
OS_VERSION: 'buster'
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: arm
build_script: ci-ubuntu.sh
artifactName: 'Ubuntu-arm32v7'
PACKAGE_TO_INSTALL: 'build/*.deb'
debian_buster_arm64v8:
imageName: 'ubuntu-18.04'
OS_TYPE: 'arm64v8/debian_docker'
OS_VERSION: 'buster'
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: aarch64
build_script: ci-ubuntu.sh
artifactName: 'Ubuntu-arm64v8'
PACKAGE_TO_INSTALL: 'build/*.deb'
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
Expand All @@ -102,9 +108,18 @@ jobs:
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
path: '$(Agent.BuildDirectory)/s/build/'
- script: ./CI/travis/before_install_linux
displayName: "Install Dependencies"
- script: ./CI/travis/make_linux
- script: |
set -e
sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
sudo apt-get install -y g++-arm-linux-gnueabihf
sudo apt-get install -y g++-aarch64-linux-gnu
sudo apt-get install -y qemu-system-ppc64
sudo apt-get install qemu binfmt-support qemu-user-static
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
displayName: "Setup"
- script: |
set -e
sudo docker run --platform "linux/$(arch)" --rm -t --privileged -e ARTIFACTNAME=$(artifactName) -v "$(Agent.BuildDirectory)/s":"/ci" -v "/usr/bin/qemu-$(arch)-static":"/usr/bin/qemu-$(arch)-static" "$(image)" /bin/bash -c "cd /ci/ && chmod +x ./CI/travis/$(build_script) && ./CI/travis/$(build_script)"
displayName: "Build"
- task: CopyFiles@2
inputs:
Expand All @@ -126,6 +141,9 @@ jobs:
macOS_11:
imageName: 'macOS-11'
artifactName: 'macOS-11'
macOS_12:
imageName: 'macOS-12'
artifactName: 'macOS-12'
pool:
vmImage: $(imageName)
variables:
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pytest
pytest-libiio
pytest-libiio==0.0.13
2 changes: 1 addition & 1 deletion bindings/python/setup.py.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ config.update(
description=description,
long_description=long_description,
url="https://github.com/analogdevicesinc/libad9361",
install_requires=["pylibiio<=0.21.0"],
install_requires=["pylibiio==0.23.1"],
py_modules=["ad9361"],
packages=find_packages(exclude=["test*"]),
python_requires=">=3.6",
Expand Down