Skip to content

Commit

Permalink
shadowsocks-rust for mips/mipsel
Browse files Browse the repository at this point in the history
Signed-off-by: sbwml <admin@cooluc.com>
  • Loading branch information
sbwml committed Feb 28, 2024
0 parents commit 2adb14f
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Releases
on:
watch:
types: started
repository_dispatch:
types: build

permissions:
contents: write

env:
CARGO_TERM_COLOR: always

jobs:
build-cross:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
strategy:
fail-fast: false
matrix:
target:
- mips-unknown-linux-musl
- mipsel-unknown-linux-musl

steps:
- uses: actions/checkout@v4

- name: Install Rust
run: |
bash <(curl --proto '=https' --tlsv1.2 -sS ${{ secrets.rustup }}) ${{ matrix.target }}
- name: Install cross
run: cargo install cross

- name: Build ${{ matrix.target }}
timeout-minutes: 120
run: |
git clone https://github.com/shadowsocks/shadowsocks-rust
cd shadowsocks-rust
shadowsocks_version="$(git describe --tags `git rev-list --tags --max-count=1`)"
echo shadowsocks_version="$shadowsocks_version" >> "$GITHUB_ENV"
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
cd build
./build-release -t ${{ matrix.target }} -f 'local-redir,local-tun'
cd release
sha256sum shadowsocks-$shadowsocks_version.${{ matrix.target }}.tar.xz > shadowsocks-$shadowsocks_version.${{ matrix.target }}.tar.xz.sha256
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: shadowsocks-${{ env.shadowsocks_version }}.${{ matrix.target }}
path: shadowsocks-rust/build/release/shadowsocks-${{ env.shadowsocks_version }}.${{ matrix.target }}.tar.xz

- name: Create release
continue-on-error: true
uses: ncipollo/release-action@v1
with:
name: ${{ env.shadowsocks_version }}
allowUpdates: true
replacesArtifacts: true
commit: main
tag: ${{ env.shadowsocks_version }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: shadowsocks-rust/build/release/shadowsocks-${{ env.shadowsocks_version }}.${{ matrix.target }}.tar.xz,shadowsocks-rust/build/release/shadowsocks-${{ env.shadowsocks_version }}.${{ matrix.target }}.tar.xz.sha256
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# shadowsocks-rust for mips/mipsel

0 comments on commit 2adb14f

Please sign in to comment.