Skip to content

Commit

Permalink
ci: use vendored openssl only when cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
wangl-cc committed Dec 10, 2023
1 parent c148836 commit 80b743b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 129 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
if: inputs.arch == 'aarch64'
shell: bash
run: rustup target add $CARGO_BUILD_TARGET
- name: Cross Compile Dependencies (Linux)
- name: Cross Compile Dependencies (Linux x86_64 to Linux aarch64)
if: inputs.arch == 'aarch64' && startsWith(inputs.os, 'ubuntu')
shell: bash
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
cargo build --package maa-cli --locked
- name: Lint (clippy)
run: |
cargo clippy --all-targets --all-features -- -D warnings
cargo clippy -- -D warnings
- name: Lint (rustfmt)
run: |
cargo fmt --all -- --check
Expand Down Expand Up @@ -111,13 +111,12 @@ jobs:
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
cargo build --package maa-cli --locked \
--no-default-features \
--features git2-vendored-openssl,git2-vendored-libgit2,reqwest_rustls_tls,cli_installer,core_installer,git2
--features git2/vendored-openssl,reqwest/native-tls-vendored
- name: Build (macOS)
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
cargo build --package maa-cli --locked \
--features git2-vendored-openssl,git2-vendored-libgit2
--features git2/vendored-openssl
features:
name: Build and Test (no default features)
Expand Down
113 changes: 0 additions & 113 deletions Cargo.lock

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

12 changes: 1 addition & 11 deletions maa-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository.workspace = true
license.workspace = true

[features]
default = ["cli_installer", "core_installer", "git2", "reqwest_native_tls"]
default = ["cli_installer", "core_installer", "git2"]

# Features used to install and update MAA Core
core_installer = ["__installer"]
Expand All @@ -31,15 +31,6 @@ __installer = [
"reqwest/stream",
]

# TLS backend used by reqwest (no default, must choose one when build)
reqwest_native_tls = ["reqwest/native-tls"]
reqwest_native_tls_vendored = ["reqwest/native-tls-vendored"]
reqwest_rustls_tls = ["reqwest/rustls-tls"]

# Use vendored libgit2 and openssl of git2-rs
git2-vendored-libgit2 = ["git2/vendored-libgit2"]
git2-vendored-openssl = ["git2/vendored-openssl"]

[[bin]]
name = "maa"
path = "src/main.rs"
Expand Down Expand Up @@ -96,7 +87,6 @@ features = ["rt"]

[dependencies.reqwest]
version = "0.11"
default-features = false
features = ["blocking", "json"]

[dev-dependencies]
Expand Down

0 comments on commit 80b743b

Please sign in to comment.