mirror of
https://github.com/Z3Prover/z3
synced 2026-06-11 11:25:36 +00:00
Allow FStar build failures without blocking build-and-report workflow progression (#9769)
`build-and-report` was failing hard when the `Build FStar` step hit
prover regressions, preventing downstream reporting from running. This
change makes FStar failures non-blocking and ensures the reporting path
still executes with an explicit FStar outcome.
- **Workflow failure propagation**
- Marked `Build FStar` as non-blocking:
- added `id: build_fstar`
- added `continue-on-error: true`
- **Guaranteed reporting execution**
- Made the summary step unconditional with `if: always()` so it runs
even when FStar fails.
- **Robust summary generation**
- Passed step outcome into the script (`FSTAR_BUILD_OUTCOME`).
- Hardened file reads for missing FStar artifacts/version files.
- Report body now reflects actual FStar outcome (`success` vs
non-success) while preserving pipeline continuity.
```yaml
- name: Build FStar
id: build_fstar
continue-on-error: true
run: |
# existing FStar build commands
- name: Create discussion summary
if: always()
env:
FSTAR_BUILD_OUTCOME: ${{ steps.build_fstar.outcome }}
uses: actions/github-script@v9
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
parent
42e6ec5644
commit
c174df4071
1 changed files with 15 additions and 5 deletions
20
.github/workflows/fstar-master-build.yml
vendored
20
.github/workflows/fstar-master-build.yml
vendored
|
|
@ -86,6 +86,8 @@ jobs:
|
||||||
/tmp/gh-aw/agent/z3-bin/z3 --version
|
/tmp/gh-aw/agent/z3-bin/z3 --version
|
||||||
|
|
||||||
- name: Build FStar
|
- name: Build FStar
|
||||||
|
id: build_fstar
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
rm -rf /tmp/gh-aw/agent/FStar
|
rm -rf /tmp/gh-aw/agent/FStar
|
||||||
|
|
@ -106,18 +108,26 @@ jobs:
|
||||||
/tmp/gh-aw/agent/FStar/out/bin/fstar.exe --version | tee /tmp/gh-aw/agent/fstar-version.txt
|
/tmp/gh-aw/agent/FStar/out/bin/fstar.exe --version | tee /tmp/gh-aw/agent/fstar-version.txt
|
||||||
|
|
||||||
- name: Create discussion summary
|
- name: Create discussion summary
|
||||||
|
if: always()
|
||||||
uses: actions/github-script@v9
|
uses: actions/github-script@v9
|
||||||
env:
|
env:
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
FSTAR_BUILD_OUTCOME: ${{ steps.build_fstar.outcome }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
const z3VersionText = fs.readFileSync('/tmp/gh-aw/agent/z3-version.txt', 'utf8').trim();
|
const readIfExists = (path) => fs.existsSync(path) ? fs.readFileSync(path, 'utf8').trim() : null;
|
||||||
const fstarVersionFile = fs.readFileSync('/tmp/gh-aw/agent/fstar-version.txt', 'utf8').trim();
|
const z3VersionText = readIfExists('/tmp/gh-aw/agent/z3-version.txt') ?? 'unknown';
|
||||||
|
const fstarVersionFile = readIfExists('/tmp/gh-aw/agent/fstar-version.txt') ?? '';
|
||||||
const fstarVersionText = fstarVersionFile ? fstarVersionFile.split('\n')[0] : 'unknown';
|
const fstarVersionText = fstarVersionFile ? fstarVersionFile.split('\n')[0] : 'unknown';
|
||||||
const fstarCommitLine = fs.readFileSync('/tmp/gh-aw/agent/fstar-commit.txt', 'utf8').trim();
|
const fstarCommitLine = readIfExists('/tmp/gh-aw/agent/fstar-commit.txt') ?? '';
|
||||||
const fstarCommit = fstarCommitLine.replace(/^FStar commit:\s*/, '');
|
const fstarCommit = fstarCommitLine ? fstarCommitLine.replace(/^FStar commit:\s*/, '') : 'unknown';
|
||||||
|
const fstarBuildOutcome = process.env.FSTAR_BUILD_OUTCOME || 'unknown';
|
||||||
|
const fstarBuildSucceeded = fstarBuildOutcome === 'success';
|
||||||
|
const fstarStatus = fstarBuildSucceeded
|
||||||
|
? '✅ FStar build completed'
|
||||||
|
: `⚠️ FStar build ${fstarBuildOutcome} (pipeline continued)`;
|
||||||
const date = new Date().toISOString().slice(0, 10);
|
const date = new Date().toISOString().slice(0, 10);
|
||||||
|
|
||||||
const owner = context.repo.owner;
|
const owner = context.repo.owner;
|
||||||
|
|
@ -146,7 +156,7 @@ jobs:
|
||||||
const body = [
|
const body = [
|
||||||
`### Build status`,
|
`### Build status`,
|
||||||
`- ✅ Z3 build completed`,
|
`- ✅ Z3 build completed`,
|
||||||
`- ✅ FStar build completed`,
|
`- ${fstarStatus}`,
|
||||||
``,
|
``,
|
||||||
`### Inputs used`,
|
`### Inputs used`,
|
||||||
`- z3_ref: \`${process.env.Z3_REF}\``,
|
`- z3_ref: \`${process.env.Z3_REF}\``,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue