Skip to content

Commit

Permalink
Adding IEE14, ScalableTranslation examples
Browse files Browse the repository at this point in the history
  • Loading branch information
AnHeuermann committed Jun 6, 2024
1 parent 5c46234 commit 42d7d04
Show file tree
Hide file tree
Showing 14 changed files with 2,461 additions and 1,719 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/example-IEEE14.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Example IEEE14
on:
push:
branches:
- main
tags: '*'
pull_request:

env:
BUILD_TYPE: RelWithDebInfo

jobs:
test:
runs-on: ${{ matrix.os }}
env:
ORT_DIR: '${{ github.workspace }}/${{ matrix.ort_dir }}'
strategy:
matrix:
julia-version: ['1.10']
julia-arch: [x64]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
ort_url: 'https://github.com/microsoft/onnxruntime/releases/download/v1.12.1/onnxruntime-linux-x64-1.12.1.tgz'
ort_archieve_name: 'onnxruntime-linux-x64-1.12.1.tgz'
ort_dir: 'onnxruntime-linux-x64-1.12.1'
timeout-minutes: 60

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Install Python packages
run: |
pip install examples/IEEE14/requirements.txt
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ matrix.os }}-pip

- name: Setup CMake v3.21
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.21'
- run: cmake --version

- name: Download ONNX Runtime
run: |
wget -q ${{ matrix.ort_url }}
tar -xf ${{ matrix.ort_archieve_name }}
rm ${{ matrix.ort_archieve_name }}
- name: Setup OpenModelica
uses: OpenModelica/setup-openmodelica@v1
with:
version: 'nightly'
packages: |
'omc'
libraries: |
'OpenIPSL 3.0.1'
- run: |
which omc
omc --version
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

- name: Cache Julia
uses: julia-actions/cache@v2

- name: Install dependencies
run: julia --project=examples/IEEE14 -e 'using Pkg; Pkg.instantiate()'

- name: Run example
run: |
cd examples/IEEE14
julia --project=. -e 'include("scripts/genAllData.jl"); include("scripts/trainFlux.jl"); include("scripts/trainTensorflow.jl");'
81 changes: 81 additions & 0 deletions .github/workflows/example-scalable-translation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Example ScalableTranslationStatistics

on:
push:
branches:
- main
tags: '*'
pull_request:

env:
BUILD_TYPE: RelWithDebInfo

jobs:
test:
runs-on: ${{ matrix.os }}
env:
ORT_DIR: '${{ github.workspace }}/${{ matrix.ort_dir }}'
strategy:
matrix:
julia-version: ['1.10']
julia-arch: [x64]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
ort_url: 'https://github.com/microsoft/onnxruntime/releases/download/v1.12.1/onnxruntime-linux-x64-1.12.1.tgz'
ort_archieve_name: 'onnxruntime-linux-x64-1.12.1.tgz'
ort_dir: 'onnxruntime-linux-x64-1.12.1'
timeout-minutes: 60

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup CMake v3.21
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.21'
- run: cmake --version

- name: Download ONNX Runtime
run: |
wget -q ${{ matrix.ort_url }}
tar -xf ${{ matrix.ort_archieve_name }}
rm ${{ matrix.ort_archieve_name }}
- name: Setup OpenModelica
uses: OpenModelica/setup-openmodelica@v1
with:
version: 'nightly'
packages: |
'omc'
'omsimulator'
- run: |
which omc
omc --version
which OMSimulator
OMSimulator --version
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

- name: Cache Julia
uses: julia-actions/cache@v2

- name: Install dependencies
run: julia --project=examples/ScalableTranslationStatistics -e 'using Pkg; Pkg.instantiate()'

- name: Run example
run: |
cd examples/ScalableTranslationStatistics
julia --project=. scripts/runAll.jl
- name: Archive plots
uses: actions/upload-artifact@v4
with:
name: plots
path: ./examples/ScalableTranslationStatistics/plots
6 changes: 3 additions & 3 deletions .github/workflows/example-simple-loop-proximity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ jobs:
- name: Install dependencies
run: julia --project=examples/SimpleLoop_proximity -e 'using Pkg; Pkg.instantiate()'

- name: Build and deploy
- name: Run example
run: |
cd examples/SimpleLoop_proximity
julia --project=. scripts/runall.jl
julia --project=. scripts/runAll.jl
- name: Archive plots
uses: actions/upload-artifact@v4
with:
name: plots
path: ./examples/SimpleLoop/plots
path: ./examples/SimpleLoop_proximity/plots
2 changes: 1 addition & 1 deletion .github/workflows/example-simple-loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Install dependencies
run: julia --project=examples/SimpleLoop -e 'using Pkg; Pkg.instantiate()'

- name: Build and deploy
- name: Run example
run: |
cd examples/SimpleLoop
julia --project=. scripts/runall.jl
Expand Down
Loading

0 comments on commit 42d7d04

Please sign in to comment.