Skip to content

Commit b5035c3

Browse files
authored
Update versions (#169)
* Updating OpenModelica versions - Update setup-openmodelica to v0.4.1 - Added/updated OpenModelica versions to src/versions.json - Updated README * Adding devcontainer for Linux
1 parent 19d91aa commit b5035c3

File tree

10 files changed

+73
-26
lines changed

10 files changed

+73
-26
lines changed

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
"name": "Ubuntu",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:jammy",
7+
"features": {
8+
"ghcr.io/devcontainers-contrib/features/typescript:2": {}
9+
}
10+
11+
// Features to add to the dev container. More info: https://containers.dev/features.
12+
// "features": {},
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [],
16+
17+
// Use 'postCreateCommand' to run commands after the container is created.
18+
// "postCreateCommand": "uname -a",
19+
20+
// Configure tool-specific properties.
21+
// "customizations": {},
22+
23+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24+
// "remoteUser": "root"
25+
}

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ On Linux apt is used to install OpenModelica, on Windows the installer executabl
1919
Can be `'64'` or `'32'`.
2020
- `packages`: OpenModelica APT packages to install. Only used on Linux OS.
2121
- For example `'omc'` for the OpenModelica Compiler or `'omsimulator'` for OMSimulator.
22+
Use one package per line.
2223

2324
## Available OpenModelica versions
2425

