Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/finalize-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ jobs:
tail -200 "$(brew --prefix)/var/log/microbridge.log" || true
exit 1
fi
open -n "$APP"
APP_PID=""
for _ in {1..30}; do
APP_PID="$(pgrep -f "$APP/Contents/MacOS/" | head -1 || true)"
[[ -n "$APP_PID" ]] && break
sleep 1
done
test -n "$APP_PID"
APP_LOG="$RUNNER_TEMP/microbridge-app.log"
"$APP/Contents/MacOS/microbridge-ui" >"$APP_LOG" 2>&1 &
APP_PID=$!
sleep 3
if ! kill -0 "$APP_PID"; then
cat "$APP_LOG"
exit 1
fi
Comment on lines +78 to +85
kill "$APP_PID" || true
wait "$APP_PID" || true
brew services stop DevVig/microbridge/microbridge
HOMEBREW_NO_INSTALL_CLEANUP=1 brew uninstall DevVig/microbridge/microbridge
if brew services list | grep -q '^microbridge[[:space:]]'; then
Expand Down
18 changes: 10 additions & 8 deletions scripts/smoke-formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ EXPECTED_ARCH="${3:?usage: $0 path/to/microbridge.rb VERSION ARCH}"
TAP="devvig/microbridge-ci"
APP="$HOME/Applications/Microbridge.app"
BREW_LOG="$(brew --prefix)/var/log/microbridge.log"
APP_LOG="${RUNNER_TEMP:-/tmp}/microbridge-app.log"

cleanup() {
brew services stop "$TAP/microbridge" >/dev/null 2>&1 || true
Expand All @@ -27,6 +28,10 @@ diagnostics() {
echo "==> $BREW_LOG" >&2
tail -200 "$BREW_LOG" >&2 || true
fi
if [[ -f "$APP_LOG" ]]; then
echo "==> $APP_LOG" >&2
tail -200 "$APP_LOG" >&2 || true
fi
if [[ -d "$APP" ]]; then
echo "==> Installed app bundle" >&2
find "$APP/Contents" -maxdepth 2 -type f -print >&2 || true
Expand Down Expand Up @@ -75,15 +80,12 @@ for _ in {1..30}; do
done
test "$SERVICE_STATE" = "started" || test "$SERVICE_STATE" = "scheduled"

open -n "$APP"
APP_PID=""
for _ in {1..30}; do
APP_PID="$(pgrep -f "$APP/Contents/MacOS/" | head -1 || true)"
[[ -n "$APP_PID" ]] && break
sleep 1
done
test -n "$APP_PID"
"$APP/Contents/MacOS/microbridge-ui" >"$APP_LOG" 2>&1 &
APP_PID=$!
sleep 3
kill -0 "$APP_PID"
Comment on lines +83 to +86
kill "$APP_PID" || true
wait "$APP_PID" || true

brew services stop "$TAP/microbridge"
HOMEBREW_NO_INSTALL_CLEANUP=1 brew uninstall "$TAP/microbridge"
Expand Down
Loading