Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm authored Jul 29, 2024
2 parents 45765dd + 622853c commit ab72d87
Show file tree
Hide file tree
Showing 187 changed files with 18,407 additions and 3,723 deletions.
4 changes: 2 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,google-runtime-int,llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-non-const-parameter,-readability-avoid-const-params-in-decls,-readability-else-after-return,-readability-isolate-declaration,-readability-uppercase-literal-suffix,-bugprone-sizeof-expression'
Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,google-runtime-int,llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-non-const-parameter,-readability-avoid-const-params-in-decls,-readability-else-after-return,-readability-isolate-declaration,-readability-uppercase-literal-suffix,-bugprone-sizeof-expression,-bugprone-easily-swappable-parameters,-readability-identifier-length,-misc-no-recursion,-readability-function-cognitive-complexity,-readability-magic-numbers'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*\.[h|inl]$'
HeaderFilterRegex: '^(?!.*external).*\.[h|inl]$'
FormatStyle: 'file'
CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
Expand Down
45 changes: 35 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'main'

env:
BUILDER_VERSION: v0.9.43
BUILDER_VERSION: v0.9.62
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
BUILDER_SOURCE: releases
PACKAGE_NAME: aws-c-common
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-16
windows-vc15:
runs-on: windows-2022 # latest
runs-on: windows-2019 # windows-2019 is last env with Visual Studio 2017 (v15.0)
strategy:
matrix:
arch: [x86, x64]
Expand Down Expand Up @@ -174,17 +174,26 @@ jobs:
echo "Starting to run AppVerifier on all tests found by CTest"
python .\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-c-common\build\aws-c-common
osx:
runs-on: macos-12 # latest
macos-x64:
runs-on: macos-14-large # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }}
osx-no-cpu-extensions:
runs-on: macos-12 # latest
macos:
runs-on: macos-14 # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }}
macos-no-cpu-extensions:
runs-on: macos-14 # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
Expand All @@ -197,10 +206,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build ${{ env.PACKAGE_NAME }} + consumers
uses: cross-platform-actions/action@v0.10.0
uses: cross-platform-actions/action@v0.20.0
with:
operating_system: openbsd
architecture: x86-64
version: '7.2'
shell: bash
run: |
Expand All @@ -209,6 +217,23 @@ jobs:
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }}
freebsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build ${{ env.PACKAGE_NAME }} + consumers
uses: cross-platform-actions/action@v0.20.0
with:
operating_system: freebsd
version: '13.2'
run: |
sudo pkg install -y python3 devel/py-pip net/py-urllib3 cmake
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }}
cross_compile:
name: Cross Compile ${{matrix.arch}}
runs-on: ubuntu-20.04 # latest
Expand Down Expand Up @@ -239,8 +264,8 @@ jobs:
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --config Debug
osx-debug:
runs-on: macos-12 # latest
macos-debug:
runs-on: macos-14 # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ on: [push]
jobs:
clang-format:

runs-on: ubuntu-20.04 # latest
runs-on: ubuntu-24.04 # latest

steps:
- name: Checkout Sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: clang-format lint
uses: DoozyX/clang-format-lint-action@v0.3.1
with:
# List of extensions to check
extensions: c,h,inl
source: 'source include tests verification'
run: |
./format-check.py
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

strategy:
matrix:
host: [ubuntu-20.04] # latest
host: [ubuntu-22.04] # latest

