-
Notifications
You must be signed in to change notification settings - Fork 5
154 lines (150 loc) · 5.34 KB
/
CI.yaml
File metadata and controls
154 lines (150 loc) · 5.34 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
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