17
17
toolchain : stable
18
18
profile : minimal
19
19
components : rustfmt, clippy
20
+ - uses : Swatinem/rust-cache@v1
21
+ continue-on-error : true
20
22
- env :
21
23
CLIPPYFLAGS : --deny warnings --allow clippy::needless-lifetimes
22
24
run : |
@@ -87,30 +89,32 @@ jobs:
87
89
profile : minimal
88
90
toolchain : 1.48.0
89
91
default : true
92
+ - uses : Swatinem/rust-cache@v1
93
+ with :
94
+ working-directory : examples/simple-extension
95
+ continue-on-error : true
90
96
- name : Install maturin, poetry, and toml
91
97
run : pip install maturin poetry toml
92
- - name : Create an isolated example directory
93
- run : cp -r examples/simple-extension/ ../simple-extension-msrv
94
- - name : Edit Cargo.toml and change the path of rust-numpy
98
+ - name : Edit Cargo.toml and detach from workspace
95
99
run : |
96
100
import toml
97
101
cargo_toml = toml.load("Cargo.toml")
98
- cargo_toml["dependencies"]["numpy"]["path"] = "../rust-numpy"
99
102
cargo_toml["dependencies"]["ndarray"] = "0.13.1"
100
103
cargo_toml["dependencies"]["num-complex"] = "0.2.4"
104
+ cargo_toml["workspace"] = {}
101
105
with open("Cargo.toml", "w") as f:
102
106
toml.dump(cargo_toml, f)
103
- working-directory : .. /simple-extension-msrv
107
+ working-directory : examples /simple-extension
104
108
shell : python
105
109
- name : Use ndarray 0.13.1
106
110
run : |
107
111
cargo generate-lockfile
108
112
cargo update -p $(cargo pkgid -p ndarray 2>&1 >/dev/null | grep 0.15 | sed -e 's/^[ \t]*//') --precise 0.13.1
109
- working-directory : .. /simple-extension-msrv
113
+ working-directory : examples /simple-extension
110
114
- name : Test Example
111
115
run : |
112
116
poetry install && poetry run maturin develop && poetry run pytest
113
- working-directory : .. /simple-extension-msrv
117
+ working-directory : examples /simple-extension
114
118
shell : bash
115
119
116
120
linalg-example :
@@ -128,6 +132,8 @@ jobs:
128
132
uses : actions-rs/toolchain@v1
129
133
with :
130
134
toolchain : stable
135
+ - uses : Swatinem/rust-cache@v1
136
+ continue-on-error : true
131
137
- name : Install maturin and poetry
132
138
run : pip install maturin poetry
133
139
- name : Test Examples
0 commit comments