Skip to content

Python-based version of the QLever script #66

Python-based version of the QLever script

Python-based version of the QLever script #66

Workflow file for this run

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, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Install required tools and Python packages
run: |
sudo apt update
sudo apt install wget unzip flake8 expect
pip3 install psutil
- name: Install latest version of QLever (download Docker image and compile natively)
working-directory: ${{github.workspace}}
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
# Check that the docker image and the binaries work.
docker run adfreiburg/qlever --help > /dev/null
./ServerMain --help > /dev/null
./IndexBuilderMain --help > /dev/null
- name: Format and compile check
run: |
flake8 qlever.py
python3 -m py_compile qlever.py
- name: Test actions for olympics dataset, with Docker
working-directory: ${{github.workspace}}
run: |
mkdir olympics.with-docker && cd $_
cp -a ../Qleverfile.ini .
unbuffer python3 ../qlever.py get-data docker.USE_DOCKER=true index start status stop status
ls -lh
- name: Test actions for olympics dataset, without Docker
working-directory: ${{github.workspace}}
run: |
export PATH="$PATH:$(pwd)/qlever-binaries"
mkdir olympics.without-docker && cd $_
cp -a ../Qleverfile.ini .
unbuffer python3 ../qlever.py get-data docker.USE_DOCKER=false index start status stop status
ls -lh
- name: Test actions for olympics dataset, with and without Docker
working-directory: ${{github.workspace}}
run: |
export PATH="$PATH:$(pwd)/qlever-binaries"
mkdir olympics.with-and-without-docker && cd $_
cp -a ../Qleverfile.ini .
unbuffer python3 ../qlever.py get-data index
unbuffer python3 ../qlever.py docker.USE_DOCKER=false start
unbuffer python3 ../qlever.py docker.USE_DOCKER=true stop
unbuffer python3 ../qlever.py docker.USE_DOCKER=true start
unbuffer python3 ../qlever.py docker.USE_DOCKER=false stop
unbuffer python3 ../qlever.py status
ls -lh