diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2021-01-26 20:19:36 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2021-01-26 20:19:36 +0000 |
| commit | 4cd2e18f71479aea0c55429b1602181cec9cb8ae (patch) | |
| tree | 3dd351adab7c4f84fdbacad52efd00501a1f199a | |
| parent | Update submodules (diff) | |
| parent | remove travis config (diff) | |
| download | TCPDBench-4cd2e18f71479aea0c55429b1602181cec9cb8ae.tar.gz TCPDBench-4cd2e18f71479aea0c55429b1602181cec9cb8ae.zip | |
Merge branch 'feature/github_actions'
| -rwxr-xr-x | .github/scripts/test_docker.sh | 27 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 50 | ||||
| -rw-r--r-- | .travis.yml | 21 | ||||
| -rw-r--r-- | Dockerfile | 3 |
4 files changed, 79 insertions, 22 deletions
diff --git a/.github/scripts/test_docker.sh b/.github/scripts/test_docker.sh new file mode 100755 index 00000000..56dccf34 --- /dev/null +++ b/.github/scripts/test_docker.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Test TCPDBench build using Docker +# +# Author: G.J.J. van den Burg +# Date: 2021-01-26 +# + +set -e -u -x -o pipefail + +echo "Building docker image" + +docker build -t alan-turing-institute/tcpdbench . + +echo "Creating output directory" + +mkdir -p ${GITHUB_WORKSPACE}/analysis/output + +echo "Recreating results and checking for differences" + +docker run -v ${GITHUB_WORKSPACE}/analysis/output:/TCPDBench/analysis/output \ + alan-turing-institute/tcpdbench \ + /bin/bash -c "make clean && make results && git checkout ./analysis/output/rankplots/*.pdf && git diff --exit-code" + +echo "Test building the virtual environments" + +docker run alan-turing-institute/tcpdbench /bin/bash -c "make venvs" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..039af444 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: Reproducible Research + +on: + push: + pull_request: + schedule: + - cron: 42 8 * * */21 + +jobs: + tcpdbench-ubuntu: + name: Check TCPDBench (direct) + runs-on: ubuntu-latest + + steps: + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install build-essential latexmk texlive-latex-extra + shell: bash + + - name: Install Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Python dependencies + run: pip install -r ./analysis/requirements.txt + shell: bash + + - name: Make results + run: make results + shell: bash + + - name: Check results + run: git checkout ./analysis/output/rankplots/*.pdf && git diff --exit-code + shell: bash + + tcpdbench-docker: + name: Check TCPDBench (docker) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: TCPDBench docker check + run: ./.github/scripts/test_docker.sh + shell: bash diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5ec909d5..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: generic - -services: - - docker - -before_install: - - docker build -t alan-turing-institute/tcpdbench . - -script: - - mkdir -p /home/travis/build/alan-turing-institute/analysis/output - # create results (tables/figures) in the docker container note that we - # consider the build successful if there is no difference between the - # results in the repo and that generated by travis. An exception are the - # pdf files, which often differ due to different latex versions etc. - - docker run -v /home/travis/build/alan-turing-institute/analysis/output:/TCPDBench/analysis/output alan-turing-institute/tcpdbench /bin/bash -c "make clean && make results && git checkout ./analysis/output/rankplots/*.pdf && git diff --exit-code" - # Test that the virtual environments can be created. The virtualenvs are - # needed to run the experiments using the same package versions as used in - # the paper. Since these may depend on external (third-party) packages, - # they can potentially be fragile to unexpected changes, so we want to - # make sure we're notified when they no longer build correctly. - # - docker run alan-turing-institute/tcpdbench /bin/bash -c "make venvs" @@ -26,13 +26,14 @@ RUN apt-get install -y --no-install-recommends \ python3 \ python3-dev \ python3-tk \ + python3-venv \ python3-pip && \ pip3 install --no-cache-dir --upgrade setuptools && \ echo "alias python='python3'" >> /root/.bash_aliases && \ echo "alias pip='pip3'" >> /root/.bash_aliases && \ cd /usr/local/bin && ln -s /usr/bin/python3 python && \ cd /usr/local/bin && ln -s /usr/bin/pip3 pip && \ - pip install virtualenv abed + pip install virtualenv abed wheel # Set the default shell to bash RUN mv /bin/sh /bin/sh.old && cp /bin/bash /bin/sh |
