|
4 | 4 |
|
5 | 5 | OPTIND=1
|
6 | 6 |
|
7 |
| -# For default registry. |
| 7 | +# For default registry and number of cores. |
8 | 8 | if [ ! -e config.sh ]; then
|
9 | 9 | echo "No config.sh, copying default values from config.sh.in."
|
10 | 10 | cp config.sh.in config.sh
|
11 | 11 | fi
|
12 | 12 | source ./config.sh
|
13 | 13 |
|
| 14 | +if [ -z "${NUM_CORES}" ]; then |
| 15 | + export NUM_CORES=16 |
| 16 | +fi |
| 17 | + |
14 | 18 | registry="${REGISTRY}"
|
15 | 19 | username=""
|
16 | 20 | password=""
|
@@ -123,35 +127,37 @@ export basedir="$(pwd)"
|
123 | 127 | mkdir -p ${basedir}/out
|
124 | 128 | mkdir -p ${basedir}/out/logs
|
125 | 129 |
|
| 130 | +export podman_run="${podman} run -it --rm --env NUM_CORES -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/" |
| 131 | + |
126 | 132 | mkdir -p ${basedir}/mono-glue
|
127 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-mono-glue:/root/build -v ${basedir}/mono-glue:/root/mono-glue -w /root/ ${registry}/godot/mono-glue:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue |
| 133 | +${podman_run} -v ${basedir}/build-mono-glue:/root/build ${registry}/godot/mono-glue:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue |
128 | 134 |
|
129 | 135 | mkdir -p ${basedir}/out/windows
|
130 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-windows:/root/build -v ${basedir}/mono-glue:/root/mono-glue -v ${basedir}/out/windows:/root/out -w /root/ ${registry}/godot/windows:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows |
| 136 | +${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out ${registry}/godot/windows:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows |
131 | 137 |
|
132 | 138 | mkdir -p ${basedir}/out/linux/x64
|
133 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-linux:/root/build -v ${basedir}/mono-glue:/root/mono-glue -v ${basedir}/out/linux/x64:/root/out -w /root/ ${registry}/godot/ubuntu-64:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux64 |
| 139 | +${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x64:/root/out ${registry}/godot/ubuntu-64:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux64 |
134 | 140 |
|
135 | 141 | mkdir -p ${basedir}/out/linux/x86
|
136 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-linux:/root/build -v ${basedir}/mono-glue:/root/mono-glue -v ${basedir}/out/linux/x86:/root/out -w /root/ ${registry}/godot/ubuntu-32:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux32 |
| 142 | +${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x86:/root/out ${registry}/godot/ubuntu-32:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux32 |
137 | 143 |
|
138 | 144 | mkdir -p ${basedir}/out/server/x64
|
139 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-server:/root/build -v ${basedir}/mono-glue:/root/mono-glue -v ${basedir}/out/server/x64:/root/out -w /root/ ${registry}/godot/ubuntu-64:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server |
| 145 | +${podman_run} -v ${basedir}/build-server:/root/build -v ${basedir}/out/server/x64:/root/out ${registry}/godot/ubuntu-64:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server |
140 | 146 |
|
141 | 147 | mkdir -p ${basedir}/out/javascript
|
142 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-javascript:/root/build -v ${basedir}/mono-glue:/root/mono-glue -v ${basedir}/out/javascript:/root/out -w /root/ ${registry}/godot/javascript:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/javascript |
| 148 | +${podman_run} -v ${basedir}/build-javascript:/root/build -v ${basedir}/out/javascript:/root/out ${registry}/godot/javascript:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/javascript |
143 | 149 |
|
144 | 150 | mkdir -p ${basedir}/out/macosx/x64
|
145 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-macosx:/root/build -v ${basedir}/mono-glue:/root/mono-glue -v ${basedir}/out/macosx/x64:/root/out -w /root/ ${registry}/godot-private/macosx:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macosx |
| 151 | +${podman_run} -v ${basedir}/build-macosx:/root/build -v ${basedir}/out/macosx/x64:/root/out ${registry}/godot-private/macosx:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macosx |
146 | 152 |
|
147 | 153 | mkdir -p ${basedir}/out/android
|
148 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -w /root/ ${registry}/godot-private/android:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android |
| 154 | +${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out ${registry}/godot-private/android:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android |
149 | 155 |
|
150 | 156 | mkdir -p ${basedir}/out/ios
|
151 |
| -${podman} run -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out -w /root/ ${registry}/godot-private/ios:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios |
| 157 | +${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out ${registry}/godot-private/ios:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios |
152 | 158 |
|
153 | 159 | mkdir -p ${basedir}/out/uwp
|
154 |
| -${podman} run --ulimit nofile=32768:32768 -it --rm -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/build-uwp:/root/build -v ${basedir}/out/uwp:/root/out -w /root/ ${registry}/godot-private/uwp:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/uwp |
| 160 | +${podman_run} --ulimit nofile=32768:32768 -v ${basedir}/build-uwp:/root/build -v ${basedir}/out/uwp:/root/out ${registry}/godot-private/uwp:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/uwp |
155 | 161 |
|
156 | 162 | if [ ! -z "$SUDO_UID" ]; then
|
157 | 163 | chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/out
|
|
0 commit comments