File tree 5 files changed +1465
-13
lines changed 5 files changed +1465
-13
lines changed Original file line number Diff line number Diff line change 71
71
path : .
72
72
73
73
- name : Build Python package
74
- run : maturin build --release --no-sdist --strip
74
+ run : maturin build --release --no-sdist --strip --locked
75
75
76
76
- name : List Windows wheels
77
77
if : matrix.os == 'windows-latest'
@@ -106,7 +106,7 @@ jobs:
106
106
docker run --rm -v $(pwd)/..:/io \
107
107
--workdir /io \
108
108
konstin2/maturin:v0.11.2 \
109
- build --release --manylinux 2010
109
+ build --release --manylinux 2010 --locked
110
110
- name : Archive wheels
111
111
uses : actions/upload-artifact@v2
112
112
with :
Original file line number Diff line number Diff line change @@ -29,39 +29,40 @@ jobs:
29
29
- " 3.10"
30
30
steps :
31
31
- uses : actions/checkout@v2
32
+
32
33
- name : Setup Rust toolchain
33
34
run : |
34
35
rustup toolchain install nightly-2021-10-23
35
36
rustup default nightly-2021-10-23
36
37
rustup component add rustfmt
38
+
37
39
- name : Cache Cargo
38
40
uses : actions/cache@v2
39
41
with :
40
42
path : /home/runner/.cargo
41
- key : cargo-maturin-cache-
42
- - name : Cache Rust dependencies
43
- uses : actions/cache@v2
44
- with :
45
- path : /home/runner/target
46
- key : target-maturin-cache-
43
+ key : cargo-maturin-cache-${{ hashFiles('Cargo.lock') }}
44
+
47
45
- uses : actions/setup-python@v2
48
46
with :
49
47
python-version : ${{ matrix.python-version }}
48
+
50
49
- name : Create Virtualenv
51
50
run : |
52
51
python -m venv venv
53
52
source venv/bin/activate
54
53
pip install -r requirements.txt
54
+
55
55
- name : Run Linters
56
56
if : ${{ matrix.python-version == '3.10' }}
57
57
run : |
58
58
source venv/bin/activate
59
59
flake8 --exclude venv --ignore=E501
60
60
black --line-length 79 --diff --check .
61
+
61
62
- name : Run tests
62
63
run : |
63
64
source venv/bin/activate
64
- maturin develop
65
+ maturin develop --cargo-extra-args='--locked'
65
66
RUST_BACKTRACE=1 pytest -v .
66
67
env :
67
68
CARGO_HOME : " /home/runner/.cargo"
Original file line number Diff line number Diff line change @@ -164,10 +164,6 @@ cython_debug/
164
164
# will have compiled files and executables
165
165
debug /
166
166
167
- # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
168
- # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
169
- Cargo.lock
170
-
171
167
# These are backup files generated by rustfmt
172
168
** /* .rs.bk
173
169
You can’t perform that action at this time.
0 commit comments