Skip to content

Commit

Permalink
Build for 32-bit arm and mips platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Sep 10, 2021
1 parent 3d6bd73 commit ea02c38
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 33 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,28 +171,34 @@ jobs:
file: target/${{ matrix.platform.target }}/release/aliyundrive-webdav.tar.gz
tag: ${{ github.ref }}

linux-openssl:
linux-others:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [
# { target: "mips-unknown-linux-musl", image_tag: "mips-musl" },
# { target: "mipsel-unknown-linux-musl", image_tag: "mipsel-musl" },
{ target: "mips64-unknown-linux-muslabi64", image_tag: "mips64-muslabi64" },
{ target: "mips64el-unknown-linux-muslabi64", image_tag: "mips64el-muslabi64" },
]
platform:
- target: "armv5te-unknown-linux-musleabi"
image_tag: "armv5te-musleabi"
cargo_extra_args: --no-default-features --features rustls-tls
- target: "mips-unknown-linux-musl"
image_tag: "mips-musl"
cargo_extra_args: --no-default-features --features native-tls-vendored
- target: "mipsel-unknown-linux-musl"
image_tag: "mipsel-musl"
cargo_extra_args: --no-default-features --features native-tls-vendored
container:
image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }}
steps:
- uses: actions/checkout@v2
- name: Build
env:
RUSTFLAGS: -C target-feature=+crt-static -C link-arg=-s
run: |
cargo build --release --target ${{ matrix.platform.target }} --no-default-features --features native-tls-vendored
# - name: Upx compress binary
# uses: crazy-max/ghaction-upx@v1
# with:
# version: latest
# files: target/${{ matrix.platform.target }}/release/aliyundrive-webdav
cargo build --release --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo_extra_args }}
- name: Upx compress binary
uses: crazy-max/ghaction-upx@v1
with:
version: v3.95 # v3.96 breaks mipsel, https://github.com/upx/upx/issues/504
files: target/${{ matrix.platform.target }}/release/aliyundrive-webdav
- name: Upload binary artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
36 changes: 18 additions & 18 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bytes = "1.0.1"
futures-util = "0.3.16"
headers = "0.3.4"
hyper = { version = "0.14.11", features = ["server"] }
moka = { version = "0.5.1", features = ["future"] }
moka = { version = "0.5.3", default-features = false, features = ["future"] }
openssl-probe = { version = "0.1.4", optional = true }
percent-encoding = "2.1.0"
reqwest = { version = "0.11.4", default-features = false, features = ["json", "gzip"] }
Expand All @@ -30,10 +30,11 @@ url = "2.2.2"
webdav-handler = { version = "0.2.0", default-features = false, features = ["hyper"] }

[features]
default = ["rustls-tls"]
default = ["rustls-tls", "atomic64"]
rustls-tls = ["reqwest/rustls-tls"]
native-tls = ["reqwest/native-tls"]
native-tls-vendored = ["reqwest/native-tls-vendored", "openssl-probe"]
atomic64 = ["moka/atomic64"]

[patch.crates-io]
webdav-handler = { git = "https://github.com/messense/webdav-handler-rs.git", branch = "aliyundrive" }
Expand Down

0 comments on commit ea02c38

Please sign in to comment.