diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000000..7847868a9b --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.mips64-unknown-linux-muslabi64] +rustflags = ["-C", "link-arg=-lgcc"] + +[target.mips64el-unknown-linux-muslabi64] +rustflags = ["-C", "link-arg=-lgcc"] diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index aeedee3b30..5c13e38ed7 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -115,7 +115,6 @@ jobs: file: target/${{ matrix.platform.target }}/release/aliyundrive-webdav.zip tag: ${{ github.ref }} - linux: runs-on: ubuntu-latest strategy: @@ -172,6 +171,47 @@ jobs: file: target/${{ matrix.platform.target }}/release/aliyundrive-webdav.tar.gz tag: ${{ github.ref }} + linux-openssl: + 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" }, + ] + container: + image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }} + steps: + - uses: actions/checkout@v2 + - name: Build + 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 + - name: Upload binary artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.platform.target }}-bin + path: target/${{ matrix.platform.target }}/release/aliyundrive-webdav + - name: Archive binary + run: | + cd target/${{ matrix.platform.target }}/release + tar czvf aliyundrive-webdav.tar.gz aliyundrive-webdav + cd - + - name: Upload binary to GitHub Release + uses: svenstaro/upload-release-action@v2 + if: "startsWith(github.ref, 'refs/tags/')" + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + asset_name: aliyundrive-webdav-${{ matrix.platform.target }}.tar.gz + file: target/${{ matrix.platform.target }}/release/aliyundrive-webdav.tar.gz + tag: ${{ github.ref }} + openwrt: name: OpenWrt Package - ${{ matrix.target.cpu }} runs-on: ubuntu-latest