-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from kjsanger/feature/github-actions
Move from Travis CI to GitHub Actions
- Loading branch information
Showing
6 changed files
with
101 additions
and
115 deletions.
There are no files selected for viewing
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
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\"" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.