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

fixup "Error parsing resolv.conf: InvalidOption(17)" error, update to latest crates and update ci files #262

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c6eeef7
build: update to latest crates
ttys3 Jan 19, 2023
edcfb11
chore: update to rust 2021 and bump to 0.20.1
ttys3 Jan 19, 2023
db6baa3
chore: remove crate patch
ttys3 Jan 19, 2023
6f8845c
build: update Cargo.lock
ttys3 Jan 19, 2023
61e4458
style: cargo clipyy
ttys3 Jan 19, 2023
7db6c3a
style: refine get_open_sockets()
ttys3 Jan 19, 2023
13fef6c
chore: add build.sh
ttys3 Jan 19, 2023
b614470
build: pnet_datalink 0.31.0 and pnet 0.31.0 depens on ipnetwork 0.19.0
ttys3 Jan 19, 2023
7e8c276
test: fix up tests compile
ttys3 Jan 19, 2023
4a8f9ea
build: reduce x86_64-unknown-linux-musl release binary size from 8.5M…
ttys3 Jan 20, 2023
6883f95
chore: update to new insta snapshot file naming `<module>__<name>.sna…
ttys3 Jan 20, 2023
64e1f99
chore: clean up src/tests/snapshots/ snap files
ttys3 Jan 20, 2023
84aa40c
fix: fix tui table header margin due to breaking change
ttys3 Jan 20, 2023
7d36e17
ci: replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stabl…
ttys3 Jan 20, 2023
b2c5b15
style: cargo fmt
ttys3 Jan 20, 2023
273d5bb
chore: bump version to 0.20.2
ttys3 Jan 20, 2023
92de381
style: bypass lint for OSX
ttys3 Jan 20, 2023
5aac4d0
build(windows): fix error: format argument must be a string literal
ttys3 Jan 20, 2023
b5354f8
build(windows): update to npcap-sdk-1.13
ttys3 Jan 20, 2023
1612740
ci: avoid "ignoring invalid dependency `cargo-insta` which is missing…
ttys3 Jan 20, 2023
3d8f9a3
chore: set rustfmt edition = "2021"
ttys3 Jan 20, 2023
104bbc3
style: lint src/os/lsof_utils.rs
ttys3 Jan 20, 2023
b187f5f
ci: fix "Unexpected input(s) 'profile', 'override', valid inputs are …
ttys3 Jan 20, 2023
0e59720
build(windows): update build.rs
ttys3 Jan 20, 2023
839c82a
build(windows): fix npcap download URL
ttys3 Jan 20, 2023
c9e16bc
build(windows): fix get_open_sockets
ttys3 Jan 20, 2023
7b601dd
chore(windows): sysinfo only fetch process
ttys3 Jan 20, 2023
e5f78e4
build: try fix win build
ttys3 Jan 20, 2023
9b3ddd2
build: fix cross compile for windows under Linux host machine
ttys3 Jan 20, 2023
27e8d29
ci: use winpcap 4.1.3.20161116 for CI since npcap free version does n…
ttys3 Jan 20, 2023
7c0a7c0
ci: disable macos for ci debug
ttys3 Jan 20, 2023
7a3ad79
build: update to packet-builder v0.7.0
ttys3 Jan 22, 2023
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
27 changes: 15 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: ci

env:
CARGO_TERM_COLOR: always

on:
pull_request:
push:
Expand All @@ -19,24 +23,23 @@ jobs:
- win-msvc
include:
- build: stable
os: ubuntu-18.04
# see https://github.com/actions/runner-images#available-images
os: ubuntu-22.04
rust: stable
- build: macos
os: macos-latest
os: macos-12
rust: stable
- build: win-msvc
os: windows-2019
os: windows-2022
rust: stable
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt, clippy

- name: Check formatting
Expand All @@ -51,7 +54,7 @@ jobs:
# This is useful for debugging problems when the expected build artifacts
# (like shell completions and man pages) aren't generated.
- name: Show build.rs stderr
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-2022'
shell: bash
run: |
set +x
Expand All @@ -67,15 +70,15 @@ jobs:
run: cargo test --verbose

- name: Upload unix binary
if: matrix.os != 'windows-2019'
uses: actions/upload-artifact@v1
if: matrix.os != 'windows-2022'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.rust }}
path: target/debug/bandwhich

- name: Upload windows binary
if: matrix.os == 'windows-2019'
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-2022'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.rust }}
path: |
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: nightly

env:
CARGO_TERM_COLOR: always

on:
pull_request:
push:
Expand All @@ -16,36 +20,31 @@ jobs:
matrix:
build:
- ubuntu
- macos
# - macos
- win-msvc
include:
- build: ubuntu
os: ubuntu-18.04
rust: nightly
- build: macos
os: macos-latest
os: ubuntu-22.04
rust: nightly
- build: win-msvc
os: windows-2019
os: windows-2022
rust: nightly
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

- name: Build
run: cargo build --verbose

# This is useful for debugging problems when the expected build artifacts
# (like shell completions and man pages) aren't generated.
- name: Show build.rs stderr
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-2022'
shell: bash
run: |
set +x
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,32 @@ jobs:
- win-msvc x64
include:
- build: linux glib x64
os: ubuntu-18.04
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-gnu
- build: linux musl x64
os: ubuntu-18.04
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-musl
- build: macos x64
os: macos-latest
os: macos-12
rust: stable
target: x86_64-apple-darwin
- build: win-msvc x64
os: windows-2019
os: windows-2022
rust: stable
target: x86_64-pc-windows-msvc

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
target: ${{ matrix.target }}

- name: Install musl-tools
Expand All @@ -73,21 +71,21 @@ jobs:
run: cargo build --verbose --release --target ${{ matrix.target }}

- name: Strip release binary (unix)
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2022'
run: strip "target/${{ matrix.target }}/release/bandwhich"

- name: Tar release (unix)
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2022'
working-directory: ./target/${{ matrix.target }}/release
run: tar cvfz bandwhich-v${{ github.event.release.tag_name }}-${{matrix.target}}.tar.gz "bandwhich"

- name: Zip Windows release
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-2022'
working-directory: ./target/${{ matrix.target }}/release
run: tar.exe -a -c -f bandwhich-v${{ github.event.release.tag_name }}-${{matrix.target}}.zip "bandwhich.exe"

- name: Upload release archive (linux)
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2022'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -98,7 +96,7 @@ jobs:
asset_content_type: application/octet-stream

- name: Upload Windows release archive
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-2022'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ target/
vendor/
vendor.tar
**/*.rs.bk
/.idea

# Debian support

Expand All @@ -11,4 +12,4 @@ debian/*
!debian/control
!debian/copyright
!debian/rules
!debian/source
!debian/source
Loading