-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
160 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
# See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: ${{matrix.os}} ${{ matrix.description }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-20.04 | ||
# oldest LLVM that the install-llvm-action action is able to install | ||
description: "LLVM 5" | ||
llvm-version: "5" | ||
|
||
- os: ubuntu-20.04 | ||
# oldest GCC that the setup-gcc action is able to install | ||
description: "GCC 7" | ||
gcc-version: "7" | ||
cmake-version: "3.18" | ||
|
||
- os: ubuntu-latest | ||
description: "GCC 13" | ||
gcc-version: "13" | ||
|
||
- os: macos-latest | ||
# uses Apple Clang | ||
|
||
- os: windows-latest | ||
# uses MSVC | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install TBB (Ubuntu) | ||
if: contains(matrix.os, 'ubuntu') | ||
run: sudo apt-get install -y libtbb-dev | ||
|
||
- name: Install TBB (macOS) | ||
if: contains(matrix.os, 'macos') | ||
run: brew install tbb | ||
|
||
- name: Setup GCC | ||
uses: egor-tensin/setup-gcc@v1 | ||
if: ${{ matrix.gcc-version != '' }} | ||
with: | ||
version: ${{ matrix.gcc-version }} | ||
|
||
- name: Setup LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v1 | ||
if: ${{ matrix.llvm-version != '' }} | ||
with: | ||
version: ${{ matrix.llvm-version }} | ||
env: true | ||
|
||
- name: Setup cmake | ||
uses: jwlawson/actions-setup-cmake@v1 | ||
if: ${{ matrix.cmake-version != '' }} | ||
with: | ||
cmake-version: ${{ matrix.cmake-version }} | ||
|
||
- name: Build and Test | ||
run: | | ||
cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Debug -DPOOLSTL_TEST=ON -DPOOLSTL_TEST_COVERAGE=ON | ||
cmake --build build/ --config Debug | ||
cd build/tests | ||
ctest -C Debug --output-on-failure --verbose | ||
shell: bash | ||
|
||
- name: Benchmark | ||
if: ${{ matrix.gcc-version != '7' }} | ||
run: | | ||
cmake -S . -B bench_build/ -DCMAKE_BUILD_TYPE=Release -DPOOLSTL_BENCH=ON | ||
cmake --build bench_build/ --config Release | ||
./bench_build/benchmark/poolstl_bench* | ||
shell: bash | ||
|
||
- name: Upload Coverage to Codecov | ||
if: contains(matrix.os, 'ubuntu') | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
gcov: true | ||
gcov_include: include/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (C) 2023 Adam Lugowski. All rights reserved. | ||
// Use of this source code is governed by: | ||
// the BSD 2-clause license, the MIT license, or at your choosing the BSL-1.0 license found in the LICENSE.*.txt files. | ||
// SPDX-License-Identifier: BSD-2-Clause OR MIT OR BSL-1.0 | ||
|
||
#include <iostream> | ||
|
||
#include <poolstl/poolstl.hpp> | ||
|
||
int main() { | ||
std::vector<int> v = {0, 1, 2, 3, 4, 5}; | ||
std::for_each(poolstl::par, v.cbegin(), v.cend(), [](int x) { | ||
std::cout << x << " "; | ||
}); | ||
std::cout << std::endl; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters