Skip to content

Commit

Permalink
Allow openocd build to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
will-v-pi committed Aug 30, 2024
1 parent c4355a7 commit 8299c6b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
17 changes: 7 additions & 10 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ set -euo pipefail

# Defaults
SKIP_RISCV=${SKIP_RISCV-0}
if git clone https://git.savannah.nongnu.org/git/git2cl.git; then
SKIP_OPENOCD=${SKIP_OPENOCD-0}
else
# Clone is failing, so skip build
echo "Skipping openocd build, as likely to fail"
SKIP_OPENOCD=${SKIP_OPENOCD-1}
fi
SKIP_OPENOCD=${SKIP_OPENOCD-0}

# Install prerequisites
sudo apt install -y jq cmake libtool automake libusb-1.0-0-dev libhidapi-dev libftdi1-dev
Expand Down Expand Up @@ -42,13 +36,16 @@ done < <(echo "$repos")


cd $builddir
if [[ "$SKIP_OPENOCD" != 1 ]]; then
if ../packages/linux/openocd/build-openocd.sh; then
echo "OpenOCD Build failed"
SKIP_OPENOCD=1
fi
fi
if [[ "$SKIP_RISCV" != 1 ]]; then
# Takes ages to build
../packages/linux/riscv/build-riscv-gcc.sh
fi
if [[ "$SKIP_OPENOCD" != 1 ]]; then
../packages/linux/openocd/build-openocd.sh
fi
../packages/linux/picotool/build-picotool.sh
cd ..

Expand Down
17 changes: 7 additions & 10 deletions build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ set -euo pipefail

# Defaults
SKIP_RISCV=${SKIP_RISCV-0}
if git clone https://git.savannah.nongnu.org/git/git2cl.git; then
SKIP_OPENOCD=${SKIP_OPENOCD-0}
else
# Clone is failing, so skip build
echo "Skipping openocd build, as likely to fail"
SKIP_OPENOCD=${SKIP_OPENOCD-1}
fi
SKIP_OPENOCD=${SKIP_OPENOCD-0}

# Install prerequisites
arch -x86_64 /usr/local/bin/brew install jq libtool libusb automake hidapi
Expand Down Expand Up @@ -53,13 +47,16 @@ done < <(echo "$repos")


cd $builddir
if [[ "$SKIP_OPENOCD" != 1 ]] && [[ $(uname -m) == 'arm64' ]]; then
if ../packages/macos/openocd/build-openocd.sh; then
echo "OpenOCD Build failed"
SKIP_OPENOCD=1
fi
fi
if [[ "$SKIP_RISCV" != 1 ]]; then
# Takes ages to build
../packages/macos/riscv/build-riscv-gcc.sh
fi
if [[ "$SKIP_OPENOCD" != 1 ]] && [[ $(uname -m) == 'arm64' ]]; then
../packages/macos/openocd/build-openocd.sh
fi
arch -x86_64 ../packages/macos/picotool/build-picotool.sh
arch -arm64 ../packages/macos/picotool/build-picotool.sh
../packages/macos/picotool/merge-picotool.sh
Expand Down

0 comments on commit 8299c6b

Please sign in to comment.