Skip to content

Commit 6ecb07c

Browse files
authored
feat(bindings/haskell): add CI test for haskell binding (#2468)
* feat(bindings/haskell): add CI test for haskell binding Signed-off-by: silver-ymz <[email protected]> * run github action Signed-off-by: silver-ymz <[email protected]> * typo Signed-off-by: silver-ymz <[email protected]> * manual install haskell toolchain Signed-off-by: silver-ymz <[email protected]> --------- Signed-off-by: silver-ymz <[email protected]>
1 parent c55c94e commit 6ecb07c

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Bindings Haskell CI
19+
20+
on:
21+
push:
22+
branches:
23+
- main
24+
tags:
25+
- '*'
26+
pull_request:
27+
branches:
28+
- main
29+
paths:
30+
- "bindings/haskell/**"
31+
- ".github/workflows/bindings_haskell.yml"
32+
workflow_dispatch:
33+
34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
36+
cancel-in-progress: true
37+
38+
permissions:
39+
contents: read
40+
41+
jobs:
42+
test:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
- name: Setup Haskell toolchain
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y ghc cabal-install
50+
cabal update
51+
- name: Setup Rust toolchain
52+
uses: ./.github/actions/setup
53+
- name: Build & Test
54+
working-directory: "bindings/haskell"
55+
run: |
56+
cargo build
57+
LIBRARY_PATH=../../target/debug cabal build
58+
LD_LIBRARY_PATH=../../target/debug cabal test

bindings/haskell/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Test suite logged to:
7777

7878
## Misc
7979

80-
If you don't want to specify `LIBRARY_PATH` every time, you can use [`direnv`](https://direnv.net/) to set the environment variable automatically. Add the following to your `.envrc`:
80+
If you don't want to specify `LIBRARY_PATH` and `LD_LIBRARY_PATH` every time, you can use [`direnv`](https://direnv.net/) to set the environment variable automatically. Add the following to your `.envrc`:
8181

8282
```shell
8383
export LIBRARY_PATH=../../target/debug:LIBRARY_PATH

0 commit comments

Comments
 (0)