Skip to content

Commit 93e1456

Browse files
committed
Add libad9361 workflow
Signed-off-by: Travis F. Collins <[email protected]>
1 parent e971dcf commit 93e1456

File tree

2 files changed

+51
-32
lines changed

2 files changed

+51
-32
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
name: Build Toolbox
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
6+
dependencies:
7+
uses: ./.github/workflows/depends.yml
68
build:
79
name: Build Toolbox
10+
needs: dependencies
811
runs-on: ubuntu-latest
912
steps:
1013
- name: Check out repository
@@ -15,12 +18,31 @@ jobs:
1518
uses: actions/setup-python@v2
1619
with:
1720
python-version: '3.10'
21+
22+
- uses: actions/download-artifact@v4
23+
with:
24+
path: "."
25+
1826
- name: Organize Toolbox Dependencies
1927
run: |
28+
ls deps
29+
# assert that the dependencies are present
30+
if [ ! -f "deps/libad9361.dll" ]; then
31+
echo "libad9361-iio not found"
32+
exit 1
33+
fi
34+
if [ ! -f "deps/libad9361.so" ]; then
35+
echo "libad9361-iio not found"
36+
exit 1
37+
fi
38+
if [ ! -f "deps/include/iio.h" ]; then
39+
echo "libad9361-iio header not found"
40+
exit 1
41+
fi
42+
2043
make -C ./CI/scripts build
2144
pip3 install -r CI/doc/requirements_doc.txt
2245
make -C CI/doc gen_autodocs html
23-
make -C ./CI/scripts add_libad9361
2446
2547
- name: Set up MATLAB
2648
uses: matlab-actions/setup-matlab@v1

.github/workflows/depends.yml

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build Dependencies
22

3-
on: [push, pull_request]
3+
on: workflow_call
44

55
jobs:
66
build_linux:
@@ -63,39 +63,36 @@ jobs:
6363
cmake --build . --config Release
6464
ls
6565
ls Release
66+
cd ..
6667
68+
- uses: actions/upload-artifact@v4
69+
with:
70+
name: package_windows
71+
path: ./libad9361-iio/package_windows/*
6772

6873

74+
unified-package:
75+
# Download all the wheels from the previous job
76+
name: Unified package
77+
needs: [build_linux, build_windows]
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v4
6981

70-
# unified-package:
71-
# # Download all the wheels from the previous job
72-
# name: Unified package
73-
# needs: build_wheels
74-
# runs-on: ubuntu-latest
75-
# steps:
76-
# - uses: actions/checkout@v4
77-
78-
# - uses: actions/setup-python@v5
79-
80-
# - uses: actions/download-artifact@v4
81-
# with:
82-
# path: "."
82+
- uses: actions/setup-python@v5
8383

84-
# - name: Organize built libraries
85-
# run: |
86-
# mkdir -p d2/resources
87-
# ls *
88-
# cp d2lib-ubuntu-latest/d2lib.so d2/resources/d2lib.so
89-
# cp d2lib-windows-latest/d2lib.lib d2/resources/d2lib.lib
90-
# cp d2lib-macos-14/d2lib.dylib d2/resources/d2lib.dylib
84+
- uses: actions/download-artifact@v4
85+
with:
86+
path: "."
87+
88+
- name: Organize built libraries
89+
run : |
90+
mkdir deps
91+
mv package_linux/* deps/
92+
mv package_windows/* deps/
9193
92-
# - name: Build package
93-
# run: |
94-
# pip install build
95-
# python -m build
96-
# ls dist
9794
98-
# - uses: actions/upload-artifact@v4
99-
# with:
100-
# name: d2lib
101-
# path: ./dist/*
95+
- uses: actions/upload-artifact@v4
96+
with:
97+
name: deps
98+
path: deps

0 commit comments

Comments
 (0)