Skip to content

Commit

Permalink
Merge pull request #241 from kjsanger/feature/github-actions
Browse files Browse the repository at this point in the history
Move from Travis CI to GitHub Actions
  • Loading branch information
dkj authored May 14, 2021
2 parents ac3d2e7 + 419dfb7 commit 8b77086
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 115 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: "Unit tests"

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-18.04
continue-on-error: ${{ matrix.experimental }} # Experimental builds may fail

defaults:
run:
shell: bash -l -e -o pipefail {0}

env:
WSI_CONDA_CHANNEL: "https://dnap.cog.sanger.ac.uk/npg/conda/devel/generic"
CONDA_TEST_ENVIRONMENT: "testenv"
CK_DEFAULT_TIMEOUT: 20

strategy:
matrix:
experimental: [false]
include:
- irods: "4.2.7"
server_image: "wsinpg/ub-16.04-irods-4.2.7:latest"
experimental: false
- irods: "4.2.8"
server_image: "wsinpg/ub-18.04-irods-4.2.8:latest"
experimental: true

services:
irods:
image: ${{ matrix.server_image }}
ports:
- 1247:1247
- 20000-20199:20000-20199

steps:
- uses: actions/checkout@v2

- name: "Initialize Miniconda"
run: |
echo 'source $CONDA/etc/profile.d/conda.sh' >> "$HOME/.bash_profile"
- name: "Configure Miniconda"
run: |
conda config --prepend pkgs_dirs "$HOME/conda/pkgs"
conda config --prepend envs_dirs "$HOME/conda/envs"
conda config --set auto_update_conda False
conda config --prepend channels "$WSI_CONDA_CHANNEL"
conda config --append channels conda-forge
conda info
- name: "Install iRODS clients"
run: |
conda create -y -n "$CONDA_TEST_ENVIRONMENT"
conda install -y -n "$CONDA_TEST_ENVIRONMENT" python=3.9
conda install -y -n "$CONDA_TEST_ENVIRONMENT" sphinx=2.4
conda install -y -n "$CONDA_TEST_ENVIRONMENT" check
conda install -y -n "$CONDA_TEST_ENVIRONMENT" libjansson-dev
conda install -y -n "$CONDA_TEST_ENVIRONMENT" "irods-dev ==${{ matrix.irods }}"
conda install -y -n "$CONDA_TEST_ENVIRONMENT" "irods-icommands ==${{ matrix.irods }}"
- name: "Configure iRODS clients"
run: |
conda activate "$CONDA_TEST_ENVIRONMENT"
mkdir -p "$HOME/.irods"
cat <<'EOF' > "$HOME/.irods/irods_environment.json"
{
"irods_host": "localhost",
"irods_port": 1247,
"irods_user_name": "irods",
"irods_zone_name": "testZone",
"irods_home": "/testZone/home/irods",
"irods_default_resource": "testResc"
}
EOF
echo "irods" | script -q -c "iinit" /dev/null
ienv
ils
- name: "Build and test baton"
run: |
conda activate "$CONDA_TEST_ENVIRONMENT"
# Is there an environment variable for this?
CONDA_ENV="/home/runner/conda/envs/$CONDA_TEST_ENVIRONMENT"
CPPFLAGS="-I$CONDA_ENV/include -I$CONDA_ENV/include/irods"
LDFLAGS="-L$CONDA_ENV/lib -L$CONDA_ENV/lib/irods/externals"
autoreconf -i
./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS"
export LD_LIBRARY_PATH="$CONDA_ENV/lib"
make distcheck DISTCHECK_CONFIGURE_FLAGS="CPPFLAGS=\"$CPPFLAGS\" LDFLAGS=\"$LDFLAGS\""
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/travis_before_install.sh

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/travis_failure.sh

This file was deleted.

41 changes: 0 additions & 41 deletions scripts/travis_install.sh

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/travis_script.sh

This file was deleted.

0 comments on commit 8b77086

Please sign in to comment.