Skip to content

Python-based version of the QLever script #22

Python-based version of the QLever script

Python-based version of the QLever script #22

name: End-to-end test on Linux
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
merge_group:
jobs:
end-to-end-test-linux:
runs-on: ${{matrix.os}}
strategy:
fail-fast: true
matrix:
os: [ubuntu-22.04]
steps:
- name: Checkout the QLever script
uses: actions/checkout@v3
with:
path: qlever-control
- name: Install dependencies for the QLever script
run: |
sudo apt update
sudo apt install unzip flake8 expect
pip3 install psutil termcolor
- name: Format and compile check
working-directory: ${{github.workspace}}/qlever-control
run: |
flake8 qlever
python3 -m py_compile qlever
- name: Download QLever binaries and docker image and install dependencies
run: |
# Download Docker image.
docker pull adfreiburg/qlever
# Download QLever binaries.
mkdir qlever-binaries && cd $_
wget -q https://ad-research.cs.uni-freiburg.de/downloads/qlever/ubuntu-22.04/ServerMain
wget -q https://ad-research.cs.uni-freiburg.de/downloads/qlever/ubuntu-22.04/IndexBuilderMain
chmod 755 ServerMain IndexBuilderMain
# Install depencies needed for running the binaries.
curl -Gs https://raw.githubusercontent.com/ad-freiburg/qlever/master/Dockerfile | sed -En 's/(add-apt|apt|tee)/sudo \1/g; s/^RUN //p' | sed '/^cmake/q' | sed -E 's/^(cmake.*)/mkdir -p build \&\& cd build\n\1\ncd ../' | sed -n '/^sudo/p' > INSTALL
cat INSTALL
source ./INSTALL
- name: Check that everything is found and runs
run: |
mkdir qlever-indices
pwd && ls -lh
export PATH="$PATH:$(pwd)/qlever-control:$(pwd)/qlever-binaries"
docker run adfreiburg/qlever --help > /dev/null
ServerMain --help > /dev/null
IndexBuilderMain --help > /dev/null
qlever
- name: Test actions for olympics dataset, with Docker
run: |
export PATH="$PATH:$(pwd)/qlever-control:$(pwd)/qlever-binaries"
mkdir -p ${{github.workspace}}/qlever-indices/olympics.1 && cd $_
unbuffer qlever setup-config olympics
unbuffer qlever get-data docker.USE_DOCKER=true index index-stats start status stop status
ls -lh
- name: Test actions for olympics dataset, without Docker
run: |
export PATH="$PATH:$(pwd)/qlever-control:$(pwd)/qlever-binaries"
mkdir -p ${{github.workspace}}/qlever-indices/olympics.2 && cd $_
unbuffer qlever setup-config olympics
unbuffer qlever get-data docker.USE_DOCKER=false index index-stats start status stop status
ls -lh
- name: Test actions for olympics dataset, with and without Docker
run: |
export PATH="$PATH:$(pwd)/qlever-control:$(pwd)/qlever-binaries"
mkdir -p ${{github.workspace}}/qlever-indices/olympics.3 && cd $_
unbuffer qlever setup-config olympics
unbuffer qlever get-data index index-stats
unbuffer qlever docker.USE_DOCKER=false start status
unbuffer qlever docker.USE_DOCKER=true stop status
unbuffer qlever docker.USE_DOCKER=true start status
unbuffer qlever docker.USE_DOCKER=false stop status
ls -lh