Skip to content

Commit f17d1d5

Browse files
lrstewartjohubertj
authored andcommitted
Add optional branch alignment support using feature probe
- Enables `-Wa,-mbranches-within-32B-boundaries` only on x86 with GCC ≥8 - Skips it for Clang or unsupported compilers - Uses feature probing to detect support ci: remove S2N_TEST_IN_FIPS_MODE (aws#4994) Migrate PQ Rust code to TLS 1.3 (aws#4998) chore: add new team member (aws#5006) chore(s2n-tls-hyper): Publish s2n-tls-hyper (aws#5000) ci: add script to help launch stuck codebuild jobs (aws#5004) ci: config logging for integration tests (aws#4751) Co-authored-by: Doug Chapman <[email protected]> Migrate PQ Python code to TLS 1.3 (aws#4999) fix: don't prefix empty string when interning (aws#5015) chore: remove unused imports (aws#5017) fix(bindings/bench): Prevent IO from going out of scope (aws#5007) ci: commit integrationv2 small batch spec (aws#5020) ci: keep start_codebuild.sh up-to-date (aws#5023) chore: remove unused test utils (aws#5005) ci: improve output of validate_start_codebuild_script (aws#5031) refactor(bin): remove references to FIPS_mode_set (aws#5026) chore: improve the dashboard comment query (aws#5016) tests: make integV2 locally runnable (aws#5029) feature: remove openssl-1.0.2-fips fips mode support (aws#5030) chore: run more checks on pushes to main (aws#4963) fix: add build specs to copyright check (aws#5025) fix(bindings): Specify correct minimum versions (aws#5028) ci: add timeout for cbmc proof (aws#5038) Co-authored-by: Boquan Fang <[email protected]> test: add sslv2 client hello test w/ jvm (aws#5019) Co-authored-by: Lindsay Stewart <[email protected]> docs: add C / s2n-tls-sys doc references to s2n-tls docs (aws#5012) Add Security Policy Deprecation API (aws#5034) Co-authored-by: James Mayclin <[email protected]> Co-authored-by: Lindsay Stewart <[email protected]> ci: add openssl-3.0-fips builds (aws#5037) fix: initial config should not influence sslv2 (aws#4987) Co-authored-by: maddeleine <[email protected]> chore: bindings release for 0.3.10 (aws#5046) Co-authored-by: Boquan Fang <[email protected]> chore: bump osx Openssl to latest (aws#5041) Signed-off-by: Rui Chen <[email protected]> Co-authored-by: Rui Chen <[email protected]> chore: fix typos (aws#5052) build(deps): bump cross-platform-actions/action from 0.26.0 to 0.27.0 in /.github/workflows in the all-gha-updates group (aws#5053) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ci: pin duvet version (aws#5057) refactor: remove openssl-1.0.2-fips 'allow md5' logic (aws#5048) ci: Adding integ tests back to integv2 (aws#5054) refactor: cleanup CBMC proofs after aws#5048 (aws#5058) feat(bench): impl into for base config type (aws#5056) Revert "ci: remove openssl-1.0.2-fips builds (aws#4995)" (aws#5060) ci: change rust-toolchain format to toml (aws#5070) ci: Emit benchmark metrics from scheduled runs (aws#5064) fix(bindings): prevent temp connection free after panic (aws#5067) docs(integv2): add architecture diagram (aws#5072) docs(s2n-tls-hyper): Add hyper client/server example (aws#5069) ci: fix dependabot, commit & check Cargo.toml (aws#5065) Co-authored-by: Sam Clark <[email protected]> fix(integration): Update PQ integration test expectations (aws#5082) fix: add support for `S2N_INTERN_LIBCRYPTO` with FetchContent (aws#5076) fix: calculation of session ticket age (aws#5001) Co-authored-by: Boquan Fang <[email protected]> fix: error for uninit psk, check for all-zero psk (aws#5084) fix: don't use DEPENDS with add_custom_command(TARGET) (aws#5074) fix(ci): Allow validate_start_codebuild to run on pushes to main (aws#5080) test: add minimal openssl-3.0-fips test (aws#5081) feat(bindings): add external psk apis (aws#5061) Fixed formatting for debugging statements (aws#5094) chore: ktls buildspec (aws#5083) chore: bindings release 0.3.11 (aws#5098) fix(integrationv2): Skip unsupported client auth tests (aws#5096) Co-authored-by: James Mayclin <[email protected]> build(deps): bump aws-actions/configure-aws-credentials from 4.0.2 to 4.1.0 in /.github/workflows in the all-gha-updates group across 1 directory (aws#5107) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor: remove s2n_hmac_is_available (aws#5104) refactor: remove unused evp support for md5+sha1 (aws#5106) fix: allow b64 decoding using libcrypto for sidechannel resistance (aws#5103) Co-authored-by: Sam Clark <[email protected]> Co-authored-by: Doug Chapman <[email protected]> fix: don't enable custom random for openssl fips (aws#5093) Co-authored-by: Sam Clark <[email protected]> ci: add default provider to openssl-3.0-fips (aws#5114) Revert "refactor: remove unused evp support for md5+sha1 (aws#5106)" (aws#5118) Add new security policy (20250211) (aws#5111) refactor: move "s2n_libcrypto_is" methods into s2n_libcrypto.h (aws#5117) bindings: unpin openssl crate from a specific patch version (aws#5120) Co-authored-by: Boquan Fang <[email protected]> chore: fix a typo in API comments (aws#5123) Co-authored-by: Boquan Fang <[email protected]> build(deps): update rand requirement (aws#5125) Co-authored-by: Boquan Fang <[email protected]> fix(bindings): make Context borrow immutable (aws#5071) feat: Option to disable RAND engine override (aws#5108) refactor: use EVP_MD_fetch() if available (aws#5116) Co-authored-by: Sam Clark <[email protected]> chore: binding release 0.3.12 (aws#5128) Co-authored-by: Boquan Fang <[email protected]> fix(bindings): remove mutation behind Arc (aws#5124) chore: remove unused well-known-endpoints.py (aws#5127) feat: add async cert validation support (aws#5110) ci: add check for third-party-src in disable rand override buildspec (aws#5137) Co-authored-by: Boquan Fang <[email protected]> refactor: always use EVP hashing (aws#5121) fix: update callback return value (aws#5136) ci: always set values for command line defines (aws#5126) tests: use sig schemes as source of truth for valid hash+sig algs (aws#5129) build(deps): update rtshark requirement from 2.9.0 to 3.1.0 in /tests/pcap in the all-cargo-updates group across 1 directory (aws#5087) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> test(integv2): fixes to allow test_record_padding to partially run (aws#5099) Co-authored-by: James Mayclin <[email protected]> chore(nix): Add aws-lc-fips 2022/4 (aws#5109) Co-authored-by: Lindsay Stewart <[email protected]> Ruff Formatting and add to CI (aws#5138) Co-authored-by: James Mayclin <[email protected]> feat(bindings): expose context on cert chain (aws#5132) Co-authored-by: Sam Clark <[email protected]> refactor: cleanup prf header (aws#5144) refactor: add alternative EVP signing method (aws#5141) fix: memory leak during STEK rotation (aws#5146) chore(ci): make the awslc fips install script version aware (aws#5100) Co-authored-by: Lindsay Stewart <[email protected]> Co-authored-by: Sam Clark <[email protected]> refactor: remove unused prf hmac impls (aws#5148) chore(bindings): change in rustup behavior (aws#5160) chore: git-blame-ignore ruff formatting (aws#5151) tests: try to make s2n_mem_usage_test more useful (aws#5139) Co-authored-by: Sam Clark <[email protected]> chore(ci): pin symbolic-common (aws#5166) chore: binding release 0.3.13 (aws#5167) refactor: add libcrypto PRF impl for openssl-3.0-fips (aws#5158) build(deps): bump nixbuild/nix-quick-install-action from 29 to 30 in /.github/workflows in the all-gha-updates group (aws#5153) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> style: fix redundant return (aws#5150) chore: update git blame ignore commit ID (aws#5164) tests: fix flaky ja4 test (aws#5169) fix: mark chachapoly as unavailable with openssl-3.0-fips (aws#5168) fix(ruff): resolve linting errors detected by Ruff (aws#5140) chore: pin once_cell version to unblock the CI (aws#5174) Co-authored-by: Boquan Fang <[email protected]> ci: use ruff --diff instead of --check (aws#5177) (docs): Improve PQ docs (aws#5173) Co-authored-by: Sam Clark <[email protected]> test(integv2): add partial support for OpenSSL 3.0 provider (aws#5131) Co-authored-by: James Mayclin <[email protected]> ci: make start_codebuild.sh work for forks (aws#5178) chore: add inline noqa suppression (aws#5159) test: reduce parameter selection (aws#5161) test: fix self-talk pkey offload test for openssl-3.0-fips (aws#5175) build(deps): update aws-lc-rs version to remove paste deps (aws#5192) Co-authored-by: Boquan Fang <[email protected]> chore: bump linting action Ubuntu version (aws#5186) Co-authored-by: Boquan Fang <[email protected]> ci: cleanup awslc-fips versioning (aws#5156) chore: include Need By Date section in github issue template (aws#5187) Co-authored-by: Boquan Fang <[email protected]> ci: move openssl3fips build to existing asan build (aws#5181) fix: openssl-3.0-fips should use separate private rand (aws#5184) fix: remove unnecessary RC4 restriction (aws#5170) fix: openssl-3.0-fips should use libcrypto HKDF (aws#5183) Co-authored-by: Sam Clark <[email protected]> ci: defend against unset version number in awslc installer (aws#5195) feature: openssl-3.0-fips support (aws#5191) ci: add libcrypto openssl-3.0-fips to integ tests (aws#5202) ci: add openssl-3.0-fips to asan build properly (aws#5204) fix: handshake message length integer overflow in s2n_handshake_finish_header (aws#5206) Co-authored-by: Boquan Fang <[email protected]> chore: deprecate s2n_set (aws#5155) chore: binding release 0.3.14 (aws#5210) Remove PQ TLS 1.2 from all Security Policies (aws#5194) ci: exclude new setuptools (aws#5215) fix: Update README.md to include Rust bindings docs (aws#5212) feat: add s2n_connection_get_key_exchange_group (aws#5209) chore: bindings release 0.3.15 (aws#5221) ci: add openssl-3.0-fips to valgrind (aws#5211) docs: fix openssl-3.0-fips provider requirements documentation (aws#5214) refactor(bindings): use implicit linking for aws-lc (aws#5218) fix: tighten session ticket lifetime (aws#5217) ci: Fix cppcheck build (aws#5238) refactor: implement match the same for all pkeys (aws#5224) ci: add openssl-3.0-fips to general batch (aws#5207) refactor: add evp pkey size/encrypt/decrypt methods (aws#5225) feat(bindings): expose certificate match api (aws#5220) Co-authored-by: James Mayclin <[email protected]> ci: add ruff linting (aws#5182) ci: pin nix installer to older version (aws#5245) chore: Fix new clippy warning (aws#5243) Co-authored-by: Boquan Fang <[email protected]> ci: rebalance integV2 testcases (aws#5232) fix: tainted handshake.io and add large client hello test (aws#5208) Co-authored-by: Boquan Fang <[email protected]> chore: bindings release 0.3.16 (aws#5242) Co-authored-by: Boquan Fang <[email protected]> refactor: remove legacy pkey impls (aws#5241) Revert "ci: exclude new setuptools (aws#5215)" (aws#5226) fix: make -fPIC flag private (aws#5227) Co-authored-by: Souvik Banerjee <[email protected]> doc: tainted stuffer reset operation (aws#5231) Co-authored-by: Boquan Fang <[email protected]> feat: Expose `as_ptr()` for external build (aws#5229) ci: pytest generate junit reports (aws#5235) add compiler flag added c check x86 and correct compiler cmake fix testing removed clang Print statements compiler check print find clang branch probing removed individual probing removed old unneeded changes added back original line fixed .c file ci: use correct openssl version for updated AL2023 version (aws#5255) chore(ci): revert nix installer pin (aws#5251) ci: add awslcfips to nix jobs (aws#5205) Co-authored-by: Copilot <[email protected]> moved adding options to the bottom copmiler debug prints clang printout remove setting compiler to clang set clang as default remove clang move fuzz cmake into it's own directory fixed path to fuzz back to original only branch if we're not fuzz tests add clang back now removed debugging prints removed checking for compiler testing move back original block removed feature probe messaging because we already have them
1 parent 7220e23 commit f17d1d5

File tree

444 files changed

+11345
-8593
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+11345
-8593
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ f5351ef6629d1f6de144ab478bf4294ec277b321
3939
e8cdc1ae63ff1de6f14cf91e3c317fbf57c198ec
4040
# clang-format `utils/` and enforce in ci (#3651)
4141
be8ad6c027b50e9dc86d8f8eb729ce88f2d4206d
42+
# Ruff format updated CI and code (#5138)
43+
ac1d09851b4d625f83d1fa68b467abbca8fdd408

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ AWS Security via our [vulnerability reporting page](http://aws.amazon.com/securi
1717

1818
A short description of what the problem is and why we need to fix it. Add reproduction steps if necessary.
1919

20+
### Need By Date:
21+
22+
Do you have a date that you need this issue resolved by? What is the reason for that date, and what are the consequences of missing it? Any additional information you can provide to help prioritize the issue is appreciated. However, we cannot guarantee that this issue will be fixed by the requested date.
23+
2024
### Solution:
2125

2226
A description of the possible solution in terms of S2N architecture. Highlight and explain any potentially controversial design decisions taken.

.github/ISSUE_TEMPLATE/s2n-issue.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ AWS Security via our [vulnerability reporting page](http://aws.amazon.com/securi
1616

1717
A short description of what the problem is and why we need to fix it. Add reproduction steps if necessary.
1818

19+
### Need By Date:
20+
21+
Do you have a date that you need this issue resolved by? What is the reason for that date, and what are the consequences of missing it? Any additional information you can provide to help prioritize the issue is appreciated. However, we cannot guarantee that this issue will be fixed by the requested date.
22+
1923
### Solution:
2024

2125
A description of the possible solution in terms of S2N architecture. Highlight and explain any potentially controversial design decisions taken.

.github/dependabot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ updates:
3131
# restricted-MSRV, so don't do batch updates
3232
- package-ecosystem: "cargo"
3333
directories:
34-
- "/bindings/rust"
34+
- "/bindings/rust/standard"
35+
- "/bindings/rust/extended"
3536
schedule:
3637
interval: "daily"

.github/install_osx_dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ brew_install_if_not_installed coreutils
2626
brew_install_if_not_installed cppcheck
2727
brew_install_if_not_installed pkg-config # for gnutls compilation
2828
brew_install_if_not_installed ninja
29-
brew_install_if_not_installed openssl@1.1 # for libcrypto
29+
brew_install_if_not_installed openssl@3 # for libcrypto

.github/s2n_osx.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@
1414
# permissions and limitations under the License.
1515
#
1616
set -eu
17-
source codebuild/bin/s2n_setup_env.sh
1817

18+
export S2N_LIBCRYPTO=openssl-3.4
1919
export CTEST_OUTPUT_ON_FAILURE=1
20-
BREWINSTLLPATH=$(brew --prefix openssl@1.1)
21-
OPENSSL_1_1_1_INSTALL_DIR="${BREWINSTLLPATH:-"/usr/local/Cellar/openssl@1.1/1.1.1?"}"
20+
BREWINSTLLPATH=$(brew --prefix openssl@3)
21+
OPENSSL_3_INSTALL_DIR="${BREWINSTLLPATH:-"/opt/homebrew/Cellar/openssl@3"}"
2222

23-
echo "Using OpenSSL at $OPENSSL_1_1_1_INSTALL_DIR"
23+
echo "Using OpenSSL at $OPENSSL_3_INSTALL_DIR"
2424
# Build with debug symbols and a specific OpenSSL version
2525
cmake . -Bbuild -GNinja \
2626
-DCMAKE_BUILD_TYPE=Debug \
27-
-DCMAKE_PREFIX_PATH=${OPENSSL_1_1_1_INSTALL_DIR} ..
27+
-DCMAKE_PREFIX_PATH=${OPENSSL_3_INSTALL_DIR} ..
2828

2929
cmake --build ./build -j $(nproc)
3030
time CTEST_PARALLEL_LEVEL=$(nproc) ninja -C build test
3131

3232
# Build shared library
3333
cmake . -Bbuild -GNinja \
3434
-DCMAKE_BUILD_TYPE=Debug \
35-
-DCMAKE_PREFIX_PATH=${OPENSSL_1_1_1_INSTALL_DIR} .. \
35+
-DCMAKE_PREFIX_PATH=${OPENSSL_3_INSTALL_DIR} .. \
3636
-DBUILD_SHARED_LIBS=ON
3737

3838
cmake --build ./build -j $(nproc)

.github/teams.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ s2n-core:
88
- '@jmayclin'
99
- '@jouho'
1010
- '@boquan-fang'
11-
- '@CarolYeh910'
11+
- '@CarolYeh910'
12+
- '@johubertj'

.github/workflows/bench.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Benchmarking
22

33
on:
4+
pull_request:
5+
branches: [main]
46
push:
57
branches: [main]
68
schedule:
@@ -29,23 +31,26 @@ jobs:
2931
pip3 install "boto3[crt]"
3032
3133
- name: Generate
32-
working-directory: bindings/rust
34+
working-directory: bindings/rust/extended
3335
run: ./generate.sh --skip-tests
3436

3537
- name: Benchmark
36-
working-directory: bindings/rust/bench
38+
working-directory: bindings/rust/standard/bench
3739
run: cargo criterion --message-format json > criterion_output.log
3840

3941
- name: Configure AWS Credentials
40-
uses: aws-actions/[email protected]
42+
# Only continue with the workflow to emit metrics on code that has been merged to main.
43+
if: github.event_name != 'pull_request'
44+
uses: aws-actions/[email protected]
4145
with:
4246
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole
4347
role-session-name: s2ntlsghabenchsession
4448
aws-region: us-west-2
4549

4650
- name: Emit CloudWatch metrics
51+
if: github.event_name != 'pull_request'
4752
run: |
4853
python3 .github/bin/criterion_to_cloudwatch.py \
49-
--criterion_output_path bindings/rust/bench/criterion_output.log \
54+
--criterion_output_path bindings/rust/standard/bench/criterion_output.log \
5055
--namespace s2n-tls-bench \
5156
--platform ${{ runner.os }}-${{ runner.arch }}

.github/workflows/ci_compliance.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- name: Run duvet action
3232
uses: ./s2n-quic/.github/actions/duvet
3333
with:
34+
duvet-version: 0.3.0 # Pin until we fix parsing issues
3435
s2n-quic-dir: ./s2n-quic
3536
report-script: compliance/generate_report.sh
3637
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole

.github/workflows/ci_freebsd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: FreeBSD
22

33
on:
4+
push:
5+
branches: [main]
46
pull_request:
57
branches: [main]
68
merge_group:

.github/workflows/ci_linting.yml

Lines changed: 75 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
---
22
name: Linters
33
on:
4+
push:
5+
branches: [main]
46
pull_request:
57
branches: [main]
68
merge_group:
79
types: [checks_requested]
810
branches: [main]
911
jobs:
1012
cppcheck:
11-
# ubuntu-latest introduced a newer gcc version that cannot compile cppcheck 2.3
12-
# TODO: upgrade to latest cppcheck and revert to ubuntu-latest
13-
# see https://github.com/aws/s2n-tls/issues/3656
14-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-latest
1514
env:
1615
CPPCHECK_INSTALL_DIR: test-deps/cppcheck
1716
steps:
@@ -72,21 +71,40 @@ jobs:
7271
run: |
7372
./codebuild/bin/run_kwstyle.sh
7473
./codebuild/bin/cpp_style_comment_linter.sh
75-
pepeight:
74+
75+
ruff:
7676
runs-on: ubuntu-latest
7777
steps:
7878
- name: checkout
7979
uses: actions/checkout@v4
80-
- name: Run autopep8
81-
id: autopep8
82-
uses: peter-evans/autopep8@v2
83-
with:
84-
args: --diff --exit-code .
85-
- name: Check exit code
86-
if: steps.autopep8.outputs.exit-code != 0
80+
81+
- name: Set up uv
82+
uses: astral-sh/setup-uv@v5
83+
84+
- name: Run Ruff formatting check
85+
working-directory: tests/integrationv2
86+
id: ruff_format
87+
run: uv run ruff format --diff .
88+
continue-on-error: true
89+
90+
- name: Check format exit code
91+
if: steps.ruff_format.outcome == 'failure'
8792
run: |
88-
echo "Run 'autopep8 --in-place .' to fix"
93+
echo "Run 'ruff format .' to fix formatting issues"
8994
exit 1
95+
96+
- name: Run Ruff lint check
97+
working-directory: tests/integrationv2
98+
id: ruff_lint
99+
run: uv run ruff check .
100+
continue-on-error: true
101+
102+
- name: Check lint exit code
103+
if: steps.ruff_lint.outcome == 'failure'
104+
run: |
105+
echo "Linting issues detected. Run 'ruff check .' locally to see errors and fix them."
106+
exit 1
107+
90108
clang-format:
91109
runs-on: ubuntu-latest
92110
steps:
@@ -101,7 +119,7 @@ jobs:
101119
runs-on: ubuntu-latest
102120
steps:
103121
- uses: actions/checkout@v4
104-
- uses: nixbuild/nix-quick-install-action@v29
122+
- uses: nixbuild/nix-quick-install-action@v30
105123
with:
106124
nix_conf: experimental-features = nix-command flakes
107125
- name: nix flake check
@@ -110,7 +128,7 @@ jobs:
110128
runs-on: ubuntu-latest
111129
steps:
112130
- uses: actions/checkout@v4
113-
- uses: nixbuild/nix-quick-install-action@v29
131+
- uses: nixbuild/nix-quick-install-action@v30
114132
with:
115133
nix_conf: experimental-features = nix-command flakes
116134
- name: nix fmt
@@ -128,3 +146,45 @@ jobs:
128146
exit 1
129147
- name: Success
130148
run: echo "All nix files passed format check"
149+
150+
validate_start_codebuild_script:
151+
name: validate start_codebuild.sh
152+
runs-on: ubuntu-latest
153+
steps:
154+
- uses: actions/checkout@v4
155+
- name: pause
156+
run: "sleep 120"
157+
- name: retrieve statuses
158+
id: get_statuses
159+
uses: octokit/[email protected]
160+
with:
161+
route: GET /repos/{repo}/commits/{ref}/statuses?per_page=100
162+
repo: ${{ github.repository }}
163+
ref: ${{ github.event.merge_group.head_sha || github.event.pull_request.head.sha || github.event.after }}
164+
env:
165+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166+
- name: check start_codebuild.sh against statuses
167+
id: github_builds
168+
run: |
169+
from_github=$(
170+
jq '.[] | .description' <<< '${{ steps.get_statuses.outputs.data }}' \
171+
| grep "for project" \
172+
| sed -r "s/^.*?for project (.*?)\"$/\1/" \
173+
| sort -u
174+
)
175+
if [ -z "$from_github" ]; then
176+
echo "No codebuild job statuses!"
177+
echo "You may need to kick off the codebuild jobs with" \
178+
"./codebuild/bin/start_codebuild.sh and then retry."
179+
exit 1
180+
fi
181+
echo builds from github statuses:
182+
printf "$from_github\n\n"
183+
from_file=$(
184+
source codebuild/bin/start_codebuild.sh > /dev/null \
185+
|| printf "%s\n" "${BUILDS[@]}" | cut -d" " -f1 | sort -u
186+
)
187+
echo builds from start_codebuild.sh:
188+
printf "$from_file\n\n"
189+
echo "diff output:"
190+
diff <(echo "$from_github") <(echo "$from_file")

.github/workflows/ci_openbsd.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: OpenBSD
22

33
on:
4+
push:
5+
branches: [main]
46
pull_request:
57
branches: [main]
68
merge_group:
@@ -15,7 +17,7 @@ jobs:
1517
- uses: actions/checkout@v4
1618
- name: Build and test in OpenBSD
1719
id: test
18-
uses: cross-platform-actions/action@v0.26.0
20+
uses: cross-platform-actions/action@v0.27.0
1921
with:
2022
operating_system: openbsd
2123
architecture: x86-64

0 commit comments

Comments
 (0)