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 /.github | |
| parent | Update submodules (diff) | |
| parent | remove travis config (diff) | |
| download | TCPDBench-4cd2e18f71479aea0c55429b1602181cec9cb8ae.tar.gz TCPDBench-4cd2e18f71479aea0c55429b1602181cec9cb8ae.zip | |
Merge branch 'feature/github_actions'
Diffstat (limited to '.github')
| -rwxr-xr-x | .github/scripts/test_docker.sh | 27 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 50 |
2 files changed, 77 insertions, 0 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 |
