Skip to content

Commit

Permalink
chore(ver): update & add build action
Browse files Browse the repository at this point in the history
  • Loading branch information
yinheli committed Aug 31, 2022
1 parent 5a4c0b1 commit 3d78cb3
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 19 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master

workflow_dispatch:

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10

jobs:
github_build:
name: Build release binaries
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest

- target: i686-unknown-linux-musl
os: ubuntu-latest

- target: aarch64-unknown-linux-musl
os: ubuntu-latest

- target: arm-unknown-linux-musleabi
os: ubuntu-latest

- target: armv7-unknown-linux-musleabi
os: ubuntu-latest

# - target: mips-unknown-linux-musl
# os: ubuntu-latest

# - target: mipsel-unknown-linux-musl
# os: ubuntu-latest

- target: x86_64-apple-darwin
os: macOS-11

- target: aarch64-apple-darwin
os: macOS-11

runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Setup | Checkout
uses: actions/checkout@v3

- name: Setup | Rust
uses: actions-rs/[email protected]
with:
toolchain: nightly
override: true
profile: minimal
target: ${{ matrix.target }}

- name: Test
run: cargo test --benches -- --nocapture

- name: Build | Build
uses: actions-rs/[email protected]
with:
command: build
args: --release --locked --target ${{ matrix.target }}
use-cross: ${{ matrix.os == 'ubuntu-latest' }}
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
os: ubuntu-latest
name: kungfu-armv7-unknown-linux-musleabi.tar.gz

- target: mips-unknown-linux-musl
os: ubuntu-latest
name: kungfu-mips-unknown-linux-musl.tar.gz
# - target: mips-unknown-linux-musl
# os: ubuntu-latest
# name: kungfu-mips-unknown-linux-musl.tar.gz

- target: mipsel-unknown-linux-musl
os: ubuntu-latest
name: kungfu-mipsel-unknown-linux-musl.tar.gz
# - target: mipsel-unknown-linux-musl
# os: ubuntu-latest
# name: kungfu-mipsel-unknown-linux-musl.tar.gz

- target: x86_64-apple-darwin
os: macOS-11
Expand Down
13 changes: 6 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kungfu"
version = "0.1.3"
version = "0.1.4"
edition = "2021"
authors = ["yinheli <[email protected]>"]
keywords = ["dns", "proxy"]
Expand Down Expand Up @@ -31,16 +31,16 @@ lru = "0.7"
glob = "0.3.0"
rayon = "1"
tun = { version = "0.5", features = ["async"] }
# tun = { git = "https://github.com/meh/rust-tun.git", branch = "master", features = [
# "async",
# ] }
futures = "0.3"
bytes = "1"
pnet = "0.31"
fast-socks5 = "0.8"
rand = "0.8"
url = "2"
prometheus = { version = "0.13", features = ["process"] }
# prometheus = { version = "0.13", features = ["process"] }
prometheus = { version = "0.13", features = [
"process",
], git = "https://github.com/tikv/rust-prometheus.git", branch = "master" }
hyper = { version = "0.14", features = ["full"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/config/hosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mod tests {
# like /etc/hosts but add CNAME support
192.168.1.20 my-app.com # this is end line comment
cdn.my-app.com.a.bdydns.com. cdn.my-app.com
192.168.8.20 *-dev.app.com # glob express
";

Expand Down

0 comments on commit 3d78cb3

Please sign in to comment.