Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Ship the Cargo.lock file in the source distribution #7

Merged
merged 2 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
path: .

- name: Build Python package
run: maturin build --release --no-sdist --strip
run: maturin build --release --no-sdist --strip --locked

- name: List Windows wheels
if: matrix.os == 'windows-latest'
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
docker run --rm -v $(pwd)/..:/io \
--workdir /io \
konstin2/maturin:v0.11.2 \
build --release --manylinux 2010
build --release --manylinux 2010 --locked
- name: Archive wheels
uses: actions/upload-artifact@v2
with:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,39 +29,40 @@ jobs:
- "3.10"
steps:
- uses: actions/checkout@v2

- name: Setup Rust toolchain
run: |
rustup toolchain install nightly-2021-10-23
rustup default nightly-2021-10-23
rustup component add rustfmt

- name: Cache Cargo
uses: actions/cache@v2
with:
path: /home/runner/.cargo
key: cargo-maturin-cache-
- name: Cache Rust dependencies
uses: actions/cache@v2
with:
path: /home/runner/target
key: target-maturin-cache-
key: cargo-maturin-cache-${{ hashFiles('Cargo.lock') }}

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Create Virtualenv
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

- name: Run Linters
if: ${{ matrix.python-version == '3.10' }}
run: |
source venv/bin/activate
flake8 --exclude venv --ignore=E501
black --line-length 79 --diff --check .

- name: Run tests
run: |
source venv/bin/activate
maturin develop
maturin develop --cargo-extra-args='--locked'
RUST_BACKTRACE=1 pytest -v .
env:
CARGO_HOME: "/home/runner/.cargo"
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ cython_debug/
# will have compiled files and executables
debug/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
Loading