File tree 4 files changed +37
-26
lines changed
4 files changed +37
-26
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eux
3
+
4
+ rsync -a /usr/local/rnp /tmp
5
+ sudo -iu travis bash << EOF
6
+ cd /tmp/rnp
7
+ env GPG_VERSION=$GPG_VERSION BUILD_MODE=$BUILD_MODE ci/run-local.sh
8
+ EOF
9
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eux
3
+
4
+ export LOCAL_BUILDS=" $HOME /local-builds"
5
+ export BOTAN_INSTALL=" ${LOCAL_BUILDS} /botan-install"
6
+ export CMOCKA_INSTALL=" ${LOCAL_BUILDS} /cmocka-install"
7
+ export JSONC_INSTALL=" ${LOCAL_BUILDS} /jsonc-install"
8
+ export GPG_INSTALL=" ${LOCAL_BUILDS} /gpg-install"
9
+ export CC=clang
10
+ export CORES=$( grep -c ' ^$' /proc/cpuinfo)
11
+ ci/install.sh
12
+ ci/main.sh
13
+
Original file line number Diff line number Diff line change @@ -94,37 +94,14 @@ We can use a container for this, like so:
94
94
95
95
``` sh
96
96
./travis.sh
97
- # or
98
- # docker run -ti --rm travisci/ci-garnet:packer-1490989530 bash -l
99
97
```
100
98
101
- (Refer to
102
- [ here] ( https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image )
103
- and [ here] ( https://hub.docker.com/r/travisci/ci-garnet/tags/ ) )
104
-
105
- Inside the container, you will need to perform steps like the following:
99
+ Inside the container, you can do local CI runs like so:
106
100
107
101
``` sh
108
- cd ~ /
109
- git clone https://github.com/riboseinc/rnp
110
- # or if testing local copy
111
- # git clone /usr/local/rnp
112
- cd rnp
113
- export LOCAL_BUILDS=" $HOME /local-builds"
114
- export BOTAN_INSTALL=" ${LOCAL_BUILDS} /botan-install"
115
- export CMOCKA_INSTALL=" ${LOCAL_BUILDS} /cmocka-install"
116
- export JSONC_INSTALL=" ${LOCAL_BUILDS} /jsonc-install"
117
- export GPG_INSTALL=" ${LOCAL_BUILDS} /gpg-install"
118
- export GPG_VERSION=stable
119
- export BUILD_MODE=normal
120
- ci/install.sh
121
- env CC=clang ci/main.sh
102
+ env GPG_VERSION=beta BUILD_MODE=sanitize-leaks ci/local.sh
122
103
```
123
104
124
- (The above uses clang as the compiler -- use ` CC=gcc ` for GCC)
125
- Refer to the current ` .travis.yml ` for the most up-to-date information
126
- on what environment variables need to be set.
127
-
128
105
# Code Coverage
129
106
130
107
CodeCov is used for assessing our test coverage.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- docker run -ti -v $( pwd) :/usr/local/rnp --rm travisci/ci-garnet:packer-1490989530 bash -l
2
+
3
+ [ $# -eq 0 ] && CMD=' bash -l' || CMD=$*
4
+
5
+ docker run \
6
+ --tty \
7
+ --interactive \
8
+ --cap-add SYS_PTRACE \
9
+ --volume " $( pwd) :/usr/local/rnp" \
10
+ --workdir /usr/local/rnp \
11
+ --user 2000 \
12
+ --rm \
13
+ travisci/ci-garnet:packer-1512502276-986baf0 \
14
+ $CMD
3
15
You can’t perform that action at this time.
0 commit comments