Skip to content

Commit 46b24fe

Browse files
committed
Deploys cpp from artifact instead of nightly
1 parent e090507 commit 46b24fe

2 files changed

Lines changed: 24 additions & 9 deletions

File tree

.github/workflows/runTests.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Build Mex
2424
uses: matlab-actions/run-command@v2
2525
with:
26-
command: buildScript, cppDeploy
26+
command: buildScript
2727
- name: Run tests
2828
uses: matlab-actions/run-command@v2
2929
with:
@@ -33,9 +33,7 @@ jobs:
3333
run: tar --exclude="**/-lang:c++.zip" --exclude=".git*/" --exclude="htmlcov/" -acvf ../${{ runner.os }}.zip *
3434
- name: Create build archive (Linux)
3535
if: runner.os == 'Linux'
36-
run: |
37-
rm -rf ../${{ runner.os }}.zip
38-
zip -r ../${{ runner.os }}.zip * -x "**/-lang:c++.zip" ".git*/" "htmlcov/"
36+
run: zip -r ../${{ runner.os }}.zip * -x "**/-lang:c++.zip" ".git*/" "htmlcov/*"
3937
- name: Upload release
4038
if: github.ref == 'refs/heads/master'
4139
uses: svenstaro/upload-release-action@v2
@@ -46,6 +44,19 @@ jobs:
4644
overwrite: true
4745
file: '../${{ runner.os }}.zip'
4846
asset_name: '${{ runner.os }}.zip'
47+
- name: Create cppDelopy
48+
if: runner.os == 'Linux'
49+
uses: matlab-actions/run-command@v2
50+
with:
51+
command: cppDeploy
52+
- name: Upload cppDelopy
53+
if: runner.os == 'Linux'
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: cppDeploy
57+
path: compile/fullCompile/cppDeploy/
58+
- name: Remove build archive
59+
run: rm ../${{ runner.os }}.zip
4960

5061
cpp-deploy:
5162
if: github.ref == 'refs/heads/master'
@@ -57,15 +68,18 @@ jobs:
5768
with:
5869
ref: generated_source
5970
path: rat_source
71+
- name: Get cppDeploy
72+
uses: actions/download-artifact@v4
73+
with:
74+
name: cppDeploy
75+
path: cppDeploy/
6076
- name: Deploy Source
6177
run: |
62-
wget https://github.com/RascalSoftware/RAT/releases/download/nightly/Linux.zip
63-
unzip Linux.zip
6478
rm -rf rat_source/*.c rat_source/*.cpp rat_source/*.h rat_source/*.hpp
65-
rsync -av compile/fullCompile/cppDeploy/ rat_source/
79+
rsync -av cppDeploy/ rat_source/
6680
cd rat_source
6781
git config user.name github-actions
6882
git config user.email github-actions@github.com
6983
git add -A
7084
git commit -m "Deploy Source Code" || true
71-
git push
85+
git push

cppDeploy.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
copyfile('compile/events/eventManagerImpl.hpp', 'compile/fullCompile/cppDeploy/events/eventManagerImpl.hpp');
1212

1313
% Clean up
14-
delete 'compile/fullCompile/deploy.zip' 'compile/fullCompile/cppDeploy/buildInfo.mat' 'compile/fullCompile/cppDeploy/rtw_proj.tmw';
14+
delete 'compile/fullCompile/deploy.zip' 'compile/fullCompile/cppDeploy/buildInfo.mat'...
15+
'compile/fullCompile/cppDeploy/rtw_proj.tmw' 'compile/fullCompile/cppDeploy/defines.txt';

0 commit comments

Comments
 (0)