mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-04 23:09:40 +00:00
Fixed the async main in Rust runtime (#864)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
This commit is contained in:
1 parent
1bdc28097d
commit
8a48eefb42
3 files changed
+54
-41
No files matched your search
@@ -256,6 +256,14 @@ jobs:
|
||||
PDFIUM_CHROMIUM_REVISION: ${{ needs.read_metadata.outputs.pdfium_chromium_revision }}
|
||||
|
||||
steps:
|
||||
- name: Checkout AI Studio release metadata
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.AI_STUDIO_COMMIT }}
|
||||
path: ai-studio
|
||||
sparse-checkout: metadata.txt
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Checkout Flatpak repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -315,6 +323,15 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
release_version=$(sed -n '1p' ../ai-studio/metadata.txt)
|
||||
release_timestamp=$(sed -n '2p' ../ai-studio/metadata.txt)
|
||||
release_date=${release_timestamp%% *}
|
||||
|
||||
test "$release_version" = "${AI_STUDIO_TAG#v}"
|
||||
[[ "$release_timestamp" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}[[:space:]][0-9]{2}:[0-9]{2}:[0-9]{2}[[:space:]]UTC$ ]]
|
||||
python3 ./update-metainfo.py "$release_version" "$release_date"
|
||||
python3 ./update-metainfo.py --check "$release_version" "$release_date"
|
||||
|
||||
pdfium_base_url="https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_CHROMIUM_REVISION}"
|
||||
pdfium_x64_url="${pdfium_base_url}/pdfium-linux-x64.tgz"
|
||||
pdfium_arm64_url="${pdfium_base_url}/pdfium-linux-arm64.tgz"
|
||||
@@ -368,7 +385,7 @@ jobs:
|
||||
|
||||
branch="sync/ai-studio-${AI_STUDIO_TAG}"
|
||||
git checkout -B "$branch"
|
||||
git add org.MindWorkAI.AIStudio.yml cargo-sources.json dotnet-sources.json tauri-cli-sources.json
|
||||
git add org.MindWorkAI.AIStudio.yml org.MindWorkAI.AIStudio.metainfo.xml cargo-sources.json dotnet-sources.json tauri-cli-sources.json
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "Flatpak repository is already synced for ${AI_STUDIO_TAG}."
|
||||
@@ -483,7 +500,7 @@ jobs:
|
||||
FLATPAK_COMMIT: ${{ needs.sync_flatpak_repo.outputs.flatpak_commit }}
|
||||
|
||||
steps:
|
||||
- name: Wait for Flatpak main build
|
||||
- name: Dispatch and wait for Flatpak build
|
||||
id: flatpak_run
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.FLATPAK_WORKFLOW_TOKEN }}
|
||||
@@ -491,7 +508,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
|
||||
find_run_id() {
|
||||
local created_after="${1:-}"
|
||||
local created_after="$1"
|
||||
local runs
|
||||
|
||||
runs=$(gh run list \
|
||||
@@ -502,16 +519,10 @@ jobs:
|
||||
--limit 20 \
|
||||
--json databaseId,event,headSha,createdAt)
|
||||
|
||||
if [ -n "$created_after" ]; then
|
||||
echo "$runs" | jq -r \
|
||||
--arg commit "$FLATPAK_COMMIT" \
|
||||
--arg created_after "$created_after" \
|
||||
'[.[] | select(.headSha == $commit and .event == "workflow_dispatch" and .createdAt >= $created_after)][0].databaseId // empty'
|
||||
else
|
||||
echo "$runs" | jq -r \
|
||||
--arg commit "$FLATPAK_COMMIT" \
|
||||
'[.[] | select(.headSha == $commit and (.event == "push" or .event == "workflow_dispatch"))][0].databaseId // empty'
|
||||
fi
|
||||
echo "$runs" | jq -r \
|
||||
--arg commit "$FLATPAK_COMMIT" \
|
||||
--arg created_after "$created_after" \
|
||||
'[.[] | select(.headSha == $commit and .event == "workflow_dispatch" and .createdAt >= $created_after)][0].databaseId // empty'
|
||||
}
|
||||
|
||||
validate_required_artifacts() {
|
||||
@@ -584,41 +595,29 @@ jobs:
|
||||
return 2
|
||||
}
|
||||
|
||||
current_main=$(gh api "repos/${FLATPAK_REPOSITORY}/commits/main" --jq .sha)
|
||||
if [ "$current_main" != "$FLATPAK_COMMIT" ]; then
|
||||
echo "Flatpak main advanced from ${FLATPAK_COMMIT} to ${current_main} before the build could be dispatched."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dispatch_started_at=$(date --utc +'%Y-%m-%dT%H:%M:%SZ')
|
||||
gh workflow run "$FLATPAK_WORKFLOW" \
|
||||
--repo "$FLATPAK_REPOSITORY" \
|
||||
--ref main \
|
||||
-f "artifact_retention_days=${RETENTION_INTERMEDIATE_ASSETS}"
|
||||
|
||||
run_id=""
|
||||
for attempt in {1..15}; do
|
||||
run_id=$(find_run_id)
|
||||
run_id=$(find_run_id "$dispatch_started_at")
|
||||
if [ -n "$run_id" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
echo "Waiting for Flatpak workflow on commit ${FLATPAK_COMMIT}..."
|
||||
echo "Waiting for the dispatched Flatpak workflow on commit ${FLATPAK_COMMIT}..."
|
||||
sleep 20
|
||||
done
|
||||
|
||||
if [ -z "$run_id" ]; then
|
||||
current_main=$(gh api "repos/${FLATPAK_REPOSITORY}/commits/main" --jq .sha)
|
||||
if [ "$current_main" != "$FLATPAK_COMMIT" ]; then
|
||||
echo "No Flatpak run exists for ${FLATPAK_COMMIT}, and Flatpak main has advanced to ${current_main}."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dispatch_started_at=$(date --utc +'%Y-%m-%dT%H:%M:%SZ')
|
||||
gh workflow run "$FLATPAK_WORKFLOW" \
|
||||
--repo "$FLATPAK_REPOSITORY" \
|
||||
--ref main \
|
||||
-f "artifact_retention_days=${RETENTION_INTERMEDIATE_ASSETS}"
|
||||
|
||||
for attempt in {1..15}; do
|
||||
run_id=$(find_run_id "$dispatch_started_at")
|
||||
if [ -n "$run_id" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
echo "Waiting for the dispatched Flatpak workflow on commit ${FLATPAK_COMMIT}..."
|
||||
sleep 20
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$run_id" ]; then
|
||||
echo "Timed out waiting for a Flatpak workflow to start on commit ${FLATPAK_COMMIT}."
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user