Skip to content

Commit c64e1ed

Browse files
AnHeuermannclaude
andcommitted
msl-test BaseModelica.jl main
* Make Modelica library and BaseModelica.jl version input arguments. * Upload gh-pages from action Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ae626cd commit c64e1ed

1 file changed

Lines changed: 30 additions & 4 deletions

File tree

.github/workflows/msl-test.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,30 @@ on:
1111
- cron: '0 3 * * *' # every day 03:00 UTC
1212
workflow_dispatch:
1313
inputs:
14+
library:
15+
description: 'Modelica library name'
16+
required: false
17+
default: 'Modelica'
18+
type: string
1419
lib_version:
1520
description: 'Modelica Standard Library version'
1621
required: false
1722
default: '4.1.0'
1823
type: string
24+
bm_version:
25+
description: 'BaseModelica.jl version (branch, tag, or "main")'
26+
required: false
27+
default: 'main'
28+
type: string
1929

2030
concurrency:
2131
group: pages
2232
cancel-in-progress: false # never abort a Pages deployment mid-flight
2333

2434
permissions:
2535
contents: write # needed to push to gh-pages
36+
pages: write # needed to deploy to GitHub Pages
37+
id-token: write # needed for OIDC Pages deployment
2638

2739
jobs:
2840
test-and-deploy:
@@ -31,7 +43,9 @@ jobs:
3143
timeout-minutes: 480
3244

3345
env:
46+
LIB_NAME: ${{ inputs.library || 'Modelica' }}
3447
LIB_VERSION: ${{ inputs.lib_version || '4.1.0' }}
48+
BM_VERSION_INPUT: ${{ inputs.bm_version || 'main' }}
3549

3650
steps:
3751
- name: Checkout source
@@ -44,7 +58,7 @@ jobs:
4458
packages: |
4559
omc
4660
libraries: |
47-
'Modelica ${{ env.LIB_VERSION }}'
61+
'${{ env.LIB_NAME }} ${{ env.LIB_VERSION }}'
4862
4963
- name: Set up Julia
5064
uses: julia-actions/setup-julia@v2
@@ -55,6 +69,10 @@ jobs:
5569
- name: Restore Julia package cache
5670
uses: julia-actions/cache@v2
5771

72+
- name: Pin BaseModelica.jl version
73+
if: env.BM_VERSION_INPUT != 'main'
74+
run: julia --project=. -e 'using Pkg; Pkg.add(PackageSpec(name="BaseModelica", version=ENV["BM_VERSION_INPUT"]))'
75+
5876
- name: Build package
5977
uses: julia-actions/julia-buildpkg@v1
6078

@@ -84,9 +102,9 @@ jobs:
84102
julia --project=. -e '
85103
using BaseModelicaLibraryTesting
86104
main(
87-
library = "Modelica",
105+
library = ENV["LIB_NAME"],
88106
version = ENV["LIB_VERSION"],
89-
results_root = "results/$(ENV["BM_VERSION"])/Modelica/$(ENV["LIB_VERSION"])",
107+
results_root = "results/$(ENV["BM_VERSION"])/$(ENV["LIB_NAME"])/$(ENV["LIB_VERSION"])",
90108
ref_root = "MAP-LIB_ReferenceResults",
91109
)
92110
'
@@ -125,5 +143,13 @@ jobs:
125143
git config user.email "github-actions[bot]@users.noreply.github.com"
126144
git add -A
127145
git diff --cached --quiet && { echo "Nothing to commit."; exit 0; }
128-
git commit -m "results: ${BM_VERSION}/Modelica/${LIB_VERSION} [$(date -u '+%Y-%m-%d')]"
146+
git commit -m "results: ${BM_VERSION}/${LIB_NAME}/${LIB_VERSION} [$(date -u '+%Y-%m-%d')]"
129147
git push origin HEAD:gh-pages
148+
149+
- name: Upload Pages artifact
150+
uses: actions/upload-pages-artifact@v4
151+
with:
152+
path: site/
153+
154+
- name: Deploy to GitHub Pages
155+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)