Skip to content

Commit

Permalink
Update matlab-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbuzinski authored Mar 13, 2024
1 parent 70ef18a commit 3e8b335
Showing 1 changed file with 6 additions and 117 deletions.
123 changes: 6 additions & 117 deletions .github/workflows/matlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,68 +7,13 @@ on:
push: # Runs on push events
pull_request: # Runs on pull requests
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
schedule:
- cron: '49/61 22/25 4/6 * *' # schedule a weekly-ish build

env:
MATHWORKS_LICENSING_ENDPOINT: dev

jobs:
# This workflow contains a single job called "build"


compile-and-test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2-rc0
with:
release: R2022b
cache: true

# Runs a set of commands using the runners shell
- name: Generate mex files & run tests
uses: matlab-actions/run-build@v2-rc0
with:
tasks: test

- name: Upload Mex Files
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
# Artifact name
name: Mex-Artifacts-${{ matrix.os }}
# A file, directory or wildcard pattern that describes what to upload
path: toolbox/**/*.mex*64


- name: Upload Build traces on linux
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
# Artifact name
name: build-traces
# A file, directory or wildcard pattern that describes what to upload
path: .buildtool


create-R2022b-toolbox:
needs: compile-and-test
jobs:
build-toolbox:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Start display server
run: |
sudo apt-get install xvfb
Expand All @@ -77,69 +22,13 @@ jobs:
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2-rc0
uses: matlab-actions/setup-matlab@v2
with:
release: R2022b
cache: true

- name: Download mac artifacts
uses: actions/download-artifact@v3
with:
name: Mex-Artifacts-macos-latest
path: toolbox
- name: Download windows artifacts
uses: actions/download-artifact@v3
with:
name: Mex-Artifacts-windows-latest
path: toolbox
- name: Download linux artifacts
uses: actions/download-artifact@v3
with:
name: Mex-Artifacts-ubuntu-latest
path: toolbox

# - name: Download build traces
# uses: actions/download-artifact@v3
# with:
# name: build-traces
# path: .

# Runs a set of commands using the runners shell
- name: Run toolbox build
uses: matlab-actions/run-build@v2-rc0
uses: matlab-actions/run-build@v2
with:
tasks: toolbox

- name: Upload cross platform toolbox
uses: actions/upload-artifact@v3
with:
# Artifact name
name: Cross Platform Toolbox File
# A file, directory or wildcard pattern that describes what to upload
path: ./**/*.mltbx


canary-tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2-rc0
with:
release: latest

# Runs a set of commands using the runners shell
- name: Generate mex files & run tests
uses: matlab-actions/run-build@v2-rc0
with:
tasks: test

0 comments on commit 3e8b335

Please sign in to comment.