@@ -27,8 +28,10 @@ On Linux apt is used to install OpenModelica, on Windows the installer executabl
2728
| nightly | Linux | amd64, arm64, armhf, i386 | ✔️ |
2829
| stable | Linux | amd64, arm64, armhf, i386 | ✔️ |
2930
| release | Linux | amd64, arm64, armhf, i386 | ✔️ |
30-
| 1.19.2 | Linux | amd64, arm64, armhf, i386 ||
31+
| 1.20.0 | Linux | amd64, arm64, armhf, i386 | ✔️ |
32+
| 1.19.2 | Linux | amd64, arm64, armhf, i386 | ✔️ |
3133
| 1.19.1 | Linux | amd64, arm64, armhf, i386 ||
34+
| 1.19.0 | Linux | amd64, arm64, armhf, i386 ||
3235
| 1.18.1 | Linux | amd64, arm64, armhf, i386 | ✔️ |
3336
| 1.18.0 | Linux | amd64, arm64, armhf, i386 | ✔️ |
3437
| 1.17.0 | Linux | amd64, arm64, armhf, i386 | ☑️ |
@@ -40,9 +43,10 @@ On Linux apt is used to install OpenModelica, on Windows the installer executabl
4043
| 1.14.2 | Linux | amd64, arm64, armhf, i386 | ☑️ |
4144
| 1.14.1 | Linux | amd64, arm64, armhf, i386 | ☑️ |
4245
| 1.13.2 | Linux | amd64, arm64, armhf, i386 | ☑️ |
43-
| nightly | Windows | 64bit | |
46+
| nightly | Windows | 64bit | |
4447
| stable | Windows | 64bit | ✔️ |
45-
| release | Windows | 64bit | ☑️ |
48+
| release | Windows | 64bit | ✔️ |
49+
| 1.20.0 | Windows | 64bit | ✔️ |
4650
| 1.19.2 | Windows | 64bit | ✔️ |
4751
| 1.19.0 | Windows | 64bit | ☑️ |
4852
| 1.18.1 | Windows | 64bit | ☑️ |
@@ -60,7 +64,7 @@ On Linux apt is used to install OpenModelica, on Windows the installer executabl
6064
```yaml
6165
- uses: AnHeuermann/[email protected]
6266
with:
63-
version: '1.18'
67+
version: '1.20'
6468
packages: |
6569
'omc'
6670
'omsimulator'

__tests__/installer.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function linuxTests(): void {
3737
let outVer: installer.VersionType
3838

3939
outVer = installer.getOMVersion('1')
40-
expect(outVer.version).toEqual('1.18.1')
40+
expect(outVer.version).toEqual('1.20.0')
4141

4242
outVer = installer.getOMVersion('1.18')
4343
expect(outVer.version).toEqual('1.18.1')
@@ -58,17 +58,17 @@ function linuxTests(): void {
5858
expect(outVer.type).toEqual('release')
5959
})
6060

61-
//test(
62-
// 'Install 64 bit OpenModelica release 1.19',
63-
// async () => {
64-
// await purgeOMC()
65-
// const version = installer.getOMVersion('1.19')
66-
// await installer.installOM(['omc'], version, '64')
67-
// const resVer = await installer.showVersion('omc')
68-
// expect(resVer).toEqual('1.19.2')
69-
// },
70-
// 10 * 60000
71-
//)
61+
test(
62+
'Install 64 bit OpenModelica release 1.19',
63+
async () => {
64+
await purgeOMC()
65+
const version = installer.getOMVersion('1.19')
66+
await installer.installOM(['omc'], version, '64')
67+
const resVer = await installer.showVersion('omc')
68+
expect(resVer).toEqual('1.19.2')
69+
},
70+
10 * 60000
71+
)
7272

7373
test(
7474
'Try to install 64 bit OpenModelica release 1.18.0 which is not availabe on jammy',

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
required: false
1010
default: 'release'
1111
architecture:
12-
description: 'The architecture of Openmodelica to be used.
12+
description: 'The architecture of OpenModelica to be used.
1313
Can be "64" or "32".'
1414
required: false
1515
default: '64'

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "setup-openmodelica",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"engines": {
55
"node": ">=18.0.0"
66
},

src/installer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async function aptInstallOM(
149149
)
150150
const distro = out.stdout.trim()
151151
if ((version.version !== 'nightly') && (version.version !== 'stable') && (version.version !== 'release')) {
152-
const response = await fetch(`${version.address}/${distro}`)
152+
const response = await fetch(`${version.address}dists/${distro}`)
153153
if (response.status === 404) {
154154
throw new Error(`Distribution ${distro} not available for OpenModelica version ${version.version}.`)
155155
}

src/versions.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@
1010
"version": "stable",
1111
"type": "stable",
1212
"arch": "64",
13-
"address": "https://build.openmodelica.org/omc/builds/windows/releases/1.19/2/64bit/OpenModelica-v1.19.2-64bit.exe"
13+
"address": "https://build.openmodelica.org/omc/builds/windows/releases/1.20/0/64bit/OpenModelica-v1.20.0-64bit.exe"
1414
},
1515
{
1616
"version": "release",
1717
"type": "release",
1818
"arch": "64",
19-
"address": "https://build.openmodelica.org/omc/builds/windows/releases/1.19/2/64bit/OpenModelica-v1.19.2-64bit.exe"
19+
"address": "https://build.openmodelica.org/omc/builds/windows/releases/1.20/0/64bit/OpenModelica-v1.20.0-64bit.exe"
20+
},
21+
{
22+
"version": "1.20.0",
23+
"type": "release",
24+
"arch": "64",
25+
"address": "https://build.openmodelica.org/omc/builds/windows/releases/1.20/0/64bit/OpenModelica-v1.20.0-64bit.exe"
2026
},
2127
{
2228
"version": "1.19.2",
@@ -70,6 +76,18 @@
7076
"type": "stable",
7177
"address": "https://build.openmodelica.org/apt"
7278
},
79+
{
80+
"version": "1.20.0",
81+
"aptname": "1.20.0-1",
82+
"type": "release",
83+
"address": "https://build.openmodelica.org/omc/builds/linux/releases/1.20.0/"
84+
},
85+
{
86+
"version": "1.19.2",
87+
"aptname": "1.19.2-1",
88+
"type": "release",
89+
"address": "https://build.openmodelica.org/omc/builds/linux/releases/1.19.2/"
90+
},
7391
{
7492
"version": "1.18.1",
7593
"aptname": "1.18.1-1",

0 commit comments

Comments
 (0)