forked from cptpcrd/close_fds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
66 lines (60 loc) · 2.09 KB
/
.cirrus.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
task:
name: FreeBSD $FREEBSD_VERSION ($TOOLCHAIN)
freebsd_instance:
cpu: 1
image_family: $FREEBSD_IMAGE
matrix:
- env:
FREEBSD_VERSION: 12.2
FREEBSD_IMAGE: freebsd-12-2
- env:
FREEBSD_VERSION: 13.0
FREEBSD_IMAGE: freebsd-13-0
matrix:
- env:
TOOLCHAIN: stable
- env:
TOOLCHAIN: beta
- env:
TOOLCHAIN: nightly
allow_failures: $TOOLCHAIN == 'nightly'
env:
CODECOV_TOKEN: ENCRYPTED[d63ddb4bf9c049623ccbacc93fec2d356473ad31202cfa83ded904b6720b8c3e59167a4a0fe88e423e66cc7ac21797f6]
install_script:
- pkg install -y npm jq curl kcov bash git
- curl -sSf https://sh.rustup.rs -o rustup.sh
- sh rustup.sh -y --profile default --default-toolchain $TOOLCHAIN
build_script:
- . $HOME/.cargo/env
- cargo build
unmount_fdescfs_script:
- umount /dev/fd || true
no_fdescfs_test_script:
- . $HOME/.cargo/env
- cargo test
- |
mkdir -p coverage-no-fdescfs
for f in target/debug/deps/*; do
if [ -x "$f" ]; then
kcov --exclude-pattern=/.cargo,/.rustup,/usr/lib --include-path=$(pwd) --verify coverage-no-fdescfs "$f"
rm -f "coverage-no-fdescfs/${f##*/}"
fi
done
mount_fdescfs_script:
- mount -t fdescfs fdescfs /dev/fd
fdescfs_test_script:
- . $HOME/.cargo/env
- cargo test
- |
mkdir -p coverage-fdescfs
for f in target/debug/deps/*; do
if [ -x "$f" ]; then
kcov --exclude-pattern=/.cargo,/.rustup,/usr/lib --include-path=$(pwd) --verify coverage-fdescfs "$f"
rm -f "coverage-fdescfs/${f##*/}"
fi
done
coverage_collect_upload_script:
- kcov --merge coverage-merged/ coverage-no-fdescfs/ coverage-fdescfs/
- git clone https://github.com/codecov/uploader.git codecov-uploader -b "$(curl -sSf 'https://api.github.com/repos/codecov/uploader/releases/latest' | jq -r '.tag_name')"
- (cd codecov-uploader && npm install && npm run build)
- node codecov-uploader/dist/bin/codecov -e OS,TOOLCHAIN -n "$FREEBSD_IMAGE-$TOOLCHAIN" -Z -f coverage-merged/kcov-merged/cobertura.xml