From 6ca3569ce398a9bf7e05a26f1615ef8f8c3d4985 Mon Sep 17 00:00:00 2001 From: Aditya Goel Date: Mon, 14 Oct 2024 17:34:40 +0100 Subject: [PATCH] Update build pipeline --- .github/workflows/build_and_publish.yml | 34 +++++++++---------------- .github/workflows/ci.yml | 2 +- .github/workflows/weekly.yml | 8 ++---- 3 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index db5deecf..89387307 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -8,34 +8,24 @@ on: - published jobs: - build_sdist_and_wheel: - name: Build sdist and wheel on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04] - + build: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: + ref: ${{ github.ref }} fetch-depth: 0 - - - name: Build - run: | - pip install build - python -m build - - - name: Test install and import - run: | - python -m venv ./env - . ./env/bin/activate - pip install dist/*.whl - python -c "import spox" - - - uses: actions/upload-artifact@v4 + - name: Set up pixi + uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 + with: + environments: build + - name: Build project + run: pixi run -e build build-wheel + - name: Upload package + uses: actions/upload-artifact@v4 with: + name: artifact path: dist/* - upload_pypi: name: Upload to PyPI needs: [build_sdist_and_wheel] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe6dfd58..83afe44f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -on: [push] +on: push concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 32cd617b..8975b422 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -14,14 +14,10 @@ defaults: jobs: tests: - name: "Linux - weekly unit tests - ${{ matrix.OS }}" - runs-on: ${{ matrix.OS }} + name: "Linux - weekly unit tests - ubuntu-latest" + runs-on: ubuntu-latest env: CI: True - strategy: - fail-fast: true - matrix: - OS: ["ubuntu-latest"] steps: - name: Checkout branch uses: actions/checkout@v4