Skip to content

Commit

Permalink
ci: Add freebsd executable to releases
Browse files Browse the repository at this point in the history
This was temporarily disabled, because of timeouts in Cirrus. This seems to work well again.
  • Loading branch information
wolfgangwalther committed Feb 6, 2024
1 parent 1c02e1e commit 9fe0f50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
20 changes: 12 additions & 8 deletions .github/get_cirrusci_freebsd
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@ gh_accept_header="Accept: application/vnd.github.v3+json"
get_gh_check_runs_url() {
gh_checks_list_url="https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_COMMIT/check-suites"
>&2 echo "Getting list of check-suites from $gh_checks_list_url ..."
curl --fail -H "$gh_auth_header" -H "$gh_accept_header" "$gh_checks_list_url" \
curl -s --fail -H "$gh_auth_header" -H "$gh_accept_header" "$gh_checks_list_url" \
| jq -r '.check_suites[] | select(.app.slug == "cirrus-ci") | .check_runs_url'
}

wait_for_cirrusci() {
gh_check_runs_url="$(get_gh_check_runs_url)"
>&2 echo "Waiting to CirrusCI run to complete (two hours maximum)..."
for _ in $(seq 1 120); do
echo "Checking for CirrusCI task status at $gh_check_runs_url ..."
status=$(curl --fail -H "$gh_auth_header" "$gh_check_runs_url" | jq -r '.check_runs[] | .status')
if [ "$status" == "completed" ]; then
break
gh_check_runs_url="$(get_gh_check_runs_url)"
if [ -z "$gh_check_runs_url" ]; then
echo "CirrusCI task has not started, yet. Waiting..."
else
echo "CirrusCI task is still $status, waiting..."
sleep 60
echo "Checking for CirrusCI task status at $gh_check_runs_url ..."
status=$(curl -s --fail -H "$gh_auth_header" "$gh_check_runs_url" | jq -r '.check_runs[] | .status')
if [ "$status" == "completed" ]; then
break
else
echo "CirrusCI task is still $status, waiting..."
fi
fi
sleep 60
done
}

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,8 @@ jobs:
tar cJvf "release-bundle/postgrest-v$VERSION-macos-x64.tar.xz" \
-C artifacts/postgrest-macos-x64 postgrest
# TODO: Fix timeouts for FreeBSD builds in Cirrus
#tar cJvf "release-bundle/postgrest-v$VERSION-freebsd-x64.tar.xz" \
# -C artifacts/postgrest-freebsd-x64 postgrest
tar cJvf "release-bundle/postgrest-v$VERSION-freebsd-x64.tar.xz" \
-C artifacts/postgrest-freebsd-x64 postgrest
tar cJvf "release-bundle/postgrest-v$VERSION-ubuntu-aarch64.tar.xz" \
-C artifacts/postgrest-ubuntu-aarch64 postgrest
Expand Down

0 comments on commit 9fe0f50

Please sign in to comment.