Skip to content

Add explicit AD components, powered by DifferentationInterface.jl and friends #80

Add explicit AD components, powered by DifferentationInterface.jl and friends

Add explicit AD components, powered by DifferentationInterface.jl and friends #80

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
jobs:
OpenMDAOCore_jl:
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version:
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.arch }}
- name: Add General Registry
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/JuliaRegistries/General"))
env:
JULIA_PKG_USE_CLI_GIT: 'true'
- name: OpenMDAOCore.jl Tests
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.activate("./julia/OpenMDAOCore.jl")
Pkg.update()
Pkg.test()
env:
JULIA_PKG_USE_CLI_GIT: 'true'
OpenMDAO_jl:
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version:
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.arch }}
- name: Add General Registry
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/JuliaRegistries/General"))
env:
JULIA_PKG_USE_CLI_GIT: 'true'
- name: Use MicroMamba not Pixie with CondaPkg.jl
shell: julia --project=. --color=yes {0}
run: |
using Pkg
# Pkg.activate("./julia/OpenMDAO.jl")
Pkg.add("PreferenceTools")
using PreferenceTools
PreferenceTools.add("CondaPkg", backend="MicroMamba")
env:
JULIA_PKG_USE_CLI_GIT: 'true'
- name: OpenMDAO.jl Tests
shell: julia --project=. --color=yes {0}
run: |
using Pkg
# Pkg.activate("./julia/OpenMDAO.jl")
Pkg.develop(path="./julia/OpenMDAOCore.jl")
Pkg.add("CondaPkg")
using CondaPkg
CondaPkg.add_pip("omjlcomps"; version="@./python")
Pkg.develop(path="./julia/OpenMDAO.jl")
Pkg.instantiate()
Pkg.update()
Pkg.test("OpenMDAO")
env:
JULIA_PKG_USE_CLI_GIT: 'true'
omjlcomps:
name: Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
julia-version:
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
os:
- ubuntu-latest
arch:
- x64
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.arch }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Add General Registry
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/JuliaRegistries/General"))
env:
JULIA_PKG_USE_CLI_GIT: 'true'
- name: Install juliapkg and add latest version of OpenMDAOCore.jl
run: |
echo "PWD = $PWD"
python -m pip install --upgrade pip
pip install juliapkg
python -c "import juliapkg; juliapkg.add('OpenMDAOCore', '24d19c10-6eee-420f-95df-4537264b2753', dev=True, path='./julia/OpenMDAOCore.jl')"
- name: omjlcomps install
run: |
echo "PWD = $PWD"
pip install --config-settings editable_mode=compat -e ./python
python -c "import juliapkg; juliapkg.resolve()"
env:
JULIA_PKG_USE_CLI_GIT: 'true'
- name: omjlcomps tests
run: |
echo "PWD = $PWD"
python ./python/omjlcomps/test/test_julia_explicit_comp.py
python ./python/omjlcomps/test/test_julia_implicit_comp.py
python ./python/omjlcomps/test/test_aviary_support.py
python ./python/omjlcomps/test/test_explicit_ad_shape_by_conn.py
env:
JULIA_PKG_USE_CLI_GIT: 'true'
- name: test examples
run: |
echo "PWD = $PWD"
cd ./examples/example_python_package_openmdao_jl
pip install --config-settings editable_mode=compat -e .
python ./scripts/run_paraboloid.py
python ./example_python_package_openmdao_jl/test/test_paraboloid_example.py