mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 12:47:25 +08:00
@@ -1,4 +1,7 @@
|
|||||||
[target.aarch64-unknown-linux-gnu]
|
[target.aarch64-unknown-linux-gnu]
|
||||||
linker = "aarch64-linux-gnu-gcc"
|
linker = "aarch64-linux-gnu-gcc"
|
||||||
|
[target.aarch64-unknown-linux-musl]
|
||||||
|
linker = "aarch64-linux-musl-gcc"
|
||||||
|
rustflags = ["-C", "target-feature=+crt-static"]
|
||||||
[target.'cfg(all(windows, target_env = "msvc"))']
|
[target.'cfg(all(windows, target_env = "msvc"))']
|
||||||
rustflags = ["-C", "target-feature=+crt-static"]
|
rustflags = ["-C", "target-feature=+crt-static"]
|
||||||
|
|||||||
45
.github/workflows/rust.yml
vendored
45
.github/workflows/rust.yml
vendored
@@ -19,22 +19,20 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# a list of all the targets
|
|
||||||
# 选择使用openssl或者ring,并不是所有平台都支持
|
|
||||||
include:
|
include:
|
||||||
- TARGET: i686-unknown-linux-musl # test in an alpine container on a mac
|
- TARGET: aarch64-unknown-linux-musl
|
||||||
OS: ubuntu-latest
|
OS: ubuntu-latest
|
||||||
- TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac
|
- TARGET: x86_64-unknown-linux-musl
|
||||||
OS: ubuntu-latest
|
OS: ubuntu-latest
|
||||||
- TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings
|
- TARGET: x86_64-apple-darwin
|
||||||
OS: macos-latest
|
OS: macos-latest
|
||||||
- TARGET: aarch64-apple-darwin # tested on a mac, is not properly signed so there are security warnings
|
- TARGET: aarch64-apple-darwin
|
||||||
OS: macos-latest
|
OS: macos-latest
|
||||||
- TARGET: x86_64-pc-windows-msvc # tested on a windows machine
|
- TARGET: x86_64-pc-windows-msvc
|
||||||
OS: windows-latest
|
OS: windows-latest
|
||||||
runs-on: ${{ matrix.OS }}
|
runs-on: ${{ matrix.OS }}
|
||||||
env:
|
env:
|
||||||
NAME: easytier # change with the name of your project
|
NAME: easytier
|
||||||
TARGET: ${{ matrix.TARGET }}
|
TARGET: ${{ matrix.TARGET }}
|
||||||
OS: ${{ matrix.OS }}
|
OS: ${{ matrix.OS }}
|
||||||
steps:
|
steps:
|
||||||
@@ -53,6 +51,37 @@ jobs:
|
|||||||
key: build-cargo-registry-${{matrix.TARGET}}
|
key: build-cargo-registry-${{matrix.TARGET}}
|
||||||
- name: Install rust target
|
- name: Install rust target
|
||||||
run: |
|
run: |
|
||||||
|
# dependencies are only needed on ubuntu as that's the only place where
|
||||||
|
# we make cross-compilation
|
||||||
|
if [[ $OS =~ ^ubuntu.*$ ]]; then
|
||||||
|
sudo apt-get update && sudo apt-get install -qq crossbuild-essential-arm64 crossbuild-essential-armhf musl-tools
|
||||||
|
# curl -s musl.cc | grep mipsel
|
||||||
|
case $TARGET in
|
||||||
|
mipsel-unknown-linux-musl)
|
||||||
|
MUSL_URI=mipsel-linux-musl-cross
|
||||||
|
;;
|
||||||
|
aarch64-unknown-linux-musl)
|
||||||
|
MUSL_URI=aarch64-linux-musl-cross
|
||||||
|
;;
|
||||||
|
armv7-unknown-linux-musleabihf)
|
||||||
|
MUSL_URI=armv7l-linux-musleabihf-cross
|
||||||
|
;;
|
||||||
|
arm-unknown-linux-musleabihf)
|
||||||
|
MUSL_URI=arm-linux-musleabihf-cross
|
||||||
|
;;
|
||||||
|
mips-unknown-linux-musl)
|
||||||
|
MUSL_URI=mips-linux-musl-cross
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -n "$MUSL_URI" ]; then
|
||||||
|
mkdir -p ./musl_gcc
|
||||||
|
wget -c https://musl.cc/$MUSL_URI.tgz -P ./musl_gcc/
|
||||||
|
tar zxf ./musl_gcc/$MUSL_URI.tgz -C ./musl_gcc/
|
||||||
|
sudo ln -s $(pwd)/musl_gcc/$MUSL_URI/bin/*gcc /usr/bin/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
rustup install 1.75
|
rustup install 1.75
|
||||||
rustup default 1.75
|
rustup default 1.75
|
||||||
rustup target add $TARGET
|
rustup target add $TARGET
|
||||||
|
|||||||
Reference in New Issue
Block a user