Skip to content

Commit

Permalink
Use local clingo-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
sthiele committed Oct 11, 2023
1 parent 1d9997f commit 4bb4cf3
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 65 deletions.
152 changes: 88 additions & 64 deletions .github/workflows/test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,70 @@ name: CI tests
on: [push]

jobs:
linux:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda install clingo
shell: bash -l {0}
run: |
conda install -c potassco clingo=5.6.2
- name: Build
run: |
export CLINGO_LIBRARY_PATH=/usr/share/miniconda/envs/test/lib
cargo build --features=derive --verbose
- name: Run tests
run: |
export CLINGO_LIBRARY_PATH=/usr/share/miniconda/envs/test/lib
export LD_LIBRARY_PATH=/usr/share/miniconda/envs/test/lib
cargo test --features=derive --verbose
macos:
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda install clingo
shell: bash -l {0}
run: |
conda install -c potassco clingo=5.6.2
- name: Build
run: |
export CLINGO_LIBRARY_PATH=/usr/local/miniconda/envs/test/lib
cargo build --features=derive --verbose
- name: Run tests
run: |
export CLINGO_LIBRARY_PATH=/usr/local/miniconda/envs/test/lib
export DYLD_LIBRARY_PATH=/usr/local/miniconda/envs/test/lib
cargo test --features=derive --verbose
windows:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda install clingo
run: |
conda install -c potassco clingo=5.6.2
- name: Build
env:
CLINGO_LIBRARY_PATH: C:\Miniconda\envs\test\Library\lib
run: |
cargo build --features=derive --verbose
- name: Run tests
env:
CLINGO_LIBRARY_PATH: C:\Miniconda\envs\test\Library\lib
LD_LIBRARY_PATH: C:\Miniconda\envs\test\Library\lib;C:\Miniconda\envs\test\Lib
run: |
cargo test --features=derive --verbose
# linux:
# runs-on: "ubuntu-latest"
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# python-version: ${{ matrix.python-version }}
# - name: Conda install clingo
# shell: bash -l {0}
# run: |
# conda install -c potassco clingo=5.6.2
# - name: Build
# run: |
# export CLINGO_LIBRARY_PATH=/usr/share/miniconda/envs/test/lib
# cargo build --features=derive --verbose
# - name: Run tests
# run: |
# export CLINGO_LIBRARY_PATH=/usr/share/miniconda/envs/test/lib
# export LD_LIBRARY_PATH=/usr/share/miniconda/envs/test/lib
# cargo test --features=derive --verbose
# macos:
# runs-on: "macos-latest"
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# python-version: ${{ matrix.python-version }}
# - name: Conda install clingo
# shell: bash -l {0}
# run: |
# conda install -c potassco clingo=5.6.2
# - name: Build
# run: |
# export CLINGO_LIBRARY_PATH=/usr/local/miniconda/envs/test/lib
# cargo build --features=derive --verbose
# - name: Run tests
# run: |
# export CLINGO_LIBRARY_PATH=/usr/local/miniconda/envs/test/lib
# export DYLD_LIBRARY_PATH=/usr/local/miniconda/envs/test/lib
# cargo test --features=derive --verbose
# windows:
# runs-on: "windows-latest"
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# python-version: ${{ matrix.python-version }}
# - name: Conda install clingo
# run: |
# conda install -c potassco clingo=5.6.2
# - name: Build
# env:
# CLINGO_LIBRARY_PATH: C:\Miniconda\envs\test\Library\lib
# run: |
# cargo build --features=derive --verbose
# - name: Run tests
# env:
# CLINGO_LIBRARY_PATH: C:\Miniconda\envs\test\Library\lib
# LD_LIBRARY_PATH: C:\Miniconda\envs\test\Library\lib;C:\Miniconda\envs\test\Lib
# run: |
# cargo test --features=derive --verbose
linux-static:
runs-on: "ubuntu-latest"
steps:
Expand All @@ -75,6 +75,14 @@ jobs:
run: sudo apt-get install bison
- name: Install re2c
run: sudo apt-get install re2c
- name: Checkout clingo-sys branch test-clingo-wip
run: |
git clone https://github.com/potassco/clingo-sys.git ./clingo-sys
cd clingo-sys
git checkout st/test-clingo-wip
git submodule update --init --recursive
cd clingo
git checkout wip
- name: Build
run: cargo build --features=static-linking,derive --verbose
- name: Run tests
Expand All @@ -88,6 +96,14 @@ jobs:
brew update
brew install bison@2.7
brew install re2c
- name: Checkout clingo-sys branch test-clingo-wip
run: |
git clone https://github.com/potassco/clingo-sys.git ./clingo-sys
cd clingo-sys
git checkout st/test-clingo-wip
git submodule update --init --recursive
cd clingo
git checkout wip
- name: Build
run: |
export PATH="/usr/local/opt/bison@2.7/bin:$PATH"
Expand All @@ -104,6 +120,14 @@ jobs:
run: choco install winflexbison
- name: Install re2c
run: choco install re2c
- name: Checkout clingo-sys branch test-clingo-wip
run: |
git clone https://github.com/potassco/clingo-sys.git ./clingo-sys
cd clingo-sys
git checkout st/test-clingo-wip
git submodule update --init --recursive
cd clingo
git checkout wip
- name: Build
run: cargo build --features static-linking,derive -vv
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ derive = ["clingo-derive"]

[dependencies]
vec1 = "1.8.0"
clingo-sys = { git = "https://github.com/potassco/clingo-sys.git", branch = "st/test-clingo-wip", version = "0.7.3-dev", optional = true }
clingo-sys = { path = "./clingo-sys", version = "0.7.3-dev", optional = true }
clingo-derive = { version = "=0.2.0", optional = true }
thiserror = "1.0"
bitflags = "1.2"
Expand Down

0 comments on commit 4bb4cf3

Please sign in to comment.