From 46edf41094289ceb5b12f0f584cb3b78e611a746 Mon Sep 17 00:00:00 2001 From: Diviloper Date: Thu, 28 Mar 2024 11:40:20 +0100 Subject: [PATCH 1/3] Update test action and reduce it to single file (cherry picked from commit 860d1241dc9cd1743a66c4c49ca6ac6b75d5b864) --- .github/workflows/test-master.yml | 52 ------------------- .../workflows/{test-develop.yml => test.yml} | 20 ++++--- 2 files changed, 13 insertions(+), 59 deletions(-) delete mode 100644 .github/workflows/test-master.yml rename .github/workflows/{test-develop.yml => test.yml} (73%) diff --git a/.github/workflows/test-master.yml b/.github/workflows/test-master.yml deleted file mode 100644 index e1bf080a..00000000 --- a/.github/workflows/test-master.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Test Master - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] - - steps: - - uses: actions/checkout@v3 - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: build-essential cmake postgresql-server-dev-14 libproj-dev libjson-c-dev libgsl-dev libgeos-dev - version: 1.0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install MEOS - run: | - git clone https://github.com/MobilityDB/MobilityDB - mkdir MobilityDB/build - cd MobilityDB/build - cmake .. -DMEOS=on - make -j - sudo make install - - name: Install python dependencies - run: | - python -m pip install --upgrade pip - pip install -r pymeos_cffi/dev-requirements.txt - pip install -r pymeos/dev-requirements.txt - - name: Install pymeos_cffi - run: | - cd pymeos_cffi - python ./pymeos_cffi/builder/build_header.py - python ./pymeos_cffi/builder/build_pymeos_functions.py - pip install . - cd .. - - name: Test PyMEOS with pytest - run: | - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib - cd pymeos - pytest diff --git a/.github/workflows/test-develop.yml b/.github/workflows/test.yml similarity index 73% rename from .github/workflows/test-develop.yml rename to .github/workflows/test.yml index 900f5411..6a4d4f6b 100644 --- a/.github/workflows/test-develop.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,10 @@ -name: Test Develop +name: Test PyMEOS on: push: - branches: [ "develop" ] + branches: [ "develop", "master" ] pull_request: - branches: [ "develop" ] + branches: [ "develop", "master" ] jobs: build: @@ -13,21 +13,27 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: build-essential cmake postgresql-server-dev-14 libproj-dev libjson-c-dev libgsl-dev libgeos-dev version: 1.0 + - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: "pip" + - name: Install MEOS + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} run: | - git clone --branch develop https://github.com/MobilityDB/MobilityDB + git clone --branch ${{ BRANCH_NAME }} --depth 1 https://github.com/MobilityDB/MobilityDB mkdir MobilityDB/build cd MobilityDB/build cmake .. -DMEOS=on From e1a974d177d1042845a19054de7e27048c211f5f Mon Sep 17 00:00:00 2001 From: Diviloper Date: Thu, 28 Mar 2024 11:50:40 +0100 Subject: [PATCH 2/3] Fix env variable use in test workflow (cherry picked from commit 365cd554865b05f607ed7e7ecc5f601bfc2bd091) --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a4d4f6b..d70b818f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} run: | - git clone --branch ${{ BRANCH_NAME }} --depth 1 https://github.com/MobilityDB/MobilityDB + git clone --branch ${{ env.BRANCH_NAME }} --depth 1 https://github.com/MobilityDB/MobilityDB mkdir MobilityDB/build cd MobilityDB/build cmake .. -DMEOS=on From f70cb6ada3da79f190046c1bf6ec31aee269a327 Mon Sep 17 00:00:00 2001 From: Diviloper Date: Thu, 28 Mar 2024 11:54:52 +0100 Subject: [PATCH 3/3] Remove support for python 3.7 (cherry picked from commit a2b92ba301703a242088965bee65add3edf3d273) --- .github/workflows/test.yml | 2 +- pymeos/pyproject.toml | 3 +-- pymeos_cffi/pyproject.toml | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d70b818f..9e0b37e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] steps: - uses: actions/checkout@v4 diff --git a/pymeos/pyproject.toml b/pymeos/pyproject.toml index 04365dae..02cd7e6b 100644 --- a/pymeos/pyproject.toml +++ b/pymeos/pyproject.toml @@ -19,7 +19,6 @@ classifiers = [ 'Programming Language :: C', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', @@ -32,7 +31,7 @@ classifiers = [ readme = 'README.md' license = { file = 'LICENSE' } -requires-python = '>=3.7' +requires-python = '>=3.8' dependencies = [ 'pymeos-cffi >=1.1.0, <2', 'python-dateutil', diff --git a/pymeos_cffi/pyproject.toml b/pymeos_cffi/pyproject.toml index d8c8cb76..01678641 100644 --- a/pymeos_cffi/pyproject.toml +++ b/pymeos_cffi/pyproject.toml @@ -20,7 +20,6 @@ classifiers = [ 'Programming Language :: C', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', @@ -33,7 +32,7 @@ classifiers = [ readme = 'README.md' license = { file = 'LICENSE' } -requires-python = '>=3.7' +requires-python = '>=3.8' dependencies = [ 'cffi', 'python-dateutil',