Skip to content

Commit

Permalink
devops: Swap Makefile for Taskfile (PRQL#4090)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Jan 15, 2024
1 parent 0edda6e commit 2e856b1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 19 deletions.
3 changes: 3 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ includes:
prqlc:
taskfile: ./prqlc
dir: ./prqlc
zig:
taskfile: ./prqlc/bindings/prqlc-c/examples/minimal-zig
dir: ./prqlc/bindings/prqlc-c/examples/minimal-zig

vars:
# Keep in sync with .vscode/extensions.json
Expand Down
16 changes: 0 additions & 16 deletions prqlc/bindings/prqlc-c/examples/minimal-zig/Makefile

This file was deleted.

4 changes: 1 addition & 3 deletions prqlc/bindings/prqlc-c/examples/minimal-zig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

A minimal example for using prql-lib with Zig.

# How to run

make run
Run with `task zig` from the root of the repo.
41 changes: 41 additions & 0 deletions prqlc/bindings/prqlc-c/examples/minimal-zig/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# yaml-language-server: $schema=https://json.schemastore.org/taskfile.json

version: 3

vars:
project_root: "../../../../.."

tasks:
run:
deps:
- task: build
cmds:
- ./zig-out/bin/minimal-zig

build-prql:
desc: "Build prqlc-c"
cmds:
- cargo build --package prqlc-c --release
- mkdir -p c/
- cp {{.project_root}}/prqlc/bindings/prqlc-c/prqlc.h c/
- cp {{.project_root}}/target/release/libprqlc_c.* c/

build:
desc: "Build the project"
cmds:
- zig build

test:
desc: "Run tests"
deps:
- task: build
cmds:
- zig build test

default:
desc: "Build, run, test"
cmds:
- task: build-prql
- task: build
- task: run
- task: test

0 comments on commit 2e856b1

Please sign in to comment.