Skip to content

Commit

Permalink
feat(bindings/haskell): add CI test for haskell binding (#2468)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
silver-ymz authored Jun 15, 2023
1 parent c55c94e commit 6ecb07c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/bindings_haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Bindings Haskell CI

on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
paths:
- "bindings/haskell/**"
- ".github/workflows/bindings_haskell.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Haskell toolchain
run: |
sudo apt-get update
sudo apt-get install -y ghc cabal-install
cabal update
- name: Setup Rust toolchain
uses: ./.github/actions/setup
- name: Build & Test
working-directory: "bindings/haskell"
run: |
cargo build
LIBRARY_PATH=../../target/debug cabal build
LD_LIBRARY_PATH=../../target/debug cabal test
2 changes: 1 addition & 1 deletion bindings/haskell/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Test suite logged to:

## Misc

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`:
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`:

```shell
export LIBRARY_PATH=../../target/debug:LIBRARY_PATH
Expand Down

0 comments on commit 6ecb07c

Please sign in to comment.