forked from JohanChane/clashtui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9878187
commit 0c77be9
Showing
12 changed files
with
100 additions
and
249 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
This file was deleted.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
target | ||
artifacts | ||
.vscode | ||
.local | ||
.local |
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
mode: rule | ||
mixed-port: 7890 | ||
allow-lan: false | ||
log-level: debug | ||
ipv6: true | ||
|
||
secret: test | ||
external-controller: 127.0.0.1:9090 |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
[env] | ||
# use for build arm64 in docker | ||
CROSS_CONTAINER_IN_CONTAINER = true | ||
|
||
|
||
[tasks.ci] | ||
dependencies = ["setup_mihomo", "ci-flow"] | ||
script = ["rm mihomo", "rm Doc/clash_test/cache.db"] | ||
|
||
[tasks.setup_mihomo.windows] | ||
script = ''' | ||
curl --output mihomo.zip -L https://github.com/MetaCubeX/mihomo/releases/download/v1.18.4/mihomo-windows-amd64-v1.18.4.zip | ||
7z x mihomo.zip | ||
mihomo-windows-amd64.exe -d Doc/clash_test -f Doc/clash_test/config.yaml & | ||
''' | ||
[tasks.setup_mihomo.linux] | ||
script = ''' | ||
curl --output mihomo.gz -L https://github.com/MetaCubeX/mihomo/releases/download/v1.18.4/mihomo-linux-amd64-v1.18.4.gz | ||
gunzip mihomo.gz | ||
chmod +x mihomo | ||
nohup ./mihomo -d Doc/clash_test -f Doc/clash_test/config.yaml > /dev/null & | ||
''' | ||
|
||
|
||
[tasks.release.windows] | ||
dependencies = ["clear-artifacts", "amd64"] | ||
script_runner = "@shell" | ||
script = [ | ||
"mkdir artifacts", | ||
"cp target/release/clashtui.exe artifacts/clashtui.release.exe", | ||
"cp target/debug/clashtui.exe artifacts/clashtui.debug.exe", | ||
] | ||
[tasks.release.linux] | ||
dependencies = ["clear-artifacts", "arm64", "amd64", "build_deb"] | ||
script = ''' | ||
mkdir artifacts | ||
cp target/debian/*.deb artifacts/clashtui.deb | ||
cp target/release/clashtui artifacts/clashtui.release | ||
cp target/debug/clashtui artifacts/clashtui.debug | ||
cp target/aarch64-unknown-linux-gnu/release/clashtui artifacts/clashtui.arm64.release | ||
cp target/aarch64-unknown-linux-gnu/debug/clashtui artifacts/clashtui.arm64.debug | ||
''' | ||
|
||
[tasks.clear-artifacts] | ||
script_runner = "@shell" | ||
script = ["rm -r artifacts"] | ||
|
||
[tasks.build_deb] | ||
install_crate = "cargo-deb" | ||
command = "cargo" | ||
args = ["deb", "--", "--bin", "clashtui", "--all-features"] | ||
|
||
[tasks.arm64] | ||
install_crate = "cross" | ||
script = ''' | ||
cross build --bin clashtui --all-features --target=aarch64-unknown-linux-gnu | ||
cross build --bin clashtui --all-features --release --target=aarch64-unknown-linux-gnu | ||
''' | ||
|
||
[tasks.amd64] | ||
script = ''' | ||
cargo build --bin clashtui --all-features | ||
cargo build --bin clashtui --all-features --release | ||
''' |
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.