Major refactoring of the qlever script #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --entrypoint bash adfreiburg/qlever -c "ServerMain --help" > /dev/null | |
docker run --entrypoint bash adfreiburg/qlever -c "IndexBuilderMain --help" > /dev/null | |
ServerMain --help > /dev/null | |
IndexBuilderMain --help > /dev/null | |
qlever | |
qlever help | |
- 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 $_ | |
qlever setup-config olympics | |
unbuffer qlever get-data docker.USE_DOCKER=true index index-stats start status test-query restart status test-query stop status start stop start test-query 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 $_ | |
qlever setup-config olympics | |
qlever get-data docker.USE_DOCKER=false index index-stats start status test-query restart status test-query stop status start stop start test-query 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 $_ | |
qlever setup-config olympics | |
unbuffer qlever get-data index index-stats | |
qlever docker.USE_DOCKER=false start status test-query | |
unbuffer qlever docker.USE_DOCKER=true stop status | |
unbuffer qlever docker.USE_DOCKER=true restart status test-query | |
qlever docker.USE_DOCKER=false stop status | |
ls -lh |