-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
dfcf061
commit 7d86368
Showing
7 changed files
with
112 additions
and
45 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,29 @@ | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
curl -sSLO https://pdm-project.org/install-pdm.py | ||
curl -sSL https://pdm-project.org/install-pdm.py.sha256 | shasum -a 256 -c - | ||
python3 install-pdm.py | ||
pdm install | ||
shell: bash | ||
|
||
- name: Lint | ||
run: | | ||
pdm run black $PROJECT_SRC_REL $PROJECT_SETUP --check | ||
pdm run flake8 $PROJECT_SRC_REL $PROJECT_SETUP | ||
shell: bash | ||
|
||
- name: PDM install | ||
run: pdm install | ||
shell: bash | ||
|
||
- name: conan install | ||
run: | | ||
source .venv/bin/activate | ||
conan --version | ||
conan profile detect | ||
conan install --build=missing . | ||
shell: bash | ||
|
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Algobench | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
PROJECT_SRC_REL: "src/algobench" | ||
PROJECT_SETUP: "setup.py" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
if: ${{ !github.event.act }} | ||
runs-on: ubuntu-24.04 | ||
container: | ||
image: docker.io/sindiesel/cpp_ubuntu:22.0.20 | ||
volumes: | ||
- ${{ github.workspace }}:${{ github.workspace }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: composite | ||
uses: ./.github/actions/build-composite | ||
build_act: | ||
if: ${{ github.event.act }} | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: composite | ||
uses: ./.github/actions/build-composite |
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 |
---|---|---|
@@ -1,2 +1,26 @@ | ||
# algobench | ||
Python library designed for benchmarking standard C++ parallel algorithms, algotirhm policies on different standard libraries implementations, compilers and architectures. | ||
Python library designed for benchmarking standard C++ parallel algorithms, algorithm policies on different standard libraries implementations, compilers and architectures. | ||
|
||
## Testing in containerized environment | ||
### Pull container image | ||
|
||
podman pull docker.io/sindiesel/cpp_ubuntu:22.0.20 | ||
|
||
```bash | ||
podman run --interactive --tty --detach \ | ||
--env "TERM=xterm-256color" \ | ||
--mount type=bind,source="$(pwd)",target="$(pwd)" \ | ||
--name cpp \ | ||
--userns keep-id \ | ||
--workdir "$HOME" \ | ||
cpp_ubuntu:22.0.20 | ||
|
||
# Allow non-root user | ||
podman exec --user root cpp bash -c "chown $(id --user):$(id --group) $HOME" | ||
|
||
# Run your command | ||
podman exec --workdir "$(pwd)" cpp bash -c "ls -l" | ||
|
||
# Attach to container | ||
podman exec --workdir "$(pwd)" --interactive --tty cpp bash | ||
``` |
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,15 @@ | ||
|
||
from conan import ConanFile | ||
from conan.tools.cmake import cmake_layout | ||
|
||
|
||
class Algobench(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "CMakeDeps", "CMakeToolchain" | ||
|
||
def requirements(self): | ||
self.requires("gcc/12.2.0") | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
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,3 @@ | ||
{ | ||
"act": true | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.