Skip to content
Closed
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
33 changes: 24 additions & 9 deletions .github/workflows/goroot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ on:
required: true
default: main
type: string
test_scope:
description: Suites to qualify
required: true
default: all
type: choice
options: [all, wasm]
schedule:
# 01:00 Asia/Shanghai (17:00 UTC on the previous day), daily.
- cron: "0 17 * * *"
Expand All @@ -31,6 +37,7 @@ concurrency:

jobs:
goroot:
if: ${{ inputs.test_scope != 'wasm' }}
name: GOROOT (${{ matrix.os }}${{ startsWith(matrix.os, 'windows') && format(', {0}, {1}', matrix.windows_abi, matrix.windows_arch) || '' }}, Go 1.26+1.27, shard ${{ matrix.shard-index }}/${{ matrix.shard-total }})
timeout-minutes: 180
outputs:
Expand Down Expand Up @@ -588,14 +595,11 @@ jobs:
return "${pipeline_status[0]}"
}

run_goroot "$GO126_GOROOT" "${{ steps.go126.outputs.version }}" "$shard_index" &
pids=("$!")
run_goroot "$GO127_GOROOT" "${{ steps.go127.outputs.version }}" "$paired_shard_index" &
pids+=("$!")
# Asyncify dominates large runoutput builds. Do not let two
# compiler/linker pools compete for this runner's CPU and memory.
status=0
for pid in "${pids[@]}"; do
wait "$pid" || status=1
done
run_goroot "$GO126_GOROOT" "${{ steps.go126.outputs.version }}" "$shard_index" || status=1
run_goroot "$GO127_GOROOT" "${{ steps.go127.outputs.version }}" "$paired_shard_index" || status=1
exit "$status"

- name: Summarize GOROOT shard
Expand Down Expand Up @@ -712,9 +716,16 @@ jobs:
WASM_RESULT: ${{ needs.goroot-wasm.result }}
NATIVE_EXPECTED_REPORTS: ${{ needs.goroot.outputs.expected-reports }}
WASM_EXPECTED_REPORTS: ${{ needs.goroot-wasm.outputs.expected-reports }}
TEST_SCOPE: ${{ inputs.test_scope || 'all' }}
run: |
source dev/go_toolchain.sh
if [[ ! "$NATIVE_EXPECTED_REPORTS" =~ ^[1-9][0-9]*$ || ! "$WASM_EXPECTED_REPORTS" =~ ^[1-9][0-9]*$ ]]; then
if [[ "$TEST_SCOPE" == wasm && "$GOROOT_RESULT" == skipped ]]; then
NATIVE_EXPECTED_REPORTS=0
elif [[ ! "$NATIVE_EXPECTED_REPORTS" =~ ^[1-9][0-9]*$ ]]; then
echo "error: missing expected native report count" >&2
exit 1
fi
if [[ ! "$WASM_EXPECTED_REPORTS" =~ ^[1-9][0-9]*$ ]]; then
echo "error: missing expected report counts from the GOROOT matrices" >&2
exit 1
fi
Expand Down Expand Up @@ -765,6 +776,7 @@ jobs:
echo '## GOROOT run summary'
echo
echo "Received $report_count/$expected_reports shard reports (two Go versions per configured matrix job)."
echo "Qualification scope: $TEST_SCOPE."
echo
echo '| Platform / toolchain | Shards | Selected | Observed | Passed | Failed | Skipped |'
echo '|---|---:|---:|---:|---:|---:|---:|'
Expand Down Expand Up @@ -847,12 +859,15 @@ jobs:
env:
GOROOT_RESULT: ${{ needs.goroot.result }}
WASM_RESULT: ${{ needs.goroot-wasm.result }}
TEST_SCOPE: ${{ inputs.test_scope || 'all' }}
run: |
if [[ "$GOROOT_REPORT_COUNT" -ne "$GOROOT_EXPECTED_REPORT_COUNT" ]]; then
echo "error: expected $GOROOT_EXPECTED_REPORT_COUNT shard reports, got $GOROOT_REPORT_COUNT" >&2
exit 1
fi
if [[ "$GOROOT_RESULT" != success || "$WASM_RESULT" != success ]]; then
native_expected=success
if [[ "$TEST_SCOPE" == wasm ]]; then native_expected=skipped; fi
if [[ "$GOROOT_RESULT" != "$native_expected" || "$WASM_RESULT" != success ]]; then
echo "error: one or more GOROOT shards did not succeed" >&2
exit 1
fi
35 changes: 31 additions & 4 deletions .github/workflows/std.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ on:
required: true
default: main
type: string
wasm_workers:
description: Go scheduler workers for Emscripten std profiles
required: true
default: '1'
type: choice
options: ['1', '2', '4']
schedule:
# 04:00 Asia/Shanghai (20:00 UTC on the previous day), daily.
- cron: "0 20 * * *"

