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
39 changes: 35 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,58 @@ jobs:
steps:
- uses: actions/checkout@v4

# set up OpenMp for ColPack
- name: Install OpenMP (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install libomp-dev

- name: Install libomp (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew install libomp

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"

- name: Configure and build ADOL-C (Linux, MacOs)
if: matrix.c_compiler != 'msvc'
- name: Configure and build ADOL-C (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DENABLE_DOCEXA=1
-DENABLE_ADDEXA=1
-DENABLE_SPARSE=1
-DBUILD_SHARED_LIBS=${{ matrix.build_shared_libs }}
-S ${{ github.workspace }}


- name: Configure and build ADOL-C (MacOs)
if: startsWith(matrix.os, 'macos')
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DOpenMP_C_FLAGS="-Xclang -fopenmp -I/opt/homebrew/opt/libomp/include"
-DOpenMP_C_LIB_NAMES="omp"
-DOpenMP_CXX_FLAGS="-Xclang -fopenmp -I/opt/homebrew/opt/libomp/include"
-DOpenMP_CXX_LIB_NAMES="omp"
-DOpenMP_omp_LIBRARY="/opt/homebrew/opt/libomp/lib/libomp.dylib"
-DENABLE_DOCEXA=1
-DENABLE_ADDEXA=1
-DENABLE_SPARSE=1
-DBUILD_SHARED_LIBS=${{ matrix.build_shared_libs }}
-S ${{ github.workspace }}

# we don't use sparse drivers on windows!
- name: Configure and build ADOL-C (Windows)
if: matrix.c_compiler == 'msvc'
if: startsWith(matrix.os, 'windows')
shell: powershell
run:
# Setup Visual Studio build environment
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTS_WITH_COV=ON \
-DENABLE_SPARSE=1 \
-S .. \
-B .
cmake --build .
Expand All @@ -62,5 +63,4 @@ jobs:
files: build/coverage.info
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: code-coverage-report

name: code-coverage-report
2 changes: 1 addition & 1 deletion .github/workflows/min_compiler_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build ubuntu-latest with g++11 and clang++-13
name: minimal compiler version ubuntu-latest
on:
push:
branches: ["master"]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBUILD_TESTS=ON \
-DBUILD_TESTS=ON
-DENABLE_SPARSE=1
-S ${{ github.workspace }}

- name: Build ADOL-C
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ install_manifest.txt
*.dll
build/
lib/
include/

# Nix build results
result*
6 changes: 6 additions & 0 deletions ADOL-C/boost-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ list(APPEND SOURCE_FILES ${VALUETAPE_FILES})
file(GLOB VALUETAPE_FILES "ho_rev/*.cpp")
list(APPEND SOURCE_FILES ${VALUETAPE_FILES})

if (ENABLE_SPARSE)
# Add all source files from sparse
file(GLOB VALUETAPE_FILES "sparse/*.cpp")
list(APPEND SOURCE_FILES ${VALUETAPE_FILES})
endif()

add_executable(boost-test-adolc ${SOURCE_FILES})
target_include_directories(boost-test-adolc PRIVATE "${ADOLC_INCLUDE_DIR}")
target_link_libraries(boost-test-adolc PRIVATE
Expand Down
Loading
Loading