Skip to content

Commit 4adcff2

Browse files
committed
Travis CI: conditionally skip some tests
Based on Claudio's changes proposed in openwall#4484
1 parent c4d12d5 commit 4adcff2

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

.travis.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
language: c
22
dist: bionic
3+
os: linux
34

4-
matrix:
5+
jobs:
56
include:
67

78
# #### CPU formats test (gcc)
@@ -57,15 +58,5 @@ matrix:
5758
osx_image: xcode9.4
5859
env: OPENCL="yes"
5960

60-
# #########################################
61-
# #### Extra Testing Scheme
62-
# #########################################
63-
64-
# #### Intel OpenCL runtime Docker based testing
65-
- if: branch = bleeding-jumbo AND env(TRAVIS_PULL_REQUEST) = false
66-
os: linux
67-
compiler: gcc
68-
env: DOCKER="yes" OPENCL="yes"
69-
7061
script:
7162
- .travis/travis-ci.sh

.travis/travis-ci.sh

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
#!/bin/bash
22

3+
# if requested, run all tests
4+
if [[ "$TRAVIS_PULL_REQUEST_BRANCH" != "force-travis" ]]; then
5+
6+
# on the main branch, run all tests
7+
if [[ "$TRAVIS_BRANCH" != "bleeding-jumbo" || "$TRAVIS_PULL_REQUEST" =~ ^[0-9]+$ ]]; then
8+
9+
# # otherwise, run only Linux jobs for now
10+
# if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then
11+
echo '---------------------------------- Skipping CI ---------------------------------'
12+
echo 'In order to spare resources, skip Travis CI build.'
13+
echo '--------------------------------------------------------------------------------'
14+
15+
# Nothing to do.
16+
exit 0
17+
# fi
18+
fi
19+
fi
20+
321
# Need a docker image to run the tests
422
if [[ "$DOCKER" == "yes" ]]; then
523
docker run --cap-add SYS_PTRACE -v "$(pwd)":/cwd claudioandre/john:opencl sh -c \

0 commit comments

Comments
 (0)