-
Notifications
You must be signed in to change notification settings - Fork 19
98 lines (85 loc) · 3.28 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: "Unit tests"
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }} # Experimental builds may fail
strategy:
matrix:
include:
# iRODS 4.2.7 clients on Ubuntu 16.04
- irods: "4.2.7"
build_image: "ghcr.io/wtsi-npg/ub-16.04-irods-clients-dev-4.2.7:latest"
server_image: "ghcr.io/wtsi-npg/ub-16.04-irods-4.2.7:latest"
experimental: false
# iRODS 4.2.11 clients on Ubuntu 18.04
- irods: "4.2.11"
build_image: "ghcr.io/wtsi-npg/ub-18.04-irods-clients-dev-4.2.11:latest"
server_image: "ghcr.io/wtsi-npg/ub-18.04-irods-4.2.11:latest"
experimental: false
# iRODS 4.2.12 clients on Ubuntu 18.04
- irods: "4.2.12"
build_image: "ghcr.io/wtsi-npg/ub-18.04-irods-clients-dev-4.2.12:latest"
server_image: "ghcr.io/wtsi-npg/ub-18.04-irods-4.2.12:latest"
experimental: false
# iRODS 4.3.1 clients on Ubuntu 22.04
- irods: "4.3.1"
build_image: "ghcr.io/wtsi-npg/ub-22.04-irods-clients-dev-4.3.1:latest"
server_image: "ghcr.io/wtsi-npg/ub-22.04-irods-4.3.1:latest"
experimental: false
# iRODS 4.3-nightly on Ubuntu 22.04
- irods: "4.3-nightly"
build_image: "ghcr.io/wtsi-npg/ub-22.04-irods-clients-dev-4.3-nightly:latest"
server_image: "ghcr.io/wtsi-npg/ub-22.04-irods-4.3-nightly:latest"
experimental: true
container:
image: ${{ matrix.build_image }}
services:
irods-server:
image: ${{ matrix.server_image }}
ports:
- "1247:1247"
- "20000-20199:20000-20199"
options: >-
--health-cmd "nc -z -v localhost 1247"
--health-start-period 30s
--health-interval 10s
--health-timeout 20s
--health-retries 6
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Configure iRODS clients"
run: |
mkdir -p "$HOME/.irods"
cat <<'EOF' > "$HOME/.irods/irods_environment.json"
{
"irods_host": "irods-server",
"irods_port": 1247,
"irods_user_name": "irods",
"irods_zone_name": "testZone",
"irods_home": "/testZone/home/irods",
"irods_default_resource": "replResc"
}
EOF
# Without this, Actions refuses the connection between the containers:
nc -z -v irods-server 1247
echo "irods" | script -q -c "iinit" /dev/null
ienv
ils
ilsresc
- name: "Build and test baton"
env:
CK_DEFAULT_TIMEOUT: 60
ASAN_OPTIONS: "detect_leaks=0"
LDFLAGS: ${{ matrix.irods == '4.3.0' && '-Wl,-z,muldefs' || '' }}
run: |
# Avoid git exiting when Actions runs
git config --global --add safe.directory "$PWD"
autoreconf -fi
./configure --enable-address-sanitizer
make distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-address-sanitizer LDFLAGS=\"$LDFLAGS\""
- name: "Show test log"
if: ${{ failure() }}
run: |
find "$GITHUB_WORKSPACE" -name \*.log -exec cat {} \;