Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce package size #144

Merged
merged 3 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 13 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -53,6 +54,10 @@ jobs:
run: cargo build --no-default-features --features linux-${{ matrix.linkage }}-${{ matrix.library }} --verbose
- name: Run tests
run: cargo test --no-default-features --features linux-${{ matrix.linkage }}-${{ matrix.library }} --verbose
- name: Verify package
run: |
rm -f ./etc/libusb/README.md
ruabmbua marked this conversation as resolved.
Show resolved Hide resolved
cargo package --no-default-features --features linux-${{ matrix.linkage }}-${{ matrix.library }} --verbose

build-linux-native:
runs-on: ubuntu-latest
Expand All @@ -71,6 +76,8 @@ jobs:
run: cargo build --no-default-features --features linux-native --verbose
- name: Run tests
run: cargo test --no-default-features --features linux-native --verbose
- name: Verify package
run: cargo package --no-default-features --features linux-native --verbose

build-windows:
runs-on: windows-latest
Expand All @@ -87,6 +94,8 @@ jobs:
run: cargo build --no-default-features --verbose
- name: Run tests
run: cargo test --no-default-features --verbose
- name: Verify package
run: cargo package --no-default-features --verbose

build-windows-native:
runs-on: windows-latest
Expand All @@ -103,6 +112,8 @@ jobs:
run: cargo build --no-default-features --features windows-native --verbose
- name: Run tests
run: cargo test --no-default-features --features windows-native --verbose
- name: Verify package
run: cargo package --no-default-features --features windows-native --verbose

build-macos:
runs-on: macos-latest
Expand All @@ -118,6 +129,8 @@ jobs:
run: cargo build --no-default-features --verbose
- name: Run tests
run: cargo test --no-default-features --verbose
- name: Verify package
run: cargo package --no-default-features --verbose

fmt-check:
runs-on: ubuntu-latest
Expand Down
23 changes: 23 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@ build = "build.rs"
links = "hidapi"
documentation = "https://docs.rs/hidapi"
edition = "2021"
include = [
"README.md",
"LICENSE.txt",
"build.rs",
"/src",
"/etc/hidapi/CMakeLists.txt",
"/etc/hidapi/LICENSE*",
"/etc/hidapi/VERSION",
"/etc/hidapi/hidapi",
"/etc/hidapi/libusb",
"/etc/hidapi/src",
"/etc/hidapi/udev",
# Platform support files
"/etc/hidapi/linux/CMakeLists.txt",
"/etc/hidapi/linux/*.c",
"/etc/hidapi/linux/*.h",
"/etc/hidapi/mac/CMakeLists.txt",
"/etc/hidapi/mac/*.c",
"/etc/hidapi/mac/*.h",
"/etc/hidapi/windows/CMakeLists.txt",
"/etc/hidapi/windows/*.c",
"/etc/hidapi/windows/*.h",
]

[features]
default = ["linux-static-hidraw", "illumos-static-libusb"]
Expand Down