Skip to content

Commit

Permalink
static: create bundles
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Mar 30, 2022
1 parent 8a26967 commit 059e8f9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ jobs:
- darwin-arm64
- windows-amd64
steps:
-
name: Prepare
run: |
platform=${{ matrix.platform }}
echo "TARGETPLATFORM=${platform//-/\/}" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v3
Expand All @@ -60,10 +55,14 @@ jobs:
run: |
make static-${{ matrix.platform }}
-
name: Upload static packages
name: List files
run: |
tree -nh ./static/build
-
name: Upload static bundle
uses: actions/upload-artifact@v2
with:
name: static-${{ matrix.platform }}
path: static/build/${{ env.TARGETPLATFORM }}/*.*
path: static/build/*.tar.gz
if-no-files-found: error
retention-days: 7
40 changes: 40 additions & 0 deletions scripts/target-platform
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,43 @@ if [ -z "$TARGETARCH" ]; then
TARGETPLATFORM="$TARGETPLATFORM/$TARGETVARIANT"
fi
fi

# bundle arch
case "$TARGETARCH$TARGETVARIANT" in
"amd64")
BUNDLEARCH="x86_64"
;;
"386")
BUNDLEARCH="i386"
;;
"arm64")
BUNDLEARCH="aarch64"
;;
"armv7")
BUNDLEARCH="armhf"
;;
"armv6")
BUNDLEARCH="armel"
;;
"riscv64")
BUNDLEARCH="riscv64"
;;
"ppc64le")
BUNDLEARCH="ppc64le"
;;
"s390x")
BUNDLEARCH="s390x"
;;
"mips")
BUNDLEARCH="mips"
;;
"mipsle")
BUNDLEARCH="mipsle"
;;
"mips64")
BUNDLEARCH="mips64"
;;
"mips64le")
BUNDLEARCH="mips64le"
;;
esac
8 changes: 8 additions & 0 deletions static/build-static
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,11 @@ case ${TARGETOS} in
)
;;
esac

# create bundle
(
set -x
cd "${buildDir}"
rm -r */
tar -zvcf "${CURDIR}/build/bundles-ce-static-${TARGETOS}-${BUNDLEARCH}.tar.gz" .
)

0 comments on commit 059e8f9

Please sign in to comment.