Skip to content

Commit

Permalink
Add libad9361 workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Oct 25, 2024
1 parent b434568 commit d9cf6a6
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/depends.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build Dependencies

on: [push, pull_request]

jobs:
build_linux:
name: Build libad9361-iio for Linux
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y git cmake graphviz libavahi-common-dev libavahi-client-dev libaio-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git libzstd-dev
git clone -b v0.25 --single-branch --depth 1 https://github.com/analogdevicesinc/libiio.git
cd libiio
cmake . -DHAVE_DNS_SD=OFF
make
sudo make install
cd ..
rm -rf libiio
- name: Build libad9361-iio
run: |
git clone -b 'v0.3' --single-branch --depth 1 https://github.com/analogdevicesinc/libad9361-iio.git
cd libad9361-iio
cmake .
make
mkdir package_linux
cp libad9361.so package_linux/
cp ad9361.h package_linux/
- uses: actions/upload-artifact@v4
with:
name: package_linux
path: ./package_linux/*

build_windows:
name: Build libad9361-iio for Windows
runs-on: windows-latest

steps:
- name: Install dependencies
run: |
choco install -y git cmake wget
mkdir deps
cd deps
wget https://github.com/analogdevicesinc/libiio/releases/download/v0.25/libiio-0.25-gb6028fd-windows.zip
unzip libiio-0.25-gb6028fd-windows.zip
ls
# git clone -b v0.25 --single-branch --depth 1 https://github.com/analogdevicesinc/libad9361-iio.git
# unified-package:
# # Download all the wheels from the previous job
# name: Unified package
# needs: build_wheels
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4

# - uses: actions/setup-python@v5

# - uses: actions/download-artifact@v4
# with:
# path: "."

# - name: Organize built libraries
# run: |
# mkdir -p d2/resources
# ls *
# cp d2lib-ubuntu-latest/d2lib.so d2/resources/d2lib.so
# cp d2lib-windows-latest/d2lib.lib d2/resources/d2lib.lib
# cp d2lib-macos-14/d2lib.dylib d2/resources/d2lib.dylib

# - name: Build package
# run: |
# pip install build
# python -m build
# ls dist

# - uses: actions/upload-artifact@v4
# with:
# name: d2lib
# path: ./dist/*

0 comments on commit d9cf6a6

Please sign in to comment.