From 221b61618ee9fa27a34aaa20e2007e686ed5a0d3 Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Tue, 19 Mar 2024 15:31:14 +0100 Subject: [PATCH] ci: Add build and tests --- .github/workflows/ci.yaml | 19 +++++++++++++++++++ pyproject.toml | 3 +-- setup.py | 5 ++--- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..e51f9ee --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,19 @@ +# Copyright 2024 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +name: Test PyFlexFloat library +on: [push, pull_request] + +jobs: + test: + name: Build and test package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Build + run: pip install . + - name: Test + run: ./test/test.py diff --git a/pyproject.toml b/pyproject.toml index c5d4546..7f32349 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,7 @@ [build-system] requires = [ - "setuptools>=60", + "setuptools>=65.0", "setuptools-scm>=8.0", - "cmake_build_extension==0.5.2.dev15", "cffi" ] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 436ae79..5c8bd76 100644 --- a/setup.py +++ b/setup.py @@ -3,13 +3,12 @@ # SPDX-License-Identifier: Apache-2.0 # # Author: Luca Colagrande +from setuptools.command.build import build import setuptools -import cmake_build_extension import subprocess from pathlib import Path - -class CMakeBuild(setuptools.command.build.build): +class CMakeBuild(build): def run(self): # Required to generate "flexfloat_config.h"