[ios-xray] Build Xray support #274
Workflow file for this run
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
name: win-mac-linux-ss | |
on: [push] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
Build-ShadowSocks-Linux: | |
name: 'Build-Libs-Linux-Ubuntu' | |
runs-on: ubuntu-latest | |
if: | | |
contains(github.event.head_commit.message, '[all]') || | |
contains(github.event.head_commit.message, '[linux]') || | |
contains(github.event.head_commit.message, '[linux-shadowsocks]') || | |
contains(github.event.head_commit.message, '[shadowsocks]') | |
env: | |
RUST_BACKTRACE: full | |
strategy: | |
matrix: | |
target: | |
- i686-unknown-linux-musl | |
- x86_64-pc-windows-gnu | |
- x86_64-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
- armv7-unknown-linux-musleabihf | |
- armv7-unknown-linux-gnueabihf | |
- arm-unknown-linux-gnueabi | |
- arm-unknown-linux-gnueabihf | |
- arm-unknown-linux-musleabi | |
- arm-unknown-linux-musleabihf | |
- aarch64-unknown-linux-gnu | |
- aarch64-unknown-linux-musl | |
- mips-unknown-linux-musl | |
- mips-unknown-linux-gnu | |
- mipsel-unknown-linux-musl | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Get ShadowSocks' | |
uses: actions/checkout@v3 | |
with: | |
repository: shadowsocks/shadowsocks-rust | |
ref: master | |
path: shadowsocks-rust | |
- name: Install Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install stable | |
rustup default stable | |
rustup override set stable | |
rustup target add --toolchain stable ${{ matrix.target }} | |
- name: Install cross | |
run: cargo install cross | |
- name: Build ${{ matrix.target }} | |
timeout-minutes: 120 | |
working-directory: shadowsocks-rust | |
run: | | |
compile_target=${{ matrix.target }} | |
if [[ "$compile_target" == *"-linux-"* || "$compile_target" == *"-apple-"* ]]; then | |
compile_features="-f local-redir -f local-tun" | |
fi | |
if [[ "$compile_target" == "mips-"* || "$compile_target" == "mipsel-"* || "$compile_target" == "mips64-"* || "$compile_target" == "mips64el-"* ]]; then | |
sudo apt-get update -y && sudo apt-get install -y upx; | |
if [[ "$?" == "0" ]]; then | |
compile_compress="-u" | |
fi | |
fi | |
cd build | |
./build-release -t ${{ matrix.target }} $compile_features $compile_compress | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ss-linux | |
path: shadowsocks-rust/build/release/* | |
build-unix: | |
runs-on: ${{ matrix.os }} | |
if: | | |
contains(github.event.head_commit.message, '[all]') || | |
contains(github.event.head_commit.message, '[macos]') || | |
contains(github.event.head_commit.message, '[macos-shadowsocks]') || | |
contains(github.event.head_commit.message, '[shadowsocks]') | |
env: | |
BUILD_EXTRA_FEATURES: "local-redir local-tun" | |
RUST_BACKTRACE: full | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, macos-latest] | |
os: [macos-latest] | |
target: | |
- x86_64-apple-darwin | |
- aarch64-apple-darwin | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Get ShadowSocks' | |
uses: actions/checkout@v3 | |
with: | |
repository: shadowsocks/shadowsocks-rust | |
ref: master | |
path: shadowsocks-rust | |
- name: Install GNU tar | |
if: runner.os == 'macOS' | |
run: | | |
brew install gnu-tar | |
# echo "::add-path::/usr/local/opt/gnu-tar/libexec/gnubin" | |
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH | |
- name: Install Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install stable | |
rustup default stable | |
rustup override set stable | |
rustup target add --toolchain stable ${{ matrix.target }} | |
- name: Build release | |
shell: bash | |
working-directory: shadowsocks-rust | |
run: | | |
./build/build-host-release -t ${{ matrix.target }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ss-macos | |
path: shadowsocks-rust/build/release/* | |
build-windows: | |
runs-on: windows-latest | |
if: | | |
contains(github.event.head_commit.message, '[all]') || | |
contains(github.event.head_commit.message, '[windows]') || | |
contains(github.event.head_commit.message, '[windows-shadowsocks]') || | |
contains(github.event.head_commit.message, '[shadowsocks]') | |
env: | |
RUSTFLAGS: "-C target-feature=+crt-static" | |
RUST_BACKTRACE: full | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Get ShadowSocks' | |
uses: actions/checkout@v3 | |
with: | |
repository: shadowsocks/shadowsocks-rust | |
ref: master | |
path: shadowsocks-rust | |
- name: Install Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install stable | |
rustup default stable | |
rustup override set stable | |
- name: Build release | |
working-directory: shadowsocks-rust | |
run: | | |
pwsh ./build/build-host-release.ps1 | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ss-windows | |
path: shadowsocks-rust/build/release/* | |
github-release-windows: | |
name: GitHub Release | |
needs: build-windows | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v2 | |
- name: Setup | Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Setup | Checksums | |
run: for file in $(find ./ -name '*.so' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done | |
- name: Zip ALL | |
run: for file in *; do zip -r ${file%.*}.zip $file; done | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ss-windows.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |
github-release-unix: | |
name: GitHub Release | |
needs: build-unix | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v2 | |
- name: Setup | Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Setup | Checksums | |
run: for file in $(find ./ -name '*.so' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done | |
- name: Zip ALL | |
run: for file in *; do zip -r ${file%.*}.zip $file; done | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ss-macos.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |
github-release-linux: | |
name: GitHub Release | |
needs: Build-ShadowSocks-Linux | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v2 | |
- name: Setup | Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Setup | Checksums | |
run: for file in $(find ./ -name '*.so' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done | |
- name: Zip ALL | |
run: for file in *; do zip -r ${file%.*}.zip $file; done | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ss-linux.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |