Commit graph

33 commits

Author SHA1 Message Date
Protobuf Team Bot
a362a3b2fc Update hard-coded bazel version numbers in the CI workflows.
#test-continuous

PiperOrigin-RevId: 962521143
2026-08-10 20:14:02 -07:00
Protobuf Team Bot
caa4c0c8d9 Update CI docker images to use latest supported versions of Bazel
Update the GitHub Actions CI tests to use the latest versions of the images, which include versions 8.7.0 and 9.2.0 of bazel and a few language specific updates.

#test-continuous

Note: The Continuous Linux TSAN test failure is pre-existing and currently broken at HEAD
PiperOrigin-RevId: 959198290
2026-08-04 13:38:35 -07:00
Protobuf Team Bot
9d9a069bc5 Update downstream test container images in GHA workflows.
PiperOrigin-RevId: 936407941
2026-06-22 21:08:54 -07:00
Sandy Zhang
2c15ca43cf Upgrade C# Protobuf projects to .NET 8.0.
This change updates the target frameworks for various C# projects within Protobuf to .NET 8.0, while also maintaining netstandard2.0 for the core library. Support for older frameworks like net45, net50, and netstandard1.1 has been removed.

This updates our project to match our support policy in https://github.com/google/oss-policies-info/blob/main/foundational-dotnet-support-matrix.md which actually dropped support for net45, net50, etc long ago.

