Browse Source

chore(CI): Use consistent passing of ARCH to scripts

It's passed to some scripts through the environment variable and to others on
as an argument. Make all calls rely on the argument for consistency.
reviewable/pr6527/r4
Anthony Bilinski 3 years ago
parent
commit
98bdf5f36f
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 6
      buildscripts/build_gdb_windows.sh
  2. 8
      buildscripts/build_gmp_windows.sh
  3. 8
      buildscripts/build_libexpat_windows.sh
  4. 6
      buildscripts/docker/Dockerfile.windows_builder

6
buildscripts/build_gdb_windows.sh

@ -14,19 +14,19 @@ set -euo pipefail @@ -14,19 +14,19 @@ set -euo pipefail
while (( $# > 0 )); do
case $1 in
--arch) SCRIPT_ARCH=$2; shift 2 ;;
--arch) ARCH=$2; shift 2 ;;
-h|--help) usage; exit 1 ;;
*) echo "Unexpected argument $1"; usage; exit 1;;
esac
done
if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then
if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then
echo "Unexpected arch $ARCH"
usage
exit 1
fi
if [ "${SCRIPT_ARCH}" == "win64" ]; then
if [ "${ARCH}" == "win64" ]; then
HOST="x86_64-w64-mingw32"
else
HOST="i686-w64-mingw32"

8
buildscripts/build_gmp_windows.sh

@ -14,19 +14,19 @@ set -euo pipefail @@ -14,19 +14,19 @@ set -euo pipefail
while (( $# > 0 )); do
case $1 in
--arch) SCRIPT_ARCH=$2; shift 2 ;;
--arch) ARCH=$2; shift 2 ;;
-h|--help) usage; exit 1 ;;
*) echo "Unexpected argument $1"; usage; exit 1;;
esac
done
if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then
echo "Unexpected arch $SCRIPT_ARCH"
if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then
echo "Unexpected arch $ARCH"
usage
exit 1
fi
if [ "${SCRIPT_ARCH}" == "win64" ]; then
if [ "${ARCH}" == "win64" ]; then
HOST="x86_64-w64-mingw32"
else
HOST="i686-w64-mingw32"

8
buildscripts/build_libexpat_windows.sh

@ -14,21 +14,21 @@ set -euo pipefail @@ -14,21 +14,21 @@ set -euo pipefail
while (( $# > 0 )); do
case $1 in
--arch) SCRIPT_ARCH=$2; shift 2 ;;
--arch) ARCH=$2; shift 2 ;;
-h|--help) usage; exit 1 ;;
*) echo "Unexpected argument $1"; usage; exit 1;;
esac
done
if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then
echo "Unexpected arch $SCRIPT_ARCH"
if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then
echo "Unexpected arch $ARCH"
usage
exit 1
fi
"$(dirname $0)"/download/download_libexpat.sh
if [ "${SCRIPT_ARCH}" == "win64" ]; then
if [ "${ARCH}" == "win64" ]; then
HOST="x86_64-w64-mingw32"
else
HOST="i686-w64-mingw32"

6
buildscripts/docker/Dockerfile.windows_builder

@ -224,21 +224,21 @@ COPY download/download_gmp.sh /build/download/download_gmp.sh @@ -224,21 +224,21 @@ COPY download/download_gmp.sh /build/download/download_gmp.sh
COPY build_gmp_windows.sh /build/build_gmp_windows.sh
RUN mkdir -p /src/gmp && \
cd /src/gmp && \
/build/build_gmp_windows.sh && \
/build/build_gmp_windows.sh --arch ${SCRIPT_ARCH} && \
rm -fr /src/gmp
COPY download/download_libexpat.sh /build/download/download_libexpat.sh
COPY build_libexpat_windows.sh /build/build_libexpat_windows.sh
RUN mkdir -p /src/libexpat && \
cd /src/libexpat && \
/build/build_libexpat_windows.sh && \
/build/build_libexpat_windows.sh --arch ${SCRIPT_ARCH} && \
rm -fr /src/libexpat
COPY download/download_gdb.sh /build/download/download_gdb.sh
COPY build_gdb_windows.sh /build/build_gdb_windows.sh
RUN mkdir -p /src/gdb && \
cd /src/gdb && \
/build/build_gdb_windows.sh && \
/build/build_gdb_windows.sh --arch ${SCRIPT_ARCH} && \
rm -fr /src/gdb && \
cp /windows/bin/gdb.exe /debug_export/gdb.exe

Loading…
Cancel
Save