-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make serde an optional dependency of zeroconf (#60)
* separate serde into feature Signed-off-by: Walker Crouse <walkercrouse@hotmail.com> * move examples into the main workspace Signed-off-by: Walker Crouse <walkercrouse@hotmail.com> * re-work GitHub Actions workflow Signed-off-by: Walker Crouse <walkercrouse@hotmail.com> * color = better Signed-off-by: Walker Crouse <walkercrouse@hotmail.com> * remove old workflow Signed-off-by: Walker Crouse <walkercrouse@hotmail.com> * update README Signed-off-by: Walker Crouse <walkercrouse@hotmail.com> --------- Signed-off-by: Walker Crouse <walkercrouse@hotmail.com>
- Loading branch information
Showing
11 changed files
with
87 additions
and
826 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,61 @@ | ||
name: Rust | ||
name: Rust CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
branches: | ||
- master | ||
pull_request: | ||
branches: [master, release/**] | ||
branches: | ||
- master | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
macOS: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare | ||
run: rustup component add clippy | ||
- name: Build | ||
run: ./scripts/buildall.sh | ||
- name: Check formatting | ||
run: ./scripts/checkfmt.sh | ||
- name: Run clippy | ||
run: ./scripts/lintall.sh | ||
- name: Run tests | ||
run: cargo test --verbose -- --skip service_register_is_browsable | ||
build: | ||
name: zeroconf-rs | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
features: [serde, ""] | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare | ||
run: "rustup component add clippy && sudo apt -y install avahi-daemon libavahi-client-dev && sudo systemctl start avahi-daemon.service" | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || matrix.os == 'macos-latest' && 'x86_64-apple-darwin' || 'x86_64-unknown-linux-gnu' }} | ||
|
||
- name: Prepare for Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt -y install avahi-daemon libavahi-client-dev | ||
sudo systemctl start avahi-daemon.service | ||
- name: Prepare for Windows | ||
if: matrix.os == 'windows-latest' | ||
run: "choco install -y bonjour" | ||
|
||
- name: Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Build | ||
run: ./scripts/buildall.sh | ||
- name: Check formatting | ||
run: ./scripts/checkfmt.sh | ||
- name: Run clippy | ||
run: ./scripts/lintall.sh | ||
run: cargo build --features "${{ matrix.features }}" | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
run: cargo test --features "${{ matrix.features }}" -- --skip service_register_is_browsable | ||
|
||
windows-latest: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Bonjour | ||
run: choco install -y bonjour | ||
- name: Prepare | ||
run: "rustup component add clippy" | ||
- name: Build | ||
shell: pwsh | ||
run: ./scripts/buildall.ps1 | ||
- name: Check formatting | ||
run: ./scripts/checkfmt.ps1 | ||
- name: Run clippy | ||
shell: pwsh | ||
run: ./scripts/lintall.ps1 | ||
- name: Run tests | ||
run: cargo test --verbose | ||
run: cargo fmt -- --check | ||
|
||
- name: Run Clippy | ||
run: cargo clippy --features "${{ matrix.features }}" -- -D warnings |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
members = [ | ||
"zeroconf", | ||
"zeroconf-macros", | ||
"examples/browser", | ||
"examples/service", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.