Skip to content
Closed
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,39 @@ jobs:
- run: >
cd wd && git ls-files -z -- '**/*.c' '**/*.cc' '**/*.h' |
xargs -0 -- clang-format-22 --dry-run --style=file --Werror --

cmake_analysis:
name: CMake analysis
runs-on: ubuntu-26.04
steps:
- run: uname -rms
- run: python3 --version
- run: python3 -m pip install --user cmakelang
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: >
cd wd &&
git fetch -- origin ${{ github.event.pull_request.head.sha }} &&
git checkout FETCH_HEAD
- run: >
cd wd &&
git ls-files -z -- ':(glob)**/CMakeLists.txt' ':(glob)**/*.cmake' |
xargs -0 -- python3 -m cmakelang.lint

python_analysis:
name: Python analysis
runs-on: ubuntu-26.04
steps:
- run: uname -rms
- run: python3 --version
- run: python3 -m pip install --user isort
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: >
cd wd &&
git fetch -- origin ${{ github.event.pull_request.head.sha }} &&
git checkout FETCH_HEAD
- run: >
cd wd &&
git ls-files -z -- ':(glob)**/*.py' |
xargs -0 -- python3 -m isort --profile=black --
1 change: 1 addition & 0 deletions doc/toy-model-checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sys
from typing import Optional, Set


class State(object):

def __init__(self, value: int = 0, previous: Optional["State"] = None):
Expand Down
18 changes: 17 additions & 1 deletion librumur/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
find_package(BISON REQUIRED)
if(BISON_VERSION VERSION_GREATER_EQUAL "3.7.1")
# we have a recent enough Bison to support `--file-prefix-map=…`
if(CMAKE_CURRENT_BINARY_DIR MATCHES " " OR
CMAKE_CURRENT_BINARY_DIR MATCHES "=")
# The build path contains characters that will be misinterpreted in
# `--file-prefix-map=…`. Thus we cannot achieve a reproducible build.
set(PREFIX_MAP "")
else()
# suppress build paths in generated files
set(PREFIX_MAP "--file-prefix-map=${CMAKE_CURRENT_BINARY_DIR}= ")
endif()
else()
# we do not have a recent enough Bison to support `--file-prefix-map=…`
set(PREFIX_MAP "")
endif()
message(STATUS "Bison prefix map option: ${PREFIX_MAP}")
find_package(FLEX REQUIRED)

find_path(GMPXX_INCLUDE NAMES gmpxx.h PATHS ENV CPLUS_INCLUDE_PATH)
Expand All @@ -17,7 +33,7 @@ endif()
bison_target(parser
src/parser.yy
${CMAKE_CURRENT_BINARY_DIR}/parser.yy.cc
COMPILE_FLAGS "--no-lines --warnings=all")
COMPILE_FLAGS "${PREFIX_MAP}--no-lines --warnings=all")
flex_target(lexer
src/lexer.l
${CMAKE_CURRENT_BINARY_DIR}/lexer.l.cc
Expand Down
Loading