mirror of
https://github.com/ekzhang/bore.git
synced 2024-12-22 17:05:20 +07:00
a6045fb1a7
* Update dependencies * Bump version to 0.5.1 * Try to deflake tests in GitHub Actions * Add some retries to e2e_test * Revert cargo.lock changes * Update only a couple deps * Fix CI running twice :( * Fix typo
33 lines
643 B
Bash
Executable File
33 lines
643 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Script for building your rust projects.
|
|
set -e
|
|
|
|
source ci/common.bash
|
|
|
|
# $1 {path} = Path to cross/cargo executable
|
|
CROSS=$1
|
|
# $1 {string} = <Target Triple>
|
|
TARGET_TRIPLE=$2
|
|
|
|
required_arg $CROSS 'CROSS'
|
|
required_arg $TARGET_TRIPLE '<Target Triple>'
|
|
|
|
max_attempts=3
|
|
count=0
|
|
|
|
while [ $count -lt $max_attempts ]; do
|
|
$CROSS test --target $TARGET_TRIPLE
|
|
status=$?
|
|
if [ $status -eq 0 ]; then
|
|
echo "Test passed"
|
|
break
|
|
else
|
|
echo "Test failed, attempt $(($count + 1))"
|
|
fi
|
|
count=$(($count + 1))
|
|
done
|
|
|
|
if [ $status -ne 0 ]; then
|
|
echo "Test failed after $max_attempts attempts"
|
|
fi
|