Skip to content

Commit

Permalink
build: remove the Makefile in favor of the Taskfile.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Jan 3, 2024
1 parent 3bf4f94 commit 4dbee37
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 110 deletions.
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
8 changes: 4 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,11 @@ 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

- 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
6 changes: 4 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ 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.

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.

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

0 comments on commit 4dbee37

Please sign in to comment.