Skip to content
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

Support: ubuntu-24.04-arm Github runners, Amazon Linux 2023. Fix: aws-crt-cpp sanity test #319

Merged
merged 13 commits into from
Mar 21, 2025
Merged
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
7 changes: 3 additions & 4 deletions .github/workflows/sanity-test.yml
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ jobs:
fail-fast: false
matrix:
compiler: [gcc-8, clang-9]
std: [c++11, c++14, c++17, c++2a]
cxx-std: ["11", "14", "17", "20"]
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
@@ -224,10 +224,9 @@ jobs:
name: builder
path: .

- name: Build aws-crt-cpp with ${{ matrix.compiler }}/${{ matrix.std }}
- name: Build aws-crt-cpp with ${{ matrix.compiler }}/cxx${{ matrix.cxx-std }}
run: |
export CXXFLAGS=-std=${{ matrix.std }}
python3 builder.pyz build -p aws-crt-cpp --compiler=${{ matrix.compiler }}
python3 builder.pyz build -p aws-crt-cpp --compiler=${{ matrix.compiler }} --cmake-extra=-DCMAKE_CXX_STANDARD=${{ matrix.cxx-std }}
release_notes:
strategy:
1 change: 1 addition & 0 deletions builder/actions/cmake.py
Original file line number Diff line number Diff line change
@@ -147,6 +147,7 @@ def _build_project(env, project, cmake_extra, build_tests=False, args_transforme
"-H{}".format(project_source_dir),
"-DAWS_WARNINGS_ARE_ERRORS=ON",
"-DPERFORM_HEADER_CHECK=ON",
"-DCMAKE_VERBOSE_MAKEFILE=ON", # shows all flags passed to compiler & linker
"-DCMAKE_INSTALL_PREFIX=" + project_install_dir,
"-DCMAKE_PREFIX_PATH=" + project_install_dir,
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
12 changes: 9 additions & 3 deletions builder/core/data.py
Original file line number Diff line number Diff line change
@@ -215,6 +215,15 @@ class PKG_TOOLS(Enum):
'python': "python3",
},
},
'al2023': {
'os': 'linux',
'pkg_tool': PKG_TOOLS.DNF,
'pkg_update': 'dnf update -y',
'pkg_install': 'dnf install -y',
'variables': {
'python': "python3",
},
},
'manylinux': {
'os': 'linux',
'pkg_tool': PKG_TOOLS.YUM,
@@ -321,9 +330,6 @@ class PKG_TOOLS(Enum):
'armv7': {
'run_tests': False
},
'armv8': {
'run_tests': False
},
'mips': {
'run_tests': False
},
3 changes: 2 additions & 1 deletion builder/core/project.py
Original file line number Diff line number Diff line change
@@ -553,7 +553,8 @@ def build_consumers(self, env):
for c in consumers:
build_consumers += _build_project(c, env)
# build consumer tests
build_consumers += to_list(c.test(env))
if c.needs_tests(env):
build_consumers += to_list(c.test(env))
if len(build_consumers) == 0:
return None
return Script(build_consumers, name='build consumers of {}'.format(self.name))
3 changes: 2 additions & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
@@ -73,7 +73,8 @@ def post_build(env):
return env.project.post_build(env)

def test(env):
return env.project.test(env)
if env.project.needs_tests(env):
return env.project.test(env)

def install(env):
return env.project.install(env)
7 changes: 5 additions & 2 deletions tests/test_project.py
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
'name': 'test-proj',
'search_dirs': [test_data_dir],
'path': here,
'run_tests': True,
}


@@ -148,7 +149,8 @@ def test_downstream_tests_build_by_default(self):
]

p = Project(**config)
mock_env = mock.Mock(name='MockEnv', config=config)
m_toolchain = mock.Mock(name='mock toolchain', cross_compile=False)
mock_env = mock.Mock(name='MockEnv', config=config, project=p, toolchain=m_toolchain)
mock_env.spec = BuildSpec()
steps = p.build_consumers(mock_env)
self._assert_step_contains_all(steps, ['test lib-1'])
@@ -163,7 +165,8 @@ def test_downstream_post_build_runs_before_tests(self):
]

p = Project(**config)
mock_env = mock.Mock(name='MockEnv', config=config)
m_toolchain = mock.Mock(name='mock toolchain', cross_compile=False)
mock_env = mock.Mock(name='MockEnv', config=config, project=p, toolchain=m_toolchain)
mock_env.spec = BuildSpec()
steps = p.build_consumers(mock_env)
self._assert_step_contains_all(steps, ['post build lib-1', 'test lib-1'])