-
Notifications
You must be signed in to change notification settings - Fork 5
158 lines (154 loc) · 5.54 KB
/
CI.yaml
File metadata and controls
158 lines (154 loc) · 5.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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.add("PreferenceTools")
# using PreferenceTools
# PreferenceTools.add("CondaPkg", backend="MicroMamba")
# Pkg.activate("./julia/OpenMDAO.jl")
# PreferenceTools.add("CondaPkg", backend="MicroMamba")
# Pkg.activate("./julia/OpenMDAO.jl/test")
# PreferenceTools.add("CondaPkg", backend="MicroMamba")
# 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")
Pkg.add(url="https://github.com/dingraha/CondaPkg.jl", rev="pip_editable")
using CondaPkg
# Path needs to be relative to the CondaPkg.toml file, which is in julia/OpenMDAOCore.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 }} - ${{ 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='$PWD/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