-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79ac3e4
commit 0e152c1
Showing
9 changed files
with
340 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*.*.*" | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup npm | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Translate grammar to JSON | ||
run: npm run prebuild | ||
|
||
- name: Run Test | ||
run: npm run test | ||
|
||
- name: Build Package | ||
if: always() | ||
run: npm run build | ||
|
||
- name: Archive vsix package | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: metamodelica.vsix | ||
path: metamodelica-*.vsix | ||
|
||
release: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: metamodelica.vsix | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
metamodelica-*.vsix | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
append_body: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "tmGrammar tests", | ||
"type": "shell", | ||
"command": "npx vscode-tmgrammar-test -c 'test/**/*.test.*'", | ||
"group": "test", | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "new", | ||
}, | ||
"problemMatcher": { | ||
"owner": "vscode-tmgrammar-test", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}", | ||
], | ||
"pattern": [ | ||
{ | ||
"regexp": "^(ERROR)\\s([^:]+):(\\d+):(\\d+):(\\d+)\\s(.*)$", | ||
"severity": 1, | ||
"file": 2, | ||
"line": 3, | ||
"column": 4, | ||
"endColumn": 5, | ||
"message": 6, | ||
}, | ||
], | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
model LotkaVolterra "Lotka-Volterra equations" | ||
Real x(start = 1) "Prey"; | ||
Real y(start = 1) "Predator"; | ||
parameter Real lambda = 0.5; | ||
input Real u; | ||
Real x(start = 1) "Prey"; | ||
Real y(start = 1) "Predator"; | ||
parameter Real lambda = 0.5; | ||
input Real u; | ||
equation | ||
der(x) = x - x * y - lambda * u; | ||
der(y) = -y + x * y - u; | ||
der(x) = x - x * y - lambda * u; | ||
der(y) = -y + x * y - u; | ||
end LotkaVolterra; |
Oops, something went wrong.