Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hefroy committed Aug 29, 2023
1 parent 93ab33b commit 0b4e5b8
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
with:
build-arch: "cross-android"
upload-arch: "android"
cache-paths: /usr/local/aarch64-linux-android:/usr/local/armv7a-linux-androideabi:/usr/local/x86_64-linux-gnu
cache-paths: /usr/local/x86_64-linux-android:/usr/local/aarch64-linux-android:/usr/local/armv7a-linux-androideabi:/usr/local/x86_64-linux-gnu
dist-files:
build/x86_64/src/executionmanagement/libaws-iot-fleetwise-edge.so:x86_64
build/armeabi-v7a/src/executionmanagement/libaws-iot-fleetwise-edge.so:armeabi-v7a
Expand Down
5 changes: 3 additions & 2 deletions tools/install-deps-cross-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ install_deps() {
--layout=system \
--arch=${TARGET_ARCH} \
--target-version=${VERSION_ANDROID_API} > /dev/null
mv build/out/${TARGET_ARCH}/lib ${INSTALL_PREFIX}
mv build/out/${TARGET_ARCH}/include ${INSTALL_PREFIX}
cp -r build/out/${TARGET_ARCH}/lib ${INSTALL_PREFIX}
cp -r build/out/${TARGET_ARCH}/include ${INSTALL_PREFIX}
cd ..

# Snappy
Expand Down Expand Up @@ -235,6 +235,7 @@ ARCH_NOT_INSTALLED="false"
for ARCH in ${ARCHS}; do
HOST_PLATFORM=`echo $ARCH | cut -d ':' -f2`
if [ ! -d /usr/local/${HOST_PLATFORM} ]; then
echo "/usr/local/${HOST_PLATFORM} does not exist, re-building"
ARCH_NOT_INSTALLED="true"
break
fi
Expand Down
25 changes: 22 additions & 3 deletions tools/install-deps-cross-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,29 @@ if [ "${ARCH}" == "arm64" ]; then
exit -1
fi

sed -i "s/deb http/deb [arch=${ARCH}] http/g" /etc/apt/sources.list
print_file() {
echo ">>> $1: $2"
cat $2
echo ">>>"
}

print_file "Before patching" /etc/apt/sources.list
sed -i -E "s/deb (http|mirror\+file)/deb [arch=${ARCH}] \1/g" /etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.d/arm64.list
sed -i "s/deb \[arch=${ARCH}\] http/deb [arch=arm64] http/g" /etc/apt/sources.list.d/arm64.list
sed -i -E "s#(archive|security).ubuntu.com/ubuntu#ports.ubuntu.com/ubuntu-ports#g" /etc/apt/sources.list.d/arm64.list
sed -i -E "s/deb \[arch=${ARCH}\] (http|mirror\+file)/deb [arch=arm64] \1/g" /etc/apt/sources.list.d/arm64.list
# GitHub uses a separate mirrors file
if [ -f /etc/apt/apt-mirrors.txt ]; then
print_file "Before patching" /etc/apt/apt-mirrors.txt
cp /etc/apt/apt-mirrors.txt /etc/apt/apt-mirrors-arm64.txt
sed -i "s#/etc/apt/apt-mirrors.txt#/etc/apt/apt-mirrors-arm64.txt#g" /etc/apt/sources.list.d/arm64.list
PATCH_FILE="/etc/apt/apt-mirrors-arm64.txt"
print_file "After patching" /etc/apt/apt-mirrors-arm64.txt
else
PATCH_FILE="/etc/apt/sources.list.d/arm64.list"
fi
sed -i -E "s#(archive|security).ubuntu.com/ubuntu#ports.ubuntu.com/ubuntu-ports#g" ${PATCH_FILE}
print_file "After patching" /etc/apt/sources.list.d/arm64.list

dpkg --add-architecture arm64
apt update
apt install -y \
Expand Down
25 changes: 22 additions & 3 deletions tools/install-deps-cross-armhf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,29 @@ if [ "${ARCH}" == "armhf" ]; then
exit -1
fi

sed -i "s/deb http/deb [arch=${ARCH}] http/g" /etc/apt/sources.list
print_file() {
echo ">>> $1: $2"
cat $2
echo ">>>"
}

print_file "Before patching" /etc/apt/sources.list
sed -i -E "s/deb (http|mirror\+file)/deb [arch=${ARCH}] \1/g" /etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.d/armhf.list
sed -i "s/deb \[arch=${ARCH}\] http/deb [arch=armhf] http/g" /etc/apt/sources.list.d/armhf.list
sed -i -E "s#(archive|security).ubuntu.com/ubuntu#ports.ubuntu.com/ubuntu-ports#g" /etc/apt/sources.list.d/armhf.list
sed -i -E "s/deb \[arch=${ARCH}\] (http|mirror\+file)/deb [arch=armhf] \1/g" /etc/apt/sources.list.d/armhf.list
# GitHub uses a separate mirrors file
if [ -f /etc/apt/apt-mirrors.txt ]; then
print_file "Before patching" /etc/apt/apt-mirrors.txt
cp /etc/apt/apt-mirrors.txt /etc/apt/apt-mirrors-armhf.txt
sed -i "s#/etc/apt/apt-mirrors.txt#/etc/apt/apt-mirrors-armhf.txt#g" /etc/apt/sources.list.d/armhf.list
PATCH_FILE="/etc/apt/apt-mirrors-armhf.txt"
print_file "After patching" /etc/apt/apt-mirrors-armhf.txt
else
PATCH_FILE="/etc/apt/sources.list.d/armhf.list"
fi
sed -i -E "s#(archive|security).ubuntu.com/ubuntu#ports.ubuntu.com/ubuntu-ports#g" ${PATCH_FILE}
print_file "After patching" /etc/apt/sources.list.d/armhf.list

dpkg --add-architecture armhf
apt update
apt install -y \
Expand Down

0 comments on commit 0b4e5b8

Please sign in to comment.