Skip to content

Commit

Permalink
支持更多架构
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthora committed Jun 12, 2024
1 parent 0f29636 commit 368007b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
workflow_dispatch:
release:
types: [ published ]
pull_request:
branches: [master]
paths:
- 'scripts/build-standalone.sh'
- 'scripts/standalone.json'

jobs:
configure:
Expand All @@ -20,6 +25,7 @@ jobs:
runs-on: ubuntu-latest
needs: configure
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
env:
WORKSPACE: "/opt"
Expand Down
4 changes: 4 additions & 0 deletions scripts/build-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ if [[ -z $TARGET || -z $TARGET_OPENSSL ]];then
if [[ "$CANDY_OS" == "linux" ]]; then
if [[ "$CANDY_ARCH" == "aarch64" ]]; then TARGET="aarch64-unknown-linux-musl";TARGET_OPENSSL="linux-aarch64";UPX=1
elif [[ "$CANDY_ARCH" == "arm" ]]; then TARGET="arm-unknown-linux-musleabi";TARGET_OPENSSL="linux-armv4";UPX=1
elif [[ "$CANDY_ARCH" == "armhf" ]]; then TARGET="arm-unknown-linux-musleabihf";TARGET_OPENSSL="linux-armv4";UPX=1
elif [[ "$CANDY_ARCH" == "loongarch64" ]]; then TARGET="loongarch64-unknown-linux-musl";TARGET_OPENSSL="linux64-loongarch64";UPX=0
elif [[ "$CANDY_ARCH" == "mips" ]]; then TARGET="mips-unknown-linux-musl";TARGET_OPENSSL="linux-mips32";UPX=1
elif [[ "$CANDY_ARCH" == "mipssf" ]]; then TARGET="mips-unknown-linux-muslsf";TARGET_OPENSSL="linux-mips32";UPX=1
elif [[ "$CANDY_ARCH" == "mipsel" ]]; then TARGET="mipsel-unknown-linux-musl";TARGET_OPENSSL="linux-mips32";UPX=1
elif [[ "$CANDY_ARCH" == "mipselsf" ]]; then TARGET="mipsel-unknown-linux-muslsf";TARGET_OPENSSL="linux-mips32";UPX=1
elif [[ "$CANDY_ARCH" == "mips64" ]]; then TARGET="mips64-unknown-linux-musl";TARGET_OPENSSL="linux64-mips64";UPX=0
elif [[ "$CANDY_ARCH" == "mips64el" ]]; then TARGET="mips64el-unknown-linux-musl";TARGET_OPENSSL="linux64-mips64";UPX=0
elif [[ "$CANDY_ARCH" == "riscv32" ]]; then TARGET="riscv32-unknown-linux-musl";TARGET_OPENSSL="linux32-riscv32";UPX=0
elif [[ "$CANDY_ARCH" == "riscv64" ]]; then TARGET="riscv64-unknown-linux-musl";TARGET_OPENSSL="linux64-riscv64";UPX=0
elif [[ "$CANDY_ARCH" == "x86_64" ]]; then TARGET="x86_64-multilib-linux-musl";TARGET_OPENSSL="linux-x86_64";UPX=1
else echo "Unknown CANDY_ARCH: $CANDY_ARCH";exit 1;fi
Expand Down
16 changes: 16 additions & 0 deletions scripts/standalone.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"os": "linux",
"arch": "arm"
},
{
"os": "linux",
"arch": "armhf"
},
{
"os": "linux",
"arch": "loongarch64"
Expand All @@ -28,6 +32,18 @@
"os": "linux",
"arch": "mipselsf"
},
{
"os": "linux",
"arch": "mips64"
},
{
"os": "linux",
"arch": "mips64el"
},
{
"os": "linux",
"arch": "riscv32"
},
{
"os": "linux",
"arch": "riscv64"
Expand Down

0 comments on commit 368007b

Please sign in to comment.