From f7bd944b2167062d5fddbb9efeea7fe1fc00a607 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Tue, 10 Dec 2024 00:21:22 +0800 Subject: [PATCH] fix: target --- .github/workflows/build.yml | 45 +++++++++++++++++++++++-------------- script/build.config.sh | 10 --------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf79c93..2abcdbf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,29 +13,40 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: - get-targets: - name: Get all targets - runs-on: ubuntu-latest - outputs: - targets: ${{ steps.get-targets.outputs.targets }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Get targets - id: get-targets - uses: zijiren233/go-build-action@v1 - with: - show-all-targets: true - build-targets: name: Build runs-on: ubuntu-latest - needs: get-targets strategy: fail-fast: false matrix: - target: ${{ fromJson(needs.get-targets.outputs.targets) }} + target: + - linux/386 + - linux/amd64 + - linux/arm + - linux/arm64 + - linux/loong64 + - linux/ppc64le + - linux/riscv64 + - linux/s390x + - darwin/amd64 + - darwin/arm64 + - windows/386 + - windows/amd64 + - windows/arm + - windows/arm64 + - freebsd/386 + - freebsd/amd64 + - freebsd/arm + - freebsd/arm64 + - freebsd/riscv64 + - openbsd/386 + - openbsd/amd64 + - openbsd/arm + - openbsd/arm64 + - netbsd/386 + - netbsd/amd64 + - netbsd/arm + - netbsd/arm64 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/script/build.config.sh b/script/build.config.sh index d693438..f5a5124 100644 --- a/script/build.config.sh +++ b/script/build.config.sh @@ -38,16 +38,6 @@ function printDepEnvHelp() { echo -e " ${COLOR_LIGHT_GREEN}SKIP_INIT_WEB${COLOR_RESET} - Skip initializing the web dependency (set to any non-empty value to enable)" } -function initDepTargets() { - clearAllowedTargets - - addAllowedTargets "linux/386,linux/amd64,linux/arm,linux/arm64,linux/loong64,linux/ppc64le,linux/riscv64,linux/s390x" - addAllowedTargets "darwin/amd64,darwin/arm64" - addAllowedTargets "windows/386,windows/amd64" - - addAllowedTargets "${GOHOSTOS}/${GOHOSTARCH}" -} - function initDep() { setDefault "VERSION" "dev" VERSION="$(echo "$VERSION" | sed 's/ //g' | sed 's/"//g' | sed 's/\n//g')"