diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a895370f..c9a53c8c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,8 +19,6 @@ env: PACKAGE: "geoviews" PYTHON_VERSION: "3.11" NODE_VERSION: "20" - MPLBACKEND: "Agg" - SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" jobs: waiting_room: @@ -33,36 +31,29 @@ jobs: steps: - run: echo "All builds have finished, have been approved, and ready to publish" + pixi_lock: + name: Pixi lock + runs-on: ubuntu-latest + steps: + - uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi + conda_build: name: Build Conda + needs: [pixi_lock] runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "100" - - name: Fetch unshallow - run: git fetch --prune --tags --unshallow -f - - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - - uses: actions/setup-node@v4 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi with: - node-version: ${{ env.NODE_VERSION }} - - name: conda setup - run: | - conda install -y conda-build build pyct + environments: "build" + install: false + download-data: false - name: conda build - run: | - source ./scripts/conda/build.sh - echo "CONDA_FILE="$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2"" >> $GITHUB_ENV - echo "CONDA_CORE_FILE="$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-core-$VERSION-py_0.tar.bz2"" >> $GITHUB_ENV + run: pixi run -e build build-conda - uses: actions/upload-artifact@v4 if: always() with: name: conda - path: | - ${{ env.CONDA_FILE }} - ${{ env.CONDA_CORE_FILE }} + path: dist/*.tar.bz2 if-no-files-found: error conda_publish: @@ -99,24 +90,16 @@ jobs: pip_build: name: Build PyPI + needs: [pixi_lock] runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "100" - - name: Fetch unshallow - run: git fetch --prune --tags --unshallow -f - - uses: actions/setup-python@v5 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi with: - python-version: ${{ env.PYTHON_VERSION }} - - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Install build - run: | - python -m pip install build + environments: "build" + install: false + download-data: false - name: Build package - run: python -m build . + run: pixi run -e build build-pip - uses: actions/upload-artifact@v4 if: always() with: @@ -160,27 +143,20 @@ jobs: npm_build: name: Build NPM + needs: [pixi_lock] runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "100" - - uses: actions/setup-python@v5 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi with: - python-version: ${{ env.PYTHON_VERSION }} - - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Fetch unshallow - run: git fetch --prune --tags --unshallow -f - - name: package install - run: | - python -m pip install -ve . + environments: "build" + download-data: false - name: npm build run: | - cd ${{ env.PACKAGE }} - TARBALL=$(npm pack .) + TARBALL=$(pixi run build-npm) echo "TARBALL=$TARBALL" >> $GITHUB_ENV + - name: npm publish dry-run + run: | + cd $PACKAGE npm publish --dry-run $TARBALL cd .. - uses: actions/upload-artifact@v4 @@ -188,7 +164,7 @@ jobs: with: name: npm if-no-files-found: error - path: ${{ env.PACKAGE }}/${{ env.TARBALL }} + path: ./${{ env.PACKAGE }}/${{ env.TARBALL }} npm_publish: name: Publish NPM diff --git a/pixi.toml b/pixi.toml index 64237e25..84e5ea51 100644 --- a/pixi.toml +++ b/pixi.toml @@ -137,6 +137,7 @@ conda-build = "*" [feature.build.tasks] build-conda = 'bash scripts/conda/build.sh' build-pip = 'python -m build .' +build-npm = { cmd = "npm pack .", cwd = "geoviews" } # ============================================= # =================== LINT ====================