Skip to content

Commit

Permalink
today()
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Jun 12, 2024
1 parent b489361 commit 0c95001
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 90 deletions.
78 changes: 0 additions & 78 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -1,78 +0,0 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: pyA2L

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
#ubuntu-latest,
macos-latest,
windows-latest
]
steps:
- uses: actions/checkout@v2

- name: Build wheel
uses: pypa/[email protected]

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Build sdist
run: |
pip install -U build
python -m build --sdist
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/[email protected]
with:
user: ${{ secrets.PYPI_USER_NAME }} # __token__
password: ${{ secrets.PYPI_PASSWORD }}
# To test: repository_url: https://test.pypi.org/legacy/
#
# - name: Upload to PyPI
#uses: pypa/[email protected]
#with:
# user: ${{ secrets.PYPI_USER_NAME }}
# password: ${{ secrets.PYPI_PASSWORD }}
#- name: Build and publish
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USER_NAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# if: env.TWINE_USERNAME != null
# run: |
# python setup.py bdist_wheel
# twine upload dist/*
22 changes: 13 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ set(CMAKE_CXX_STANDARD 23)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist")


# find_package (Git)
# if (GIT_FOUND)
# message("git found: ${GIT_EXECUTABLE} in version ${GIT_VERSION_STRING}")
# endif (GIT_FOUND)

SET(GCC_N_CLANG_BASE_OPTIONS "-Wall -Wextra -Wpedantic -Warray-bounds -mtune=native -fexceptions")
# target_link_options(${PROJECT_NAME} PUBLIC -flto=auto)

Expand All @@ -31,11 +26,11 @@ SET(MSVC_BASE_OPTIONS "/EHsc /bigobj")
#########
#########
#########
SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
SET(GCC_COVERAGE_LINK_FLAGS "-lgcov")
# SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
# SET(GCC_COVERAGE_LINK_FLAGS "-lgcov")

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
# SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
#########
#########
#########
Expand All @@ -55,6 +50,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
message("Platform is Darwin")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
message("Platform is WINDOWS")
SET(MSVC_EXTRA_OPTIONS "")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(GCC_N_CLANG_EXTRA_OPTIONS "-fcoroutines -visibility=hidden -g0")
message("Platform is LINUX")
Expand Down Expand Up @@ -121,6 +117,14 @@ pybind11_add_module(a2lparser_ext pya2l/a2lparser_wrapper.cpp pya2l/extensions/e
target_compile_options(preprocessor PUBLIC "-DEXTENSION_NAME=preprocessor")
target_compile_options(a2lparser_ext PUBLIC "-DEXTENSION_NAME=a2lparser_ext")

IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_N_CLANG_BASE_OPTIONS} ${GCC_N_CLANG_EXTRA_OPTIONS}")
target_link_options(preprocessor PUBLIC -flto=auto)
target_link_options(a2lparser_ext PUBLIC -flto=auto)
ELSEIF (CMAKE_C_COMPILER_ID MATCHES "MSVC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSVC_BASE_OPTIONS} ${MSVC_EXTRA_OPTIONS}")
ENDIF()

# target_include_directories(preprocessor PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pya2l/extensions>)
# target_link_libraries(preprocessor pybind11::headers)
# set_target_properties(preprocessor PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON CXX_VISIBILITY_PRESET ON VISIBILITY_INLINES_HIDDEN ON)
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ build = "build_ext.py"
include = [
{ path = "pya2l/*.so", format = "wheel" },
{ path = "pya2l/*.pyd", format = "wheel" },
{ path = "pya2l/cgen/templates/*.tmpl", format = "wheel" },
]
packages = [
{ include = "pya2l" }
Expand Down Expand Up @@ -52,7 +51,7 @@ pre-commit-hooks = "^4.6.0"

pyupgrade = "^3.16.0"
[build-system]
requires = ["poetry-core>=1.6.0", "wheel", "ninja", "cmake>=3.12"]
requires = ["poetry-core>=1.6.0", "wheel", "cmake>=3.12"]
build-backend = "poetry.core.masonry.api"


Expand Down Expand Up @@ -160,7 +159,7 @@ environment = { CLASSPATH="%PWD%/antlr-4.13.1-complete.jar" }
build-verbosity = 3
build = "cp3{8,9,10,11,12,13}-*"
#test-command = "pytest -svv"
#build-frontend = "build"
build-frontend = "build"
#build-frontend = "pip"
before-build = [
"python install_antlr.py"
Expand Down

0 comments on commit 0c95001

Please sign in to comment.