Skip to content

Commit

Permalink
increamental file
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Aug 27, 2024
1 parent 1842525 commit 6bde77c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 28 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ jobs:
- name: Build emsdk extra
working-directory: /opt/python-wasm-sdk
run: |
bash ./scripts/emsdk-extra.sh
bash ./build.sh
- name: Build WASM extra index and packages
- name: Package extra
run: |
bash ./build.sh
bash ./pack.sh
- name: publish web index
Expand Down
29 changes: 5 additions & 24 deletions build.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
#!/bin/bash

. /etc/lsb-release
export DISTRIB="${DISTRIB_ID}-${DISTRIB_RELEASE}"
export SDKROOT=${SDKROOT:-/opt/python-wasm-sdk}
export CIVER=${CIVER:-$DISTRIB}
if cd /opt/python-wasm-sdk
then
find . -type f > sdk.base
. scripts/emsdk-extra.sh
fi

TAG=emsdk

echo "making sdk-extra $TAG tarball" 1>&2

pushd /
mkdir -p /tmp/sdk
tar -cpPR \
${SDKROOT}/config \
${SDKROOT}/python3-was? \
${SDKROOT}/wasm32-*-shell.sh \
${SDKROOT}/*sdk \
${SDKROOT}/scripts/*sdk-fetch.sh \
${SDKROOT}/devices/* \
${SDKROOT}/prebuilt/* \
> /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar

lz4 -c --favor-decSpeed --best /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar \
> /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar.lz4

echo "done" 1>&2
popd
40 changes: 40 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

. /etc/lsb-release
export DISTRIB="${DISTRIB_ID}-${DISTRIB_RELEASE}"
export SDKROOT=${SDKROOT:-/opt/python-wasm-sdk}
export CIVER=${CIVER:-$DISTRIB}

TAG=emsdk

pushd /opt/python-wasm-sdk
echo "Removing $(wc -l sdk.base) files belonging to SDK"
for sdkfile in $(cat sdk.base)
do
rm $f
done
popd

echo "Making sdk-extra $TAG tarball" 1>&2


pushd /
mkdir -p /tmp/sdk
tar -cpPR \
${SDKROOT}/config \
${SDKROOT}/python3-was? \
${SDKROOT}/wasm32-*-shell.sh \
${SDKROOT}/*sdk \
${SDKROOT}/scripts/*sdk-fetch.sh \
${SDKROOT}/devices/* \
${SDKROOT}/prebuilt/* \
> /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar

lz4 -c --favor-decSpeed --best /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar \
> /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar.lz4

du -hs /tmp/sdk/*

rm /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar
echo "done" 1>&2
popd

0 comments on commit 6bde77c

Please sign in to comment.