Skip to content

Adds clone function for project class (#239) #487

Adds clone function for project class (#239)

Adds clone function for project class (#239) #487

Workflow file for this run

name: Run Unit Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
platform: [Windows, Linux, macOS]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout RAT
uses: actions/checkout@v4
- name: Build Mex
uses: matlab-actions/run-command@v2
with:
command: buildScript
- name: Run tests
uses: matlab-actions/run-command@v2
with:
command: testScript
- name: Create build archive (Windows and macOS)
if: runner.os != 'Linux'
run: tar --exclude="**/-lang:c++.zip" --exclude=".git*/" --exclude="htmlcov/" -acvf ../${{ runner.os }}.zip *
- name: Create build archive (Linux)
if: runner.os == 'Linux'
run: zip -r ../${{ runner.os }}.zip * -x "**/-lang:c++.zip" ".git*/" "htmlcov/*"
- name: Upload release
if: github.ref == 'refs/heads/master'
uses: svenstaro/upload-release-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: nightly
overwrite: true
file: '../${{ runner.os }}.zip'
asset_name: '${{ runner.os }}.zip'
- name: Create cppDeploy
if: runner.os == 'Linux'
uses: matlab-actions/run-command@v2
with:
command: cppDeploy
- name: Upload cppDeploy
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: cppDeploy
path: compile/fullCompile/cppDeploy/
- name: Remove build archive
run: rm ../${{ runner.os }}.zip
cpp-deploy:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
ref: generated_source
path: rat_source
- name: Get cppDeploy
uses: actions/download-artifact@v4
with:
name: cppDeploy
path: cppDeploy/
- name: Deploy Source
run: |
rm -rf rat_source/*.c rat_source/*.cpp rat_source/*.h rat_source/*.hpp
rsync -av cppDeploy/ rat_source/
cd rat_source
git config user.name github-actions
git config user.email [email protected]
git add -A
git commit -m "Deploy Source Code" || true
git push