Skip to content

Commit 2adb14f

Browse files
committed
shadowsocks-rust for mips/mipsel
Signed-off-by: sbwml <admin@cooluc.com>
0 parents  commit 2adb14f

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/build-release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build Releases
2+
on:
3+
watch:
4+
types: started
5+
repository_dispatch:
6+
types: build
7+
8+
permissions:
9+
contents: write
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build-cross:
16+
runs-on: ubuntu-latest
17+
env:
18+
RUST_BACKTRACE: full
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
target:
23+
- mips-unknown-linux-musl
24+
- mipsel-unknown-linux-musl
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Install Rust
30+
run: |
31+
bash <(curl --proto '=https' --tlsv1.2 -sS ${{ secrets.rustup }}) ${{ matrix.target }}
32+
33+
- name: Install cross
34+
run: cargo install cross
35+
36+
- name: Build ${{ matrix.target }}
37+
timeout-minutes: 120
38+
run: |
39+
git clone https://github.com/shadowsocks/shadowsocks-rust
40+
cd shadowsocks-rust
41+
shadowsocks_version="$(git describe --tags `git rev-list --tags --max-count=1`)"
42+
echo shadowsocks_version="$shadowsocks_version" >> "$GITHUB_ENV"
43+
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
44+
cd build
45+
./build-release -t ${{ matrix.target }} -f 'local-redir,local-tun'
46+
cd release
47+
sha256sum shadowsocks-$shadowsocks_version.${{ matrix.target }}.tar.xz > shadowsocks-$shadowsocks_version.${{ matrix.target }}.tar.xz.sha256
48+
49+
- name: Upload artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: shadowsocks-${{ env.shadowsocks_version }}.${{ matrix.target }}
53+
path: shadowsocks-rust/build/release/shadowsocks-${{ env.shadowsocks_version }}.${{ matrix.target }}.tar.xz
54+
55+
- name: Create release
56+
continue-on-error: true
57+
uses: ncipollo/release-action@v1
58+
with:
59+
name: ${{ env.shadowsocks_version }}
60+
allowUpdates: true
61+
replacesArtifacts: true
62+
commit: main
63+
tag: ${{ env.shadowsocks_version }}
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# shadowsocks-rust for mips/mipsel

0 commit comments

Comments
 (0)