Skip to content

Specify branch and directory for github reference files #21

Specify branch and directory for github reference files

Specify branch and directory for github reference files #21

Workflow file for this run

name: Continuous Integration
on:
pull_request:
push:
branches:
- master
tags: '*'
jobs:
test:
name: GitHub Actions Test
strategy:
matrix:
omc-version: [stable, nightly]
python-version: ['3.10']
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup OpenModelica
uses: OpenModelica/setup-openmodelica@v1
with:
version: ${{ matrix.omc-version }}
packages: |
'omc'
libraries: |
'Modelica 4.0.0'
'PNlib 2.2.0'
omc-diff: true
- name: Setup Python3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install Python dependencies
shell: bash
run: |
pip install -r requirements.txt
- name: Run library test
shell: bash
run: python test.py --branch="${{ matrix.omc-version }}" --noclean --verbose configs/sanityCheck.json
- name: Generate HTML results
shell: bash
run: python report.py --branches="${{ matrix.omc-version }}" configs/sanityCheck.json
- name: Zip HTML results
shell: bash
run: |
python .github/scripts/archiveResults.py "PNlib" "2.2.0" "${{ matrix.omc-version }}" "html/"
- name: Verify that overview.html contains simulation and verification
shell: bash
run: |
if ! grep -q "<tr><td><a href=\"${{ matrix.omc-version }}/PNlib_2.2.0/PNlib_2.2.0.html\">${{ matrix.omc-version }}</a></td><td><a>93</a></td><td><a>93</a></td><td><a>92</a></td><td><a>92</a></td><td><a>92</a></td><td><a>92</a></td><td><a>92</a></td><td><a>91</a></td><td><a>90</a></td></tr></table>" overview.html; then
echo "Failed to find 93 simulating and 90 verifying models in overwiew.html:"
cat overview.html
exit 1
fi
- name: Archive sqlite3.db
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.omc-version }}-sqlite3.db
path: |
sqlite3.db
- name: Archive HTML
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.omc-version }}-PNlib.html
path: html/