Skip to content

Commit

Permalink
gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Feb 23, 2023
1 parent c3677d5 commit 0fde887
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test-lib.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: test-lib

on:
pull_request:
paths:
- "prql-lib/**"
- ".github/workflows/test-lib.yaml"
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout code
uses: actions/checkout@v3
- name: 💰 Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ inputs.target_option }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build
uses: richb-hanover/cargo@v1.1.0
with:
command: build
args: --release -p prql-lib
- name: Run basic C example
working-directory: prql-lib/examples/minimal-c
run: make run
5 changes: 3 additions & 2 deletions prql-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ allows embedding in languages that support FFI - looking at Golang.

## Linking

See [examples/basic-c/Makefile](examples/basic-c/Makefile).
See [examples/minimal-c/Makefile](examples/minimal-c/Makefile).

Copy the `.a` and `.so` files in a convenient place and add the following
compile flags to Go (cgo):
Expand All @@ -16,7 +16,8 @@ compile flags to Go (cgo):

## Examples

For a minimal example, see [examples/basic-c/main.c](examples/basic-c/main.c).
For a minimal example, see
[examples/minimal-c/main.c](examples/minimal-c/main.c).

Below is an example from an actual application that is using PRQL in Go.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0fde887

Please sign in to comment.