Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 4 additions & 78 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# This is a basic workflow to help you get started with MATLAB Actions
name: MATLAB Build
name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events, but only for the main branch
push:
branches: [ main ]
# Triggers the workflow on pull request events, but only for the main branch
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
PRODUCT_LIST: MATLAB MATLAB_Test SimBiology Statistics_and_Machine_Learning_Toolbox MATLAB_Compiler
MLM_LICENSE_TOKEN: ${{ secrets.MYTOKEN }}
PRODUCT_LIST: MATLAB MATLAB_Test SimBiology Statistics_and_Machine_Learning_Toolbox

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand All @@ -25,7 +22,7 @@ permissions:
# Only allow one build of this type to run at a time
# Ensure results publishing completes without being interrupted/overwritten
concurrency:
group: "test and publish results"
group: "test"
cancel-in-progress: false

jobs:
Expand Down Expand Up @@ -53,74 +50,3 @@ jobs:
uses: matlab-actions/run-build@v2
with:
tasks: test

build:

# Set up URLs for GitHub Pages report
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# The type of runner that the job will run on
runs-on: windows-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Check out your repository
- uses: actions/checkout@v5

# Set up MATLAB on a GitHub-hosted runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
with:
products: ${{ env.PRODUCT_LIST }}
cache: true

# Run the MATLAB build tool to build and test your code
- name: Run buildtool
uses: matlab-actions/run-build@v2
with:
tasks: compile

# Configure GitHub Pages to accept your artifact uploads
- name: Setup Pages
if: always()
uses: actions/configure-pages@v5

# Upload testing and code coverage reports to your repository
- name: Upload pages
if: always()
uses: actions/upload-pages-artifact@v4
with:
path: results # Upload results

# Upload compiled CTF file to deploy Web App
- name: Upload CTF file
uses: actions/upload-pages-artifact@v4
with:
name: WebApp_CTF
path: WebAppArchive/*.ctf

# Publish reports to GitHub Pages so they can be viewed in a browser
- name: Deploy to GitHub Pages
id: deployment
if: always()
uses: actions/deploy-pages@v4


# ==================================== #
# Alternate ways to run commands in CI #
# ==================================== #

## Runs your tests using `runtests` command
#- name: Run all tests
# uses: matlab-actions/run-tests@v2
# with:
# source-folder: code

## Executes custom MATLAB scripts, functions, or statements
#- name: Run custom testing procedure
# uses: matlab-actions/run-command@v2
# with:
# command: disp('Running my custom testing procedure!'); addpath('code'); results = runtests('IncludeSubfolders', true); assertSuccess(results);
99 changes: 99 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# This is a basic workflow to help you get started with MATLAB Actions
name: MATLAB Build

# Controls when the action will run.
on:
# Triggers the workflow on push events, but only for the main branch
push:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
PRODUCT_LIST: MATLAB MATLAB_Test SimBiology Statistics_and_Machine_Learning_Toolbox

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Only allow one build of this type to run at a time
# Ensure results publishing completes without being interrupted/overwritten
concurrency:
group: "test and publish results"
cancel-in-progress: false

jobs:

build:

# Set up URLs for GitHub Pages report
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# The type of runner that the job will run on
runs-on: windows-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Check out your repository
- uses: actions/checkout@v5

# Set up MATLAB on a GitHub-hosted runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
with:
products: ${{ env.PRODUCT_LIST }}
cache: true

# Run the MATLAB build tool to build and test your code
- name: Run buildtool
uses: matlab-actions/run-build@v2
with:
tasks: test

# Configure GitHub Pages to accept your artifact uploads
- name: Setup Pages
if: always()
uses: actions/configure-pages@v5

# Upload testing and code coverage reports to your repository
- name: Upload pages
if: always()
uses: actions/upload-pages-artifact@v4
with:
path: results # Upload results

# Upload compiled CTF file to deploy Web App
- name: Upload CTF file
uses: actions/upload-pages-artifact@v4
with:
name: WebApp_CTF
path: WebAppArchive/*.ctf

# Publish reports to GitHub Pages so they can be viewed in a browser
- name: Deploy to GitHub Pages
id: deployment
if: always()
uses: actions/deploy-pages@v4


# ==================================== #
# Alternate ways to run commands in CI #
# ==================================== #

## Runs your tests using `runtests` command
#- name: Run all tests
# uses: matlab-actions/run-tests@v2
# with:
# source-folder: code

## Executes custom MATLAB scripts, functions, or statements
#- name: Run custom testing procedure
# uses: matlab-actions/run-command@v2
# with:
# command: disp('Running my custom testing procedure!'); addpath('code'); results = runtests('IncludeSubfolders', true); assertSuccess(results);