Skip to content

Commit

Permalink
Revert "Update Dependencies for Enhanced Compatibility with Newer Pyt…
Browse files Browse the repository at this point in the history
…hon Vers…" (#6)

This reverts commit db0ef35.
  • Loading branch information
vincentadam87 authored Apr 22, 2024
1 parent db0ef35 commit 114ec0d
Show file tree
Hide file tree
Showing 21 changed files with 1,070 additions and 1,835 deletions.
37 changes: 9 additions & 28 deletions .github/workflows/quality-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,34 @@ on:
types:
- created


jobs:
check-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8.12", "3.9.12", "3.10.4"]
poetry-version: [1.1.12]
python-version: [3.7, 3.8]
poetry-version: [1.1.6]
name: Python-${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

# ------------ Install poetry
- name: Setup pip/poetry
run: |
pip install -U pip poetry twine
poetry config virtualenvs.create false
- name: Install Python dependencies
run: poetry install

- name: Configure environment variables for CMake
run: |
echo "PYTHON_BIN=$(which python)" >> $GITHUB_ENV
# ------------ install tools
- name: Install building tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake g++-14
- name: Configure and Build C++ Library
run: |
mkdir -p banded_matrices/build
cd banded_matrices/build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo apt-get install build-essential
sudo apt-get install cmake g++-11
# ------------ build and install package
- name: Install package
run: poetry install

- name: Set environment variables for tests
run: |
echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/banded_matrices/build/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
# ------------ run tests
- name: Run tests
run: poetry run task test

77 changes: 20 additions & 57 deletions .github/workflows/upload-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,59 +25,38 @@ jobs:
check-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8.12", "3.9.12", "3.10.4"]
poetry-version: [1.1.12]
python-version: [3.7, 3.8]
poetry-version: [1.1.6]
name: Python-${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

# ------------ Install poetry
- name: Setup pip/poetry
run: |
pip install -U pip poetry twine
poetry config virtualenvs.create false
- name: Install Python dependencies
run: poetry install

- name: Configure environment variables for CMake
run: |
echo "PYTHON_BIN=$(which python)" >> $GITHUB_ENV
# ------------ install tools
- name: Install building tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake g++-14
- name: Configure and Build C++ Library
run: |
mkdir -p banded_matrices/build
cd banded_matrices/build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo apt-get install build-essential
sudo apt-get install cmake g++-11
# ------------ build and install package
- name: Install package
run: poetry install

- name: Set environment variables for tests
run: |
echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/banded_matrices/build/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
# ------------ run tests
- name: Run tests
run: poetry run task test

pypi:
# needs: check-and-test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8.12", "3.9.12", "3.10.4"]
poetry-version: [1.1.12]
python-version: [3.7, 3.8]
poetry-version: [1.1.6]
name: Release PyPi package
steps:
- uses: actions/checkout@v2
Expand All @@ -89,42 +68,26 @@ jobs:
run: |
VERSION="v$(cat VERSION | tr -d '\t\r\n ')"
TAG="${GITHUB_REF/refs\/tags\//}"
if [ "$VERSION" != "$TAG" ]; then
echo "The package version ($VERSION) and the latest tag version ($TAG) are different"
exit 1
fi
# if [ "$VERSION" != "$TAG" ]; then
# echo "The package version ($VERSION) and the latest tag version ($TAG) are different"
# exit 1
# fi
# ------------ Install poetry
- name: Setup pip/poetry
run: |
pip install -U pip poetry twine
poetry config virtualenvs.create false
- name: Install Python dependencies
run: poetry install

- name: Configure environment variables for CMake
run: |
echo "PYTHON_BIN=$(which python)" >> $GITHUB_ENV
# ------------ install tools
- name: Install building tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake g++-14
- name: Configure and Build C++ Library
run: |
mkdir -p banded_matrices/build
cd banded_matrices/build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo apt-get install build-essential
sudo apt-get install cmake g++-11
# ------------ build and install package
- name: Install package
run: |
poetry install
poetry build
# ------------ publish to pypi
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
2 changes: 1 addition & 1 deletion banded_matrices/cc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if(TF_LINK_FLAGS_NOT_FOUND)
endif()

# Set the standard compilation and linking flags
set(CMAKE_CXX_FLAGS "-g -std=c++14 -Wall -Wextra -Wfloat-equal -Wshadow -Wconversion ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "-g -std=c++11 -Wall -Wextra -Wfloat-equal -Wshadow -Wconversion ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${TF_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}")

set(LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TF_LINK_FLAGS}")
Expand Down
Loading

0 comments on commit 114ec0d

Please sign in to comment.