mirror of
https://github.com/Z3Prover/z3
synced 2026-01-19 16:53:18 +00:00
* Initial plan * Migrate Azure Pipelines to GitHub Actions CI workflow Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Add CI testing and validation documentation Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Update manylinux container image in CI workflow * Disable test execution in CI workflow --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
3.9 KiB
3.9 KiB
Testing the CI Workflow
This document provides instructions for testing the new GitHub Actions CI workflow after migration from Azure Pipelines.
Quick Test
To test the workflow:
- Push a branch or create a PR: The workflow automatically triggers on all branches
- View workflow runs: Go to the "Actions" tab in GitHub
- Monitor progress: Click on a workflow run to see job details
Manual Trigger
You can also manually trigger the workflow:
- Go to the "Actions" tab
- Select "CI" from the left sidebar
- Click "Run workflow"
- Choose your branch
- Click "Run workflow"
Local Validation
Before pushing, you can validate the YAML syntax locally:
# Using yamllint (install with: pip install yamllint)
yamllint .github/workflows/ci.yml
# Using Python PyYAML
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"
# Using actionlint (install from https://github.com/rhysd/actionlint)
actionlint .github/workflows/ci.yml
Job Matrix
The CI workflow includes these job categories:
Linux Jobs
- linux-python-debug: Python-based build with make (MT and ST variants)
- manylinux-python-amd64: Python wheel build for manylinux AMD64
- manylinux-python-arm64: Python wheel build for manylinux ARM64 (cross-compile)
- ubuntu-ocaml: OCaml bindings build
- ubuntu-ocaml-static: OCaml static library build
- ubuntu-cmake: CMake builds with multiple compilers (4 variants)
macOS Jobs
- macos-python: Python-based build with make
- macos-cmake: CMake build with Julia support
Expected Runtime
Approximate job durations:
- Linux Python builds: 20-30 minutes
- Manylinux Python builds: 15-25 minutes
- OCaml builds: 25-35 minutes
- CMake builds: 25-35 minutes each variant
- macOS builds: 30-40 minutes
Total workflow time (all jobs in parallel): ~40-60 minutes
Debugging Failed Jobs
If a job fails:
-
Click on the failed job to see the log
-
Expand failed steps to see detailed output
-
Check for common issues:
- Missing dependencies
- Test failures
- Build errors
- Timeout (increase timeout-minutes if needed)
-
Re-run failed jobs:
- Click "Re-run failed jobs" button
- Or "Re-run all jobs" to test everything
Comparing with Azure Pipelines
To compare results:
- Check the last successful Azure Pipelines run
- Compare job names and steps with the GitHub Actions workflow
- Verify all tests pass with similar coverage
Differences from Azure Pipelines
- Checkout: Explicit
actions/checkout@v4step (was implicit) - Python Setup: Explicit
actions/setup-python@v5step (was implicit) - Template Files: Inlined instead of external templates
- Artifacts: Uses
actions/upload-artifact(if needed in future) - Caching: Can add
actions/cachefor dependencies (optional optimization)
Adding Jobs or Modifying
To add or modify jobs:
- Edit
.github/workflows/ci.yml - Follow the existing job structure
- Use matrix strategy for variants
- Add appropriate timeouts (default: 90 minutes)
- Test your changes on a branch first
Optimization Opportunities
Future optimizations to consider:
- Caching: Add dependency caching (npm, pip, opam, etc.)
- Artifacts: Share build artifacts between jobs
- Concurrency: Add concurrency groups to cancel outdated runs
- Selective Execution: Skip jobs based on changed files
- Self-hosted Runners: For faster builds (if available)
Rollback Plan
If the GitHub Actions workflow has issues:
- The original
azure-pipelines.ymlis still in the repository - Azure Pipelines can be re-enabled if needed
- Both systems can run in parallel during transition
Support
For issues or questions:
- Check GitHub Actions documentation: https://docs.github.com/en/actions
- Review the migration document:
.github/workflows/CI_MIGRATION.md - Check existing GitHub Actions workflows in
.github/workflows/ - Open an issue in the repository