Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ba596bb
feat: add cross compilation capabilities (closes #22)
Terracom12 Oct 16, 2025
f3844ed
hotfix: prevent race condition with traced subproc timeouts (closes #34)
Terracom12 Oct 20, 2025
143becc
chore: major workflow updates and cross compilation support (closes #63)
Terracom12 Oct 20, 2025
bb1e1e0
Massive updates to workflow script, add cross-compilation support and…
Terracom12 Oct 24, 2025
1ba5848
feat: very basic api for temporary file management (#65)
Terracom12 Oct 24, 2025
f340896
fix: capture stderr for subprocesses (#64)
Terracom12 Oct 24, 2025
8c7ca30
fix: enable -Werror and fix all compiler warnings (#66)
Terracom12 Oct 26, 2025
aa813bc
feat: more version info (#67)
Terracom12 Nov 26, 2025
42d25c5
update .clangd
Terracom12 Nov 26, 2025
7cb660d
begin adding meson.build files
Terracom12 Nov 28, 2025
857e51c
update .clang-format to permit angled for "main" header
Terracom12 Nov 28, 2025
d9e1d05
add CLEANUP.md for todos
Terracom12 Nov 28, 2025
7e64811
set default c++ standard to 20
Terracom12 Nov 28, 2025
c498750
meson.build now functional; add meson_options.txt
Terracom12 Nov 29, 2025
4068ce5
adjust include paths to always use public paths
Terracom12 Nov 29, 2025
3ff2baf
update src/meson.build
Terracom12 Nov 29, 2025
e441a7a
update catch2 wrap with older version
Terracom12 Nov 29, 2025
c724abe
add tests subdir for meson
Terracom12 Nov 29, 2025
b200046
update cleanup.md
Terracom12 Nov 29, 2025
45bcd32
add doxygen-awesome-css submodule for docs
Terracom12 Nov 29, 2025
cbb7445
add meson.build for docs
Terracom12 Nov 29, 2025
4b5f490
disable catch2's internal tests
Terracom12 Nov 29, 2025
b5365d5
rename test files for 'static' and rework tests/meson.build
Terracom12 Nov 29, 2025
96f9374
remove majority of scripts
Terracom12 Nov 29, 2025
a6bcb06
fix stats script
Terracom12 Nov 29, 2025
280c0d0
run clang-format on all files
Terracom12 Nov 29, 2025
53dc0a3
fix asmgrader_with_main meson dependency
Terracom12 Nov 30, 2025
502c495
remove boost-stacktrace dep from main.cpp
Terracom12 Nov 30, 2025
8ecc3dd
add define for professor_mode option
Terracom12 Nov 30, 2025
3319c24
fix professor mode define
Terracom12 Nov 30, 2025
56956bf
update meson min version to supress warnings
Terracom12 Nov 30, 2025
f0b7fc4
update tests with meson integration
Terracom12 Nov 30, 2025
c41a392
add default asan in debug mode
Terracom12 Dec 1, 2025
c6f42e5
add gcovrc and lcovrc for coverage defaults
Terracom12 Dec 1, 2025
83726c7
update ci workflow
Terracom12 Dec 1, 2025
57b4aab
try ci with newer gcc version [no ci]
Terracom12 Dec 1, 2025
f8dc59a
fix bad assignment test
Terracom12 Dec 1, 2025
2b67e38
update ci job, hopefully working now
Terracom12 Dec 1, 2025
9ddf150
add getter for program in test context
Terracom12 Dec 2, 2025
2435c24
bump min required meson version
Terracom12 Dec 7, 2025
53e4f7a
add descriptions to meson options
Terracom12 Dec 7, 2025
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
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ AllowShortFunctionsOnASingleLine: Inline

SortIncludes: CaseInsensitive

# Permit quotes ("") or angled brackets (<>) for the "main" include header
MainIncludeChar: Any

# Categories:
# Main header (top)
# Project headers
Expand Down
2 changes: 1 addition & 1 deletion .clangd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CompileFlags:
Add: -DPROFESSOR_VERSION
Remove: -fconcepts-diagnostics-depth=*
CompilationDatabase: build/unixlike-gcc-debug
CompilationDatabase: build/unixlike-gcc-ninja-debug

InlayHints:
BlockEnd: No
Expand Down
193 changes: 193 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# Same as .gitignore

# Temporary tests
temp/

# Binary files
bin/
build/
*.so
*.o
*.out
*.a
*.exe

##### From Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
reports/
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Vim swap file
.swp
2 changes: 2 additions & 0 deletions .gcovrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
filter = src/
filter = include/
1 change: 1 addition & 0 deletions .github/actions/setup_cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ runs:
path: |
~/.cache/pip
~/.cache/ccache
~/.cache/meson-pkgs
~/.ccache
~/.config/ccache
${{ env.LOCALAPPDATA }}/ccache
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
compiler: [gcc-11] # TODO: Add llvm-14; cpptrace does not work without libgcc's _Unwind though
build_type: [debug, release]
generator: [Ninja] # TODO: Maybe add Unix Makefiles
generator: [Ninja]
os: [ubuntu-22.04, ubuntu-22.04-arm]
steps:
- uses: actions/checkout@v4
Expand All @@ -44,36 +44,47 @@ jobs:
with:
compiler: ${{ matrix.compiler }}
cmake: true
meson: 1.8.5
ninja: true
ccache: true
# doxygen: 1.12.0
# graphviz: true

- name: Set CPM cache location
run: |
echo "CPM_SOURCE_CACHE=./build/CPM" > .env
echo "MESON_PACKAGE_CACHE_DIR=~/.cache/meson-pkgs" >> $GITHUB_ENV

- name: Configure
run: |
make configure-${{ matrix.build_type }}

# We want ccache to be capable of caching PCH
# We want ccache to be capable of caching with a PCH
- name: Set ccache Config
run: |
ccache --set-config 'sloppiness=pch_defines,time_macros,include_file_mtime,include_file_ctime'

- name: Configure
run: |
meson setup build/ -Db_coverage=true

- name: Build
run: |
make build-${{ matrix.build_type }} CMAKE_CONFIGURE_EXTRA_ARGS="-DASMGRADER_ENABLE_TRACE=ON"
meson compile -C build/

- name: Test
run: |
LOG_LEVEL=trace meson test -C build/

- name: Generate Coverage Reports
run: |
meson compile -C build/ coverage

- name: ccache Stats
run: |
ccache -s -v

- name: Test
- name: Output Meson Logs
if: success() || failure()
run: |
LOG_LEVEL=trace make test-${{ matrix.build_type }} CTEST_EXTRA_ARGS="--output-junit \"$PWD/reports/junit-ctest.xml\""
cat ./build/meson-logs/meson-log.txt ./build/meson-logs/testlog.txt

- uses: actions/upload-artifact@v4 # upload test results
if: ${{ !cancelled() }} # run this step even if previous step failed
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
name: test-results-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}
path: reports/junit*.xml
directory: ./build/meson-logs
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ build/
*.a
*.exe

# Cached files
.cache/

##### From Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -142,6 +145,7 @@ celerybeat.pid
*.sage.py

# Environments
.envrc
.env
.venv
env/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/doxygen-awesome-css"]
path = docs/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css
5 changes: 5 additions & 0 deletions .lcovrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exclude = */tests/*
exclude = */subprojects/*
exclude = /usr/*

ignore_errors = mismatch,unused
10 changes: 10 additions & 0 deletions CLEANUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Meson To-Do's

- subprojects should be system includes DONE
- libassert should make use of in-project cpptrace
- add tests directory
- get cross-compilation working
- with **docker**
- generate version_macros.hpp DONE
- should rename to version_config DONE
- add extra_warnings option
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,24 @@ project(AsmGrader

enable_language(ASM)

##### Project configuration source file
# For now, just substitutes version numbers as defined in root CMake project() decl

configure_file(src/version.hpp.in asmgrader/version.hpp @ONLY)

# Set up CMake project options (ASMGRADER_* args)
include(cmake/ProjectOptions.cmake)
asmgrader_setup_options()


asmgrader_global_options()

# Set up project dependencies
# CPM (CMake package manager) is used for easy dependency management
include(cmake/SetupDependencies.cmake)
asmgrader_setup_dependencies()

asmgrader_local_options()

##### Project configuration source file
include(cmake/ConfigureVersionInfo.cmake)


# Set up docs subproject, if option is specified
if(${ASMGRADER_BUILD_DOCS})
include(cmake/Doxygen.cmake)
Expand All @@ -54,15 +63,6 @@ if(${ASMGRADER_BUILD_DOCS})
endif()


asmgrader_global_options()

# Set up project dependencies
# CPM (CMake package manager) is used for easy dependency management
include(cmake/SetupDependencies.cmake)
asmgrader_setup_dependencies()

asmgrader_local_options()

add_subdirectory(src)

include(CTest)
Expand Down
Loading
Loading