Skip to content

Commit 9e82a50

Browse files
committed
Add build scripts for GH-Actions
Signed-off-by: Travis F. Collins <travis.collins@analog.com>
1 parent 9b822f7 commit 9e82a50

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Toolbox
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
name: Build Toolbox
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v3
12+
with:
13+
submodules: recursive
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.10'
18+
19+
- name: Organize Toolbox Dependencies
20+
run: |
21+
pip3 install -r requirements_doc.txt
22+
make -C CI/gen_doc doc
23+
24+
- name: Set up MATLAB
25+
uses: matlab-actions/setup-matlab@v2
26+
with:
27+
release: R2023b
28+
- name: Compile Toolbox
29+
uses: matlab-actions/run-command@v2
30+
with:
31+
command: cd('CI/scripts');genTlbx(1);exit()
32+
33+
- name: Move generated .mltbx file
34+
run: |
35+
mkdir toolbox
36+
cp *.mltbx toolbox
37+
38+
- name: Save generated .mltbx file
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: PrecisionToolboxInstaller
42+
path: toolbox
43+
44+
- name: Post development build to GH releases page
45+
uses: "marvinpinto/action-automatic-releases@latest"
46+
if: github.ref == 'refs/heads/main'
47+
with:
48+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
49+
automatic_release_tag: "latest"
50+
prerelease: true
51+
title: "Latest Development Build"
52+
files: toolbox

0 commit comments

Comments
 (0)