First try at using the new override_method for optional methods
#136
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| - macOS-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 | |
| - macOS-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: OpenMDAO.jl Tests | |
| shell: julia --color=yes {0} | |
| run: | | |
| using Pkg | |
| Pkg.activate("./julia/OpenMDAO.jl") | |
| Pkg.develop(path="./julia/OpenMDAOCore.jl") | |
| using CondaPkg | |
| # Path needs to be relative to the CondaPkg.toml file, which is in julia/OpenMDAO.jl. | |
| CondaPkg.add_pip("omjlcomps"; version="@./../../python", editable=true) | |
| Pkg.instantiate() | |
| Pkg.update() | |
| Pkg.test() | |
| env: | |
| JULIA_PKG_USE_CLI_GIT: 'true' | |
| omjlcomps: | |
| name: Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ 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 | |
| - macOS-latest | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| exclude: | |
| # No idea why this is segfaulting. | |
| # Only sometimes. | |
| - os: macOS-latest | |
| python-version: "3.13" | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: julia-actions/setup-julia@v1 | |
| with: | |
| version: ${{ matrix.julia-version }} | |
| - 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" | |
| # Get the json file with all the test dependencies, and that will install the local version of OpenMDAOCore.jl. | |
| cp $PWD/python/omjlcomps/test/juliapkg-test.json $PWD/python/omjlcomps/juliapkg.json | |
| python -m pip install --upgrade pip | |
| pip install juliapkg | |
| - name: omjlcomps install | |
| run: | | |
| echo "PWD = $PWD" | |
| pip install --config-settings editable_mode=compat -e ./python[test] | |
| 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 | |
| python ./scripts/run_circle.py | |
| python ./example_python_package_openmdao_jl/test/test_circle_example.py | |
| python ./scripts/run_circuit.py | |
| python ./example_python_package_openmdao_jl/test/test_circuit_example.py |