Skip to content

Commit

Permalink
Merge commit '464364b55468e5a78a3579ea05f9703011fd31bc' into update-libs
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Jan 19, 2024
2 parents 14cf4f0 + 464364b commit 04681ad
Show file tree
Hide file tree
Showing 690 changed files with 59,905 additions and 7,087 deletions.
7 changes: 7 additions & 0 deletions src/zfp/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
49 changes: 49 additions & 0 deletions src/zfp/.github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Coverage Report

on:
workflow_run:
workflows: [Tests]
types: [completed]

jobs:
coverage:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: x64

- name: Install Dependencies
run: |-
sudo apt install lcov
python -m pip install lcov_cobertura
- name: Run CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" -DCMAKE_C_FLAGS="-fprofile-arcs -ftest-coverage" -DBUILD_TESTING_FULL=ON -DBUILD_CFP=ON -DZFP_WITH_OPENMP=ON

- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Run Tests
working-directory: ${{github.workspace}}/build
run: ctest -j 8

- name: Generate Coverage Report
working-directory: ${{github.workspace}}/build
run: |-
lcov -c --directory ${{github.workspace}}/build --output-file coverage.info
lcov --remove coverage.info '${{github.workspace}}/build/tests/*' --remove coverage.info '${{github.workspace}}/tests/*' --remove coverage.info '/usr/include/*' -o coverage.info
lcov_cobertura ${{github.workspace}}/build/coverage.info -d -o ${{github.workspace}}/build/coverage.xml
- name: Upload Report to Codecov
uses: codecov/codecov-action@v3
with:
files: ${{github.workspace}}/build/coverage.xml
env_vars: Actions
fail_ci_if_error: true
29 changes: 29 additions & 0 deletions src/zfp/.github/workflows/debug-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Debug (Linux)

on: [workflow_dispatch]

jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: Checkout Zfp
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: x64

- name: Install Zfpy Dependencies
run: |
python -m pip install cython
python -m pip install oldest-supported-numpy
python -m pip install setuptools
- name: Install OpenMP
run: |
sudo apt-get update; sudo apt-get install -y libomp5 libomp-dev
- name: Setup Tmate Session
uses: mxschmitt/action-tmate@v3
29 changes: 29 additions & 0 deletions src/zfp/.github/workflows/debug-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Debug (MacOS)

on: [workflow_dispatch]

jobs:
debug:
runs-on: macos-latest
steps:
- name: Checkout Zfp
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: x64

- name: Install Zfpy Dependencies
run: |
python -m pip install cython
python -m pip install oldest-supported-numpy
python -m pip install setuptools
- name: Install OpenMP
run: |
brew install libomp
- name: Setup Tmate Session
uses: mxschmitt/action-tmate@v3
78 changes: 78 additions & 0 deletions src/zfp/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Tests

on: push

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
cxx_compiler: g++-10
c_compiler: gcc-10
omp: ON
target: all

- os: ubuntu-latest
cxx_compiler: clang++
c_compiler: clang
omp: ON
target: all

- os: macos-latest
cxx_compiler: g++-11
c_compiler: gcc-11
omp: ON
target: all

- os: macos-latest
cxx_compiler: clang++
c_compiler: clang
omp: OFF
target: all

steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: x64

- name: Install zfpy dependencies
run: |
python -m pip install cython
python -m pip install oldest-supported-numpy
python -m pip install setuptools
- name: Setup OpenMP (Linux)
if: ${{matrix.os == 'ubuntu-latest' && matrix.cxx_compiler == 'clang++'}}
run: sudo apt-get update; sudo apt-get install -y libomp5 libomp-dev

- name: Setup OpenMP (MacOS)
if: ${{matrix.os == 'macos-latest'}}
run: |
brew install libomp
echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS=\"-L$(brew --prefix llvm)/lib\"" >> $GITHUB_ENV
echo "CPPFLAGS=\"-I$(brew --prefix llvm)/include\"" >> $GITHUB_ENV
- name: Run CMake
id: cmake
run: cmake -B ${{github.workspace}}/build ${{matrix.generator}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}} -DCMAKE_C_COMPILER=${{matrix.c_compiler}} -DBUILD_TESTING_FULL=ON -DZFP_WITH_OPENMP=${{matrix.omp}} -DBUILD_ZFPY=ON -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")

- name: Build
id: build
run: cmake --build ${{github.workspace}}/build --target ${{matrix.target}} --config ${{env.BUILD_TYPE}}

- name: Run Tests
id: test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -VV
4 changes: 4 additions & 0 deletions src/zfp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
bin
build
lib
dist
wheelhouse
zfpy.egg-info
modules
35 changes: 35 additions & 0 deletions src/zfp/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
Loading

0 comments on commit 04681ad

Please sign in to comment.