Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove the Makefile in favor of the Taskfile.yml #654

Merged
merged 4 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
target:
description: Rust target triple to use
required: true
token:
description: GitHub token
required: true

runs:
using: composite
Expand All @@ -17,11 +20,17 @@ runs:
run: |
rustup update

- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ inputs.token }}

- name: Set up Rust nightly toolchain
if: inputs.rust-nightly == 'true' || env.RPOLARS_FULL_FEATURES == 'true'
shell: bash
run: |
make requirements-rs
task setup-rust-toolchain

- name: Set up Rust target
if: inputs.target != ''
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
with:
rust-nightly: "${{ matrix.config.full-features }}"
target: "${{ steps.rust-target.outputs.TARGET }}"
token: "${{ secrets.GITHUB_TOKEN }}"

- name: print files
run: print(list.files("..",recursive = TRUE,full.names=TRUE))
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- uses: ./.github/actions/setup
with:
target: "${{ steps.rust-target.outputs.TARGET }}"
token: "${{ secrets.GITHUB_TOKEN }}"

- uses: actions/setup-python@v5
with:
Expand All @@ -86,12 +87,18 @@ jobs:

- name: Get requirements
run: |
make requirements-r
make requirements-py
task setup-r-tools
task setup-python-tools

- name: Build docs
run: make docs
shell: bash
run: task build-website

- name: upload docs
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: docs
path: docs
Comment on lines +96 to +101
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upload the website generated in PR as an artifact.
Download the artifact to check if the website is rendering correctly.
Without this, it is difficult to check whether your website was built correctly.


- uses: webfactory/ssh-agent@v0.8.0
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
with:
rust-nightly: "true"
target: "${{ matrix.target }}"
token: "${{ secrets.GITHUB_TOKEN }}"

- name: Set for arm64 Linux
if: matrix.target == 'aarch64-unknown-linux-gnu'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
- uses: ./.github/actions/setup
with:
rust-nightly: true
token: "${{ secrets.GITHUB_TOKEN }}"

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
7 changes: 5 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ install some tools outside of R.
- macOS: Make sure [Xcode](https://developer.apple.com/support/xcode/)
is installed.
- Install [CMake](https://cmake.org/) and add it to your PATH.
- If generate the website locally, please
install [Quarto CLI](https://quarto.org/) and add it to your PATH.
- Install [Task](https://taskfile.dev/), used as a task runner.

Note that the `Makefile` in the root directory of the repository provides some
useful commands (e.g. `make requirements` to install the required version of
Note that the `Taskfile.yml` in the root directory of the repository provides some
useful commands (e.g. `task setup-dev` to install the required version of
Rust toolchain and dependent R packages).

About Rust code for R packages, see also
Expand Down
101 changes: 0 additions & 101 deletions Makefile

This file was deleted.

5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
(#641).
- New methods `$rle()` and `$rle_id()` (#648).

### Miscellaneous

- Remeve the `Makefile` in favor of `Taskfile.yml`.
Please use `task` instaed of `make` as a task runner (#654).

## polars 0.12.0

### BREAKING CHANGES DUE TO RUST-POLARS UPDATE
Expand Down
3 changes: 1 addition & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ tasks:
- setup-python-tools

setup-r-tools:
internal: true
env:
PKG_SYSREQS: FALSE
desc: Install R packages for development.
cmds:
- Rscript -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
- Rscript -e
'pak::repo_add("https://cloud.r-project.org/");
pak::local_install_deps(dependencies = c("all", "Config/Needs/dev", "Config/Needs/website"))'
Expand Down Expand Up @@ -74,7 +74,6 @@ tasks:
- python3 -m venv {{.VENV_DIR}}

setup-python-tools:
internal: true
desc: Install Python tools for development.
deps:
- setup-venv
Expand Down
Loading