Skip to content

Commit

Permalink
Add cache input to leverage Github Actions cache for v2 (#73)
Browse files Browse the repository at this point in the history
* added cache-save and updated build. TODO: cache-restore

* added cache restore

* fixing release type conversion and bool type conversion

* add unit tests

* fixing path and cache hit issues

* add architecture to cache key and fix description

* addressed review feedback

* updated MatlabPath state 'type'

* updated missed copyrights

* changing back latest URL

* update cache input description
  • Loading branch information
davidbuzinski authored Oct 2, 2023
1 parent a01189a commit 77b0040
Show file tree
Hide file tree
Showing 19 changed files with 2,446 additions and 491 deletions.
41 changes: 41 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
},
{
"files": [
"**/*.ts"
],
"rules": {
"prefer-const": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
majorVersion=$(echo ${longVersion%.*.*})
minorVersion=$(echo ${longVersion%.*})
# Add the built artifacts. Using --force because dist/lib should be in
# Add the built artifacts. Using --force because dist should be in
# .gitignore
git add --force dist lib
git add --force dist
# Make the commit
MESSAGE="Build for $(git rev-parse --short HEAD)"
Expand Down
13 changes: 10 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2022 The MathWorks, Inc.
# Copyright 2020-2023 The MathWorks, Inc.

name: Setup MATLAB
description: >-
Expand All @@ -16,10 +16,17 @@ inputs:
default: |
MATLAB
Parallel_Computing_Toolbox
cache:
description: >-
Option to store MATLAB in the GitHub Actions cache, specified as false or true
required: false
default: false
outputs:
matlabroot:
description: >-
A full path to the folder where MATLAB is installed.
A full path to the folder where MATLAB is installed
runs:
using: node16
main: dist/index.js
main: dist/setup/index.js
post: dist/cache-save/index.js
post-if: success()
Loading

0 comments on commit 77b0040

Please sign in to comment.