From 71709d1ebca4b38c706e7c25b2fab01ec5a7d736 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..80a9a62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,7 @@ [build-system] requires = [ - "setuptools>=60", + "setuptools>=65", "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..4c8d58a 100644 --- a/setup.py +++ b/setup.py @@ -4,12 +4,11 @@ # # Author: Luca Colagrande import setuptools -import cmake_build_extension +from setuptools.command.build import build import subprocess from pathlib import Path - -class CMakeBuild(setuptools.command.build.build): +class CMakeBuild(build): def run(self): # Required to generate "flexfloat_config.h"