-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-build.sh
More file actions
30 lines (23 loc) · 798 Bytes
/
Copy pathdocker-build.sh
File metadata and controls
30 lines (23 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -euo pipefail
source /emsdk/emsdk_env.sh
SRC_DIR="/app/micropython/ports/webassembly"
BUILD_DIR="$SRC_DIR/build-standard"
OUT_DIR="/app/micropython-build"
if [ ! -d "$SRC_DIR" ]; then
echo "error: $SRC_DIR not found." >&2
echo "Did you run 'git submodule update --init --recursive' on the host," >&2
echo "and mount the repo with -v \"\$(pwd)\":/app ?" >&2
exit 1
fi
cd "$SRC_DIR"
make
if [ ! -d "$BUILD_DIR" ]; then
echo "error: expected build output at $BUILD_DIR but it doesn't exist." >&2
echo "MicroPython may have renamed its build directory - check the 'make' output above." >&2
exit 1
fi
rm -rf "$OUT_DIR"
mkdir -p "$OUT_DIR"
cp -r "$BUILD_DIR/." "$OUT_DIR/"
echo "Done. Output copied to micropython-build/ (same location the GitHub Action writes to)."