Skip to content

Commit

Permalink
Merge remote-tracking branch 'app4triqs-remote/unstable' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Jan 30, 2024
2 parents c06f2d4 + a4565a1 commit 0d0d221
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 2,641 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
branches: [ unstable ]
pull_request:
branches: [ unstable ]
workflow_call:
workflow_dispatch:

env:
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CCACHE_COMPILERCHECK: content
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 500M
CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime
CCACHE_COMPRESS: "1"
CCACHE_COMPRESSLEVEL: "1"

jobs:
build:
Expand All @@ -16,12 +29,19 @@ jobs:
- {os: ubuntu-22.04, cc: gcc-12, cxx: g++-12}
- {os: ubuntu-22.04, cc: clang-15, cxx: clang++-15}
- {os: macos-12, cc: gcc-12, cxx: g++-12}
- {os: macos-12, cc: /usr/local/opt/llvm/bin/clang, cxx: /usr/local/opt/llvm/bin/clang++}
- {os: macos-12, cc: clang, cxx: clang++}

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/cache/restore@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
restore-keys:
ccache-${{ matrix.os }}-${{ matrix.cc }}-

- name: Install ubuntu dependencies
if: matrix.os == 'ubuntu-22.04'
Expand All @@ -30,6 +50,7 @@ jobs:
sudo apt-get install lsb-release wget software-properties-common &&
wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 15 &&
sudo apt-get install
ccache
clang-15
g++-12
gfortran
Expand Down Expand Up @@ -67,7 +88,8 @@ jobs:
- name: add clang cxxflags
if: ${{ contains(matrix.cxx, 'clang') }}
run:
run: |
echo "PATH=/usr/local/opt/llvm/bin:$PATH" >> $GITHUB_ENV
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
- name: Build itertools
Expand All @@ -82,6 +104,17 @@ jobs:
- name: Test itertools
env:
DYLD_FALLBACK_LIBRARY_PATH: /usr/local/opt/llvm/lib
OPENBLAS_NUM_THREADS: "1"
run: |
cd build
ctest -j2 --output-on-failure
- name: ccache statistics
if: always()
run: ccache -sv

- uses: actions/cache/save@v3
if: always()
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
cmake_policy(VERSION 3.20)
if(POLICY CMP0144)
cmake_policy(SET CMP0144 NEW)
endif()

# ############
# Define Project
Expand Down Expand Up @@ -140,6 +143,9 @@ endif()
# Additional configuration files
add_subdirectory(share)

# add packaging for automatic Versioning
add_subdirectory(packaging)

# #############
# Debian Package

Expand Down
4 changes: 2 additions & 2 deletions c++/itertools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ target_compile_definitions(${PROJECT_NAME}_c INTERFACE
)

# Install library and headers
install(TARGETS ${PROJECT_NAME}_c EXPORT ${PROJECT_NAME}-targets DESTINATION lib)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
install(TARGETS ${PROJECT_NAME}_c EXPORT ${PROJECT_NAME}-targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")


# ========= Static Analyzer Checks ==========
Expand Down
Loading

0 comments on commit 0d0d221

Please sign in to comment.