runs-on: ${{ matrix.host }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:

env:
BUILDER_VERSION: v0.9.37
BUILDER_VERSION: v0.9.55
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
BUILDER_SOURCE: releases
PACKAGE_NAME: aws-c-common
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/handle-stale-discussions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: HandleStaleDiscussions
on:
schedule:
- cron: '0 */4 * * *'
discussion_comment:
types: [created]

jobs:
handle-stale-discussions:
name: Handle stale discussions
runs-on: ubuntu-latest
permissions:
discussions: write
steps:
- name: Stale discussions action
uses: aws-github-ops/handle-stale-discussions@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
10 changes: 5 additions & 5 deletions .github/workflows/proof_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
run: |
# Search within 5 most recent releases for latest available package
CBMC_REL="https://api.github.com/repos/diffblue/cbmc/releases?page=1&per_page=5"
CBMC_DEB=$(curl -s $CBMC_REL | jq -r '.[].assets[].browser_download_url' | grep -e 'ubuntu-20.04' | head -n 1)
CBMC_DEB=$(curl -s $CBMC_REL --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r '.[].assets[].browser_download_url' | grep -e 'ubuntu-20.04' | head -n 1)
CBMC_ARTIFACT_NAME=$(basename $CBMC_DEB)
curl -o $CBMC_ARTIFACT_NAME -L $CBMC_DEB
sudo dpkg -i $CBMC_ARTIFACT_NAME
Expand All @@ -81,7 +81,7 @@ jobs:
shell: bash
run: |
CBMC_VIEWER_REL="https://api.github.com/repos/model-checking/cbmc-viewer/releases/latest"
CBMC_VIEWER_VERSION=$(curl -s $CBMC_VIEWER_REL | jq -r .name | sed 's/viewer-//')
CBMC_VIEWER_VERSION=$(curl -s $CBMC_VIEWER_REL --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r .name | sed 's/viewer-//')
pip3 install cbmc-viewer==$CBMC_VIEWER_VERSION
- name: Install CBMC viewer ${{ env.CBMC_VIEWER_VERSION }}
if: ${{ env.CBMC_VIEWER_VERSION != 'latest' }}
Expand All @@ -97,7 +97,7 @@ jobs:
run: |
# Search within 5 most recent releases for latest available package
LITANI_REL="https://api.github.com/repos/awslabs/aws-build-accumulator/releases?page=1&per_page=5"
LITANI_DEB=$(curl -s $LITANI_REL | jq -r '.[].assets[0].browser_download_url' | head -n 1)
LITANI_DEB=$(curl -s $LITANI_REL --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r '.[].assets[0].browser_download_url' | head -n 1)
DBN_PKG_FILENAME=$(basename $LITANI_DEB)
curl -L $LITANI_DEB -o $DBN_PKG_FILENAME
sudo apt-get update
Expand All @@ -119,7 +119,7 @@ jobs:
if ${{ env.KISSAT_TAG == 'latest' }}
then
KISSAT_REL="https://api.github.com/repos/arminbiere/kissat/releases/latest"
KISSAT_TAG_NAME=$(curl -s $KISSAT_REL | jq -r '.tag_name')
KISSAT_TAG_NAME=$(curl -s $KISSAT_REL --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r '.tag_name')
else
KISSAT_TAG_NAME=${{ env.KISSAT_TAG }}
fi
Expand All @@ -138,7 +138,7 @@ jobs:
if ${{ env.CADICAL_TAG == 'latest' }}
then
CADICAL_REL="https://api.github.com/repos/arminbiere/cadical/releases/latest"
CADICAL_TAG_NAME=$(curl -s $CADICAL_REL | jq -r '.tag_name')
CADICAL_TAG_NAME=$(curl -s $CADICAL_REL --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r '.tag_name')
else
CADICAL_TAG_NAME=${{ env.CADICAL_TAG }}
fi
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/proof_ci_resources/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cadical-tag: latest
cbmc-version: latest
cbmc-viewer-version: latest
kissat-tag: latest
litani-version: latest
# Use exact versions (instead of "latest") so we're not broken by surprise upgrades.
cadical-tag: "rel-2.0.0" # tag of latest release: https://github.com/arminbiere/cadical/releases
cbmc-version: "6.1.0" # semver of latest release: https://github.com/diffblue/cbmc/releases
cbmc-viewer-version: "3.9" # semver of latest release: https://github.com/model-checking/cbmc-viewer/releases
kissat-tag: "rel-3.1.1" # tag of latest release: https://github.com/arminbiere/kissat/releases
litani-version: "1.29.0" # semver of latest release: https://github.com/awslabs/aws-build-accumulator/releases
proofs-dir: verification/cbmc/proofs
run-cbmc-proofs-command: ./run-cbmc-proofs.py
7 changes: 5 additions & 2 deletions .github/workflows/stale_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
cleanup:
runs-on: ubuntu-latest
name: Stale issue job
permissions:
issues: write
pull-requests: write
steps:
- uses: aws-actions/stale-issue-cleanup@v3
with:
Expand All @@ -30,8 +33,8 @@ jobs:
closed-for-staleness-label: closed-for-staleness

# Issue timing
days-before-stale: 2
days-before-close: 5
days-before-stale: 10
days-before-close: 4
days-before-ancient: 36500

# If you don't want to mark a issue as being ancient based on a
Expand Down
Loading

0 comments on commit ab72d87

Please sign in to comment.