Skip to content
Open
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
5 changes: 5 additions & 0 deletions .github/workflows/debs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Debian packages

on:
workflow_dispatch:
workflow_call:
pull_request:
push:
branches:
Expand All @@ -11,6 +12,8 @@ jobs:
get_version:
name: Get version info
runs-on: ubuntu-22.04
permissions:
contents: read
defaults:
run:
shell: bash
Expand All @@ -32,6 +35,8 @@ jobs:
build_debs:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
permissions:
contents: read
needs: [get_version]

strategy:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
workflow_dispatch:
push:
# release on tag push
tags:
- '*'

permissions:
contents: write

jobs:
build_debs:
name: Build deb packages
permissions:
contents: read
uses: ./.github/workflows/debs.yml

create_release:
name: Create Release
needs: [build_wheels, build_docs]
runs-on: ubuntu-22.04

steps:
- name: Get version
id: get_version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo ${{ env.VERSION }}

- uses: actions/checkout@v5
with:
fetch-depth: 0

# download all artifacts to project dir
- uses: actions/download-artifact@v5
with:
path: packages
pattern: libtins*
merge-multiple: true

- name: check artifacts
run: |
ls -l packages

- name: Generate changes file
uses: sarnold/gitchangelog-action@915234f151ceffb7a8c4f76de77e4ae321087b8f # v1.1.1
with:
github_token: ${{ secrets.GITHUB_TOKEN}}

- name: Create release
id: create_release
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
name: Release ${{ env.VERSION }}
body_path: CHANGES.md
draft: false
prerelease: false
files: |
packages/*.tar.gz
packages/*.deb
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
OPTION(LIBTINS_BUILD_EXAMPLES "Build examples" ON)
OPTION(LIBTINS_BUILD_TESTS "Build tests" ON)


# Compile in release mode by default
IF(NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
Expand All @@ -28,6 +29,10 @@ project(
LANGUAGES CXX
)

if(DEFINED ENV{VERBOSE})
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()

# Check the thread library info early as setting compiler flags seems to
# interfere with the detection and causes CMAKE_THREAD_LIBS_INIT to not
# include -lpthread when it should.
Expand Down Expand Up @@ -76,9 +81,10 @@ SET(TINS_VERSION_MINOR 6)
SET(TINS_VERSION_PATCH 0)
SET(LIBTINS_VERSION "${TINS_VERSION_MAJOR}.${TINS_VERSION_MINOR}")

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_EXTENSIONS OFF)
MESSAGE(STATUS "Using C++ STD version '${CMAKE_CXX_STANDARD}'")

if(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CLANG_DEFAULT_CXX_STDLIB libc++)
Expand Down
14 changes: 0 additions & 14 deletions cmake/Modules/CheckCXXFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ endif ()

#cmake_minimum_required(VERSION 2.8.3)

#
### Check for needed compiler flags
#
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" _HAS_CXX11_FLAG)
if (NOT _HAS_CXX11_FLAG)
check_cxx_compiler_flag("-std=c++0x" _HAS_CXX0X_FLAG)
endif ()

if (_HAS_CXX11_FLAG)
set(CXX11_COMPILER_FLAGS "-std=c++11")
elseif (_HAS_CXX0X_FLAG)
set(CXX11_COMPILER_FLAGS "-std=c++0x")
endif ()

function(cxx11_check_feature FEATURE_NAME RESULT_VAR)
if (NOT DEFINED ${RESULT_VAR})
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ install_command = pip install {opts} {packages}

[testenv:tools]
setenv =
CFLAGS = -march=native -O2 -g -DNDEBUG
CXXFLAGS = {env:CFLAGS:-march=native -O2 -g -DNDEBUG}
LDFLAGS = {env:CFLAGS:-march=native -O2 -g -DNDEBUG} -Wl,-O1 -Wl,--as-needed
CC = {env:CC:gcc}
CXX = {env:CXX:g++}
PREFIX = {env:PREFIX:{envdir}}

passenv =
Expand All @@ -28,6 +27,7 @@ passenv =
HOME
USERNAME
USER
VERBOSE
CI
XDG_*
GITHUB*
Expand Down