PiperOrigin-RevId: 919111969
2026-05-21 10:07:55 -07:00
Jie Luo
f9e028f29f bazel 9 tests for csharp, hpb, objc, php, python, rust and upb
PiperOrigin-RevId: 918164613
2026-05-19 19:58:47 -07:00
Salman Chishti
adf9e8b80f Upgrade GitHub Actions for Node 24 compatibility (#25572)
## Summary

Upgrade GitHub Actions to their latest versions to ensure compatibility with Node 24, as Node 20 will reach end-of-life in April 2026.

## Changes

| Action | Old Version(s) | New Version | Release | Files |
|--------|---------------|-------------|---------|-------|
| `actions/cache` | [`1bd1e32`](1bd1e32a3b) | [`8b402f5`](8b402f58fb) | [Release](https://github.com/actions/cache/releases/tag/v5) | clear_caches.yml |
| `actions/checkout` | [`8ade135`](8ade135a41) | [`8e8c483`](8e8c483db8) | [Release](https://github.com/actions/checkout/releases/tag/v6) | scorecard.yml, staleness_refresh.yml, update_php_repo.yml |
| `actions/download-artifact` | [`018cc2c`](018cc2cf5b), [`fa0a91b`](fa0a91b85d) | [`37930b1`](37930b1c2a) | [Release](https://github.com/actions/download-artifact/releases/tag/v7) | test_cpp.yml, test_php_ext.yml, test_upb.yml |
| `actions/setup-dotnet` | [`3447fd6`](3447fd6a9f) | [`baa11fb`](baa11fbfe1) | [Release](https://github.com/actions/setup-dotnet/releases/tag/v5) | test_csharp.yml |
| `actions/setup-java` | [`3a4f6e1`](3a4f6e1af5) | [`be666c2`](be666c2fcd) | [Release](https://github.com/actions/setup-java/releases/tag/v5) | test_bazel.yml |
| `actions/setup-python` | [`39cd149`](39cd14951b), [`e797f83`](e797f83bcb) | [`a309ff8`](a309ff8b42) | [Release](https://github.com/actions/setup-python/releases/tag/v6) | test_python.yml, test_upb.yml |
| `actions/stale` | [`b69b346`](b69b346013) | [`9971854`](997185467f) | [Release](https://github.com/actions/stale/releases/tag/v10) | janitor.yml |
| `actions/upload-artifact` | [`5076954`](50769540e7), [`v4`](https://github.com/actions/upload-artifact/releases/tag/v4) | [`b7c566a`](b7c566a772) | [Release](https://github.com/actions/upload-artifact/releases/tag/v6) | scorecard.yml, test_cpp.yml, test_php_ext.yml, test_ruby.yml, test_upb.yml |

## Context

Per [GitHub's announcement](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/), Node 20 is being deprecated and runners will begin using Node 24 by default starting March 4th, 2026.

### Why this matters

- **Node 20 EOL**: April 2026
- **Node 24 default**: March 4th, 2026
- **Action**: Update to latest action versions that support Node 24

### Security Note

Actions that were previously pinned to commit SHAs remain pinned to SHAs (updated to the latest release SHA) to maintain the security benefits of immutable references.

### Testing

These changes only affect CI/CD workflow configurations and should not impact application functionality. The workflows should be tested by running them on a branch before merging.

Closes #25572

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/25572 from salmanmkc:upgrade-github-actions-node24 ef77dcfa4f
PiperOrigin-RevId: 874140973
2026-02-23 10:27:07 -08:00
Mikita Belahlazau
4f076d951f Add metadata annotations for generated Python protobuf symbols.
The pyi generator now includes Kythe annotations for:
*   Extension field constants (e.g., `EXTENSION_FIELD`).
*   Field number constants (e.g., `STRING_FIELD_FIELD_NUMBER`).
*   `Create` methods in generated Stubby client classes.

These annotations allow the Python indexer to link these generated symbols back to their definitions in the `.proto` files.

PiperOrigin-RevId: 852971617
2026-01-06 16:05:56 -08:00
Protobuf Team Bot
ae67a4c195 Internal version update.
PiperOrigin-RevId: 852733884
2026-01-06 05:27:44 -08:00
Mike Kruskal
f764f12dc8 Upgrade to protobuf-ci v5
PiperOrigin-RevId: 825653280
2025-10-29 12:14:52 -07:00
Adam Cozzette
bb454a777e Automated rollback of commit c256302461.
PiperOrigin-RevId: 781236113
2025-07-09 15:34:29 -07:00
Adam Cozzette
c256302461 Upgrade Clang on Windows test runs and work around MSVC error
#test-continuous

Most of our Windows test runs are currently failing with an error message about
the Clang version being too old. This seems to be an occasional
[issue](https://github.com/actions/runner-images/issues/10001) with the GitHub
Windows runners, and the suggested workaround is to use `choco` to upgrade LLVM.
We should revert this change as soon as the GitHub runners are fixed.

This change also includes a tweak to descriptor.cc to work around a mysterious
"internal compiler error" with MSVC.

PiperOrigin-RevId: 773825728
2025-06-20 13:45:53 -07:00
Mike Kruskal
9d871a1208 Drop windows-2019 runners from CI
#test-continuous

See https://github.com/actions/runner-images/issues/12045

PiperOrigin-RevId: 769765346
2025-06-10 13:16:17 -07:00
Deanna Garcia
7a899d5170 Add C# bazel 8 tests.
#test-continuous

PiperOrigin-RevId: 745314475
2025-04-08 15:32:34 -07:00
Mike Kruskal
117e7bbe74 Breaking change: prohibit using Bazel+MSVC to build protobuf
An opt-out flag `--define=protobuf_allow_msvc=true` will be available until our 2026 breaking release 34.0. See https://github.com/protocolbuffers/protobuf/issues/20085 for more details.

#test-continuous

PiperOrigin-RevId: 720822739
2025-01-28 22:01:32 -08:00
Sandy Zhang
aef40aaf83 Update protobuf repository to use the newest version (v4) of protobuf-ci
#test-continuous

PiperOrigin-RevId: 712618052
2025-01-06 12:33:01 -08:00
Deanna Garcia
afe2de2618 Move to bazel 7 and turn down support for bazel 6.
Migrate all tests to run on bazel 7 and fix errors that came up in the process. 30.x will no longer guarantee support for bazel 6.
#test-continuous

PiperOrigin-RevId: 703590770
2024-12-06 13:05:40 -08:00
Mike Kruskal
8f6afdc0ef Fix some silent failures in our CI.
Some of the more complex GHA were invoking inline bash scripts without setting `-e`, meaning that failures would go unnoticed.

#test-continuous

PiperOrigin-RevId: 702413176
2024-12-03 11:43:17 -08:00
Protobuf Team Bot
13cf397e1a upgrade test images to bazel 6.4
PiperOrigin-RevId: 673392132
2024-09-11 08:06:35 -07:00
Deanna Garcia
2f9cdd1d65 Update GHA tests to return single pass/fail signal at the end
Before this PR, we stored a list internally of tests that must pass on presubmit and tried to keep it up to date.

This PR moves that information keeping into GitHub by adding a 'continuous-only' variable to most testing matrices to allow authors to specify which of their tests should be skipped on presubmit. During presubmit, tests that were specified to not run on presubmit will not be run and their names will be prefixed with "[SKIPPED]". All continuous only tests will be suffixed with "(Continuous)".

At the end of running all the tests, we have a single "All Blocking Tests" signal that will tell us whether all of the necessary tests have passed (either for presubmit or continuous based on how the test was triggered).

I've tested this from a different branch [here](https://github.com/protocolbuffers/protobuf/actions/runs/9602443750?pr=17151) and from a different fork [here](https://github.com/protocolbuffers/protobuf/actions/runs/9602554500?pr=17192). These should be the same and are as far as I can tell.

I also have a continuous test run [here](https://github.com/protocolbuffers/protobuf/actions/runs/9603824200) which runs the entire test suite.

Closes #17198

PiperOrigin-RevId: 662940724
2024-08-14 09:10:14 -07:00
Mike Kruskal
be99767a69 Clear repository cache between bazel runs
PiperOrigin-RevId: 632621361
2024-05-10 15:42:33 -07:00
Mike Kruskal
b28d9d4144 Migrate bazel tests to protobuf-ci.
This will allow them to reuse our bazelrc and remote caching setup.  This also silences the non-bzlmod windows test that's hitting the windows path length.

PiperOrigin-RevId: 626390416
2024-04-19 10:00:00 -07:00
Mike Kruskal
119e71c40a Run C# tests with non-Bazel protobuf-ci actions.
The Bazel action currently isn't setup to regenerate the proto gencode itself, meaning that it won't actually be running on changes in the pending PR.  Long-term, we should migrate this back to Bazel after enabling proto codegen properly.

PiperOrigin-RevId: 611238217
2024-02-28 14:56:38 -08:00
Mike Kruskal
92513fa853 Upgrade setup-dotnet action to hopefully improve network flakes.
PiperOrigin-RevId: 572595942
2023-10-11 09:22:12 -07:00
Mike Kruskal
4ce04206fc Update our tests to use a custom checkout action.
This will retry up to 3 times if we hit networks flakes updating our submodules.  It will also allow us to easily inject other stability fixes to this step in the future.

PiperOrigin-RevId: 568306356
2023-09-25 13:18:39 -07:00
Mike Kruskal
a80daa2a2c Drop support for Bazel 5.
This moves all our CI to Bazel 6 and drops the additional parameterization we had on Bazel version.

PiperOrigin-RevId: 551986376
2023-07-28 17:11:00 -07:00
Joyce
010fde9a18 Set top level permissions to read only on GitHub Workflows (#12971)
Hi, here is Joyce from Google again.

I'd like starting suggesting the [Token-Permission check](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) fix.

Let me know if I might be missing any permission. Thanks!

### Security Reason

This is needed because, by default, github grants write-all permission to all workflows, which could be exploit by an attacker in case of a compromised workflow. Limiting permissions is a simple and effective way to also limit the impact of an eventual compromised workflow.

Thus, it is both a recommendation from [OpenSSF Scorecard](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) and the [Github](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions) to always use credentials that are minimally scoped.

Closes #12971

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12971 from joycebrum:main 6d6dac5678
PiperOrigin-RevId: 537973051
2023-06-05 13:56:32 -07:00
Mike Kruskal
f6c7fdf88c Add -ex switch to all docker bash commands.
Without this, certain failures will be silently ignored.

PiperOrigin-RevId: 527718574
2023-04-27 16:48:31 -07:00
Romfos
09f094c811 [dotnet, csharp] Run tests for supported platforms .NET 6, .NET Framework 4.6.2 (#12378)
What's changed?
- Update some nuget packages (for test projects)
- Run unit tests for supported platforms: .NET 6 + .NET Framework 4.6.2

Notes:
.NET Framework 4.6.1 is out of support, .NET Framework 4.6.2 is the older version that is still supported
https://devblogs.microsoft.com/dotnet/net-framework-4-5-2-4-6-4-6-1-will-reach-end-of-support-on-april-26-2022/

.NET 5 is out of support
https://devblogs.microsoft.com/dotnet/dotnet-5-end-of-support-update/

.NET Core 3.1 is out of support
https://devblogs.microsoft.com/dotnet/net-core-3-1-will-reach-end-of-support-on-december-13-2022/

Visual studio 2012 is out of support
https://devblogs.microsoft.com/visualstudio/support-ends-for-older-versions-of-visual-studio-feb2022

Closes #12378

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12378 from Romfos:main 227661e02c
PiperOrigin-RevId: 523196896
2023-04-10 13:28:23 -07:00
Mike Kruskal
723bd4c3c1 Modify release artifacts for protoc to statically link system libraries.
Closes #12063

PiperOrigin-RevId: 513034570
2023-02-28 14:13:48 -08:00
Mike Kruskal
ef8ebe6c19 Migrate our shared github actions to a separate repository.
This will make PRs from forked repositories significantly less painful, since they'll agree on which version of each action to use.  OTOH, we'll have a separate repo that needs to be maintained, and changes to it will need to be coordinated and versioned carefully.  This will likely need to be done less often though now that our infrastructure is stable.

PiperOrigin-RevId: 512117705
2023-02-24 11:19:20 -08:00
Mike Kruskal
9104075c10 Migrate remaining cross-architecture tests to GHA
PiperOrigin-RevId: 506995031
2023-02-03 14:30:16 -08:00
Mike Kruskal
27f4ecd9e5 Migrate Java and C# Linux tests to GHA
PiperOrigin-RevId: 506782714
2023-02-02 19:20:30 -08:00
Mike Kruskal
f1e746c491 Migrate remaining Windows tests to GHA
PiperOrigin-RevId: 506766851
2023-02-02 17:43:42 -08:00