8000 Ship the Cargo.lock file in the source distribution (#7) · tfeda/datafusion-python@6635379 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6635379

Browse files
authored
Ship the Cargo.lock file in the source distribution (datafusion-contrib#7)
1 parent 2ee0858 commit 6635379

File tree

5 files changed

+1465
-13
lines changed

5 files changed

+1465
-13
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
path: .
7272

7373
- name: Build Python package
74-
run: maturin build --release --no-sdist --strip
74+
run: maturin build --release --no-sdist --strip --locked
7575

7676
- name: List Windows wheels
7777
if: matrix.os == 'windows-latest'
@@ -106,7 +106,7 @@ jobs:
106106
docker run --rm -v $(pwd)/..:/io \
107107
--workdir /io \
108108
konstin2/maturin:v0.11.2 \
109-
build --release --manylinux 2010
109+
build --release --manylinux 2010 --locked
110110
- name: Archive wheels
111111
uses: actions/upload-artifact@v2
112112
with:

.github/workflows/test.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,40 @@ jobs:
2929
- "3.10"
3030
steps:
3131
- uses: actions/checkout@v2
32+
3233
- name: Setup Rust toolchain
3334
run: |
3435
rustup toolchain install nightly-2021-10-23
3536
rustup default nightly-2021-10-23
3637
rustup component add rustfmt
38+
3739
- name: Cache Cargo
3840
uses: actions/cache@v2
3941
with:
4042
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+
4745
- uses: actions/setup-python@v2
4846
with:
4947
python-version: ${{ matrix.python-version }}
48+
5049
- name: Create Virtualenv
5150
run: |
5251
python -m venv venv
5352
source venv/bin/activate
5453
pip install -r requirements.txt
54+
5555
- name: Run Linters
5656
if: ${{ matrix.python-version == '3.10' }}
5757
run: |
5858
source venv/bin/activate
5959
flake8 --exclude venv --ignore=E501
6060
black --line-length 79 --diff --check .
61+
6162
- name: Run tests
6263
run: |
6364
source venv/bin/activate
64-
maturin develop
65+
maturin develop --cargo-extra-args='--locked'
6566
RUST_BACKTRACE=1 pytest -v .
6667
env:
6768
CARGO_HOME: "/home/runner/.cargo"

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ cython_debug/
164164
# will have compiled files and executables
165165
debug/
166166

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-
171167
# These are backup files generated by rustfmt
172168
**/*.rs.bk
173169

0 commit comments

Comments
 (0)
0