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
2030concurrency :
2131 group : pages
2232 cancel-in-progress : false # never abort a Pages deployment mid-flight
2333
2434permissions :
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
2739jobs :
2840 test-and-deploy :
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
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
5670 uses : julia-actions/cache@v2
5771
5872 - name : Build package
59- uses : julia-actions/julia-buildpkg@v1
73+ run : |
74+ julia --project=. -e '
75+ using Pkg
76+ bm_ver = get(ENV, "BM_VERSION_INPUT", "main")
77+ if bm_ver != "main"
78+ Pkg.add(name="BaseModelica", version=bm_ver)
79+ else
80+ Pkg.add(name="BaseModelica", rev=bm_ver)
81+ end
82+ Pkg.instantiate()
83+ '
6084
6185 # ── Resolve versions ──────────────────────────────────────────────────────
6286 - name : Resolve BaseModelica.jl version
@@ -84,21 +108,13 @@ jobs:
84108 julia --project=. -e '
85109 using BaseModelicaLibraryTesting
86110 main(
87- library = "Modelica" ,
111+ library = ENV["LIB_NAME"] ,
88112 version = ENV["LIB_VERSION"],
89- results_root = "results/$(ENV["BM_VERSION"])/Modelica /$(ENV["LIB_VERSION"])",
113+ results_root = "results/$(ENV["BM_VERSION"])/$(ENV["LIB_NAME"]) /$(ENV["LIB_VERSION"])",
90114 ref_root = "MAP-LIB_ReferenceResults",
91115 )
92116 '
93117
94- - name : Upload test results
95- uses : actions/upload-artifact@v6
96- with :
97- name : sanity-results-${{ matrix.os }}
98- path : results/
99- if-no-files-found : error
100-
101-
102118 # ── Deploy to gh-pages ────────────────────────────────────────────────────
103119 - name : Prepare gh-pages worktree
104120 run : |
@@ -125,5 +141,13 @@ jobs:
125141 git config user.email "github-actions[bot]@users.noreply.github.com"
126142 git add -A
127143 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')]"
144+ git commit -m "results: ${BM_VERSION}/${LIB_NAME} /${LIB_VERSION} [$(date -u '+%Y-%m-%d')]"
129145 git push origin HEAD:gh-pages
146+
147+ - name : Upload Pages artifact
148+ uses : actions/upload-pages-artifact@v4
149+ with :
150+ path : site/
151+
152+ - name : Deploy to GitHub Pages
153+ uses : actions/deploy-pages@v4
0 commit comments