Skip to content

Fix/update of unit tests for all ETL operators to natively embed clocks + update of CRML.mo (graphical annotation supported by OMEdit + new clock-based ETL operators) #361

Fix/update of unit tests for all ETL operators to natively embed clocks + update of CRML.mo (graphical annotation supported by OMEdit + new clock-based ETL operators)

Fix/update of unit tests for all ETL operators to natively embed clocks + update of CRML.mo (graphical annotation supported by OMEdit + new clock-based ETL operators) #361

Workflow file for this run

name: Makefile CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '8'
# run omc runTest.mos using docker!
#- name: run OM docker
# uses: docker://openmodelica/openmodelica:v1.19.2-minimal
# with:
# args: omc runTests.mos
- name: install openmodelica
run: |
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
curl -fsSL http://build.openmodelica.org/apt/openmodelica.asc | sudo gpg --dearmor -o /usr/share/keyrings/openmodelica-keyring.gpg
gpg --show-keys /usr/share/keyrings/openmodelica-keyring.gpg
# Or replace stable with nightly or release
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] https://build.openmodelica.org/apt \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/openmodelica.list > /dev/null
sudo apt update
sudo apt install omc omlibrary
- name: build the crml-compiler
run: |
java -version
make distribution
- name: run OMC tests
run: |
pwd
# create a runTests.mos file to run some tests
# this is just an example, we should create .mos
# files for each .mo file to run each as a JUnit test
# load the library
echo 'loadFile("./resources/modelica_libraries/CRMLtoModelica.mo"); getErrorString();' >> runTests.mos
# load a translated file
echo 'loadFile("./build/testSuiteGenerated/spec-doc-examples/BooleanAccumulation/BooleanAccumulation.mo"); getErrorString();' >> runTests.mos
# check the translated file
echo 'checkModel(BooleanAccumulation); getErrorString();' >> runTests.mos
cat runTests.mos
omc runTests.mos
- name: upload the crml-compiler
uses: actions/upload-artifact@v2
with:
name: crml-compiler-all.jar
path: ${{github.workspace}}/build/libs/crml-compiler-all.jar
- name: upload the tests and results
uses: actions/upload-artifact@v2
with:
name: tests-and-results
path: |
${{github.workspace}}/testSuiteGenerated
${{github.workspace}}/build/test-results
if-no-files-found: warn
- name: publish the test report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
## you can use this to run everything in a Docker container
## test:
## runs-on: ubuntu-latest
## container: openmodelica/openmodelica:v1.19.2-minimal
##
## steps:
## - name: text the generated .mo files with OMC
## run: omc --help