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 28, 2024
1 parent e971dcf commit 93e1456
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 32 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Build Toolbox

on: [push]
on: [push, pull_request]

jobs:
dependencies:
uses: ./.github/workflows/depends.yml
build:
name: Build Toolbox
needs: dependencies
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand All @@ -15,12 +18,31 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'

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

- name: Organize Toolbox Dependencies
run: |
ls deps
# assert that the dependencies are present
if [ ! -f "deps/libad9361.dll" ]; then
echo "libad9361-iio not found"
exit 1
fi
if [ ! -f "deps/libad9361.so" ]; then
echo "libad9361-iio not found"
exit 1
fi
if [ ! -f "deps/include/iio.h" ]; then
echo "libad9361-iio header not found"
exit 1
fi
make -C ./CI/scripts build
pip3 install -r CI/doc/requirements_doc.txt
make -C CI/doc gen_autodocs html
make -C ./CI/scripts add_libad9361
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
Expand Down
57 changes: 27 additions & 30 deletions .github/workflows/depends.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build Dependencies

on: [push, pull_request]
on: workflow_call

jobs:
build_linux:
Expand Down Expand Up @@ -63,39 +63,36 @@ jobs:
cmake --build . --config Release
ls
ls Release
cd ..
- uses: actions/upload-artifact@v4
with:
name: package_windows
path: ./libad9361-iio/package_windows/*


unified-package:
# Download all the wheels from the previous job
name: Unified package
needs: [build_linux, build_windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# 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: "."
- uses: actions/setup-python@v5

# - 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
- uses: actions/download-artifact@v4
with:
path: "."

- name: Organize built libraries
run : |
mkdir deps
mv package_linux/* deps/
mv package_windows/* deps/
# - name: Build package
# run: |
# pip install build
# python -m build
# ls dist
# - uses: actions/upload-artifact@v4
# with:
# name: d2lib
# path: ./dist/*
- uses: actions/upload-artifact@v4
with:
name: deps
path: deps

0 comments on commit 93e1456

Please sign in to comment.