Skip to content

Add build with hardened flag #2396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,37 @@ jobs:
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
run: cmake --build ./build --target run_tests

gcc-14-hardened:
if: github.repository_owner == 'aws'
needs: [ sanity-test-run ]
strategy:
fail-fast: false
matrix:
gccversion:
- "14"
fips:
- "0"
- "1"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: gcc-${{ matrix.gccversion }}
cxx-compiler: g++-${{ matrix.gccversion }}
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
# TODO: Re-enable gcc-14/FIPS build once delocator updated
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
run: |
cmake -DCMAKE_C_FLAGS='-O2 -fhardened -Wno-error=hardened' -S. -Bbuild
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious what errors do we see with just -O2 -fhardened. Are these errors things we can fix in our code?

cmake --build ./build --target all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use the run_tests target so that we verify the tests pass with this build configuration?


gcc-13-pedantic:
if: github.repository_owner == 'aws'
needs: [ sanity-test-run ]
Expand Down
Loading