concurrency:
# Periodic compatibility runs are reports, so a later invocation must not
# cancel one that has already consumed hosted-runner time.
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-${{ inputs.wasm_workers || '1' }}
cancel-in-progress: false

permissions:
Expand Down Expand Up @@ -258,7 +264,7 @@ jobs:
retention-days: 1

wasm-std:
name: wasm std acceptance (${{ matrix.profile }}, ${{ matrix.shard }}/${{ matrix.profile == 'W32-WASI' && 5 || 3 }})
name: wasm std acceptance (${{ matrix.profile }}, workers ${{ (matrix.profile == 'J32-Emscripten' || matrix.profile == 'J64-Emscripten') && inputs.wasm_workers || '1' }}, ${{ matrix.shard }}/${{ matrix.profile == 'W32-WASI' && 5 || 3 }})
runs-on: ubuntu-24.04
timeout-minutes: 180
strategy:
Expand All @@ -273,6 +279,7 @@ jobs:
shard: 4
env:
GOFLAGS: -tags=llvm22
LLGO_WASM_WORKERS: ${{ (matrix.profile == 'J32-Emscripten' || matrix.profile == 'J64-Emscripten') && inputs.wasm_workers || '1' }}
steps:
- uses: actions/checkout@v7
with:
Expand Down Expand Up @@ -364,9 +371,11 @@ jobs:
if-no-files-found: error

wasm-browser:
name: real-browser GoJS callback
name: real-browser GoJS callback and worker acceptance
runs-on: ubuntu-24.04
timeout-minutes: 30
# Complete Node/Chrome worker acceptance takes about 25 minutes before
# dependency setup and the GoJS browser smoke; retain its per-case limits.
timeout-minutes: 45
env:
GOFLAGS: -tags=llvm22
LLGO_BUILD_CACHE: 'on'
Expand All @@ -381,6 +390,16 @@ jobs:
- uses: emscripten-core/setup-emsdk@v15
with:
version: '6.0.8'
- uses: actions/setup-node@v7
if: inputs.wasm_workers != '' && inputs.wasm_workers != '1'
with:
node-version: '24'
- uses: ./.github/actions/setup-binaryen
if: inputs.wasm_workers != '' && inputs.wasm_workers != '1'
- uses: bytecodealliance/actions/wasm-tools/setup@v1
if: inputs.wasm_workers != '' && inputs.wasm_workers != '1'
with:
version: '1.243.0'
- uses: ./.github/actions/setup-go
- name: Set up Chrome
id: setup-chrome
Expand All @@ -400,6 +419,12 @@ jobs:
BROWSER_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
LLGO: ${{ runner.temp }}/llgo
run: dev/test_wasm_browser.sh
- name: Run Emscripten worker acceptance in Node and Chrome
if: inputs.wasm_workers != '' && inputs.wasm_workers != '1'
env:
CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
LLGO: ${{ runner.temp }}/llgo
run: dev/test_wasm_workers.sh

wasm-sentinels:
name: wasm GOROOT sentinels
Expand Down Expand Up @@ -569,6 +594,8 @@ jobs:
} >"$report_md"
fi

printf '\nEmscripten std scheduler workers: %s. W32 uses its pthread backend; J32-GoJS, the DOM callback, and GOROOT sentinel suites use the single-worker JS scheduler.\n' \
'${{ inputs.wasm_workers || '1' }}' >>"$report_md"
cat "$report_md" >>"$GITHUB_STEP_SUMMARY"
echo "STD_REPORT=$report_md" >>"$GITHUB_ENV"

Expand Down
Loading