-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
118 lines (111 loc) · 3.92 KB
/
.gitlab-ci.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Copyright © 2017–2019 University of Malta
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
before_script:
- getconf LONG_BIT
- rustup self update
- rustup --version
- rustup toolchain install --profile minimal beta-$TARGET 1.37.0-$TARGET
- rustup component add --toolchain beta-$TARGET rustfmt clippy
- if [ -d cargo/registry/cache ]; then rm -rf $CARGO_HOME/registry/cache; mkdir -p $CARGO_HOME/registry; cp -R cargo/registry/cache $CARGO_HOME/registry/; echo Copied registry/cache; fi
- if [ -d $CARGO_HOME/registry/src ]; then rm -r $CARGO_HOME/registry/src; fi
- if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/registry; find cache -name \*.crate) fi
after_script:
- if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/registry; for c in cache/*/*.crate; do s=src/${c#cache/}; if [ ! -e ${s%.crate} ]; then rm -v $c; fi; done; find cache -name \*.crate) fi
- rm -rf cargo
- mkdir -p cargo/registry
- if [ -d $CARGO_HOME/registry/cache ]; then cp -R $CARGO_HOME/registry/cache cargo/registry/; echo Updated registry/cache; fi
x86_64-gnulinux:
image: amd64/rust:1
variables:
TARGET: x86_64
cache:
key: $CI_JOB_NAME
paths:
- cargo/
script:
- cargo +beta-$TARGET test --features fail-on-warnings
- cargo +beta-$TARGET test --release --features fail-on-warnings
- cargo +beta-$TARGET fmt -- --check
- cargo +beta-$TARGET clippy --all-targets --features fail-on-warnings
- rm Cargo.lock
- cargo +1.37.0-$TARGET test --features fail-on-warnings
- cargo +1.37.0-$TARGET test --release --features fail-on-warnings
except:
- www
i686-gnulinux:
image: i386/rust:1
variables:
TARGET: i686
cache:
key: $CI_JOB_NAME
paths:
- cargo/
script:
- cargo +beta-$TARGET test --features fail-on-warnings
- cargo +beta-$TARGET test --release --features fail-on-warnings
- cargo +beta-$TARGET fmt -- --check
- cargo +beta-$TARGET clippy --all-targets --features fail-on-warnings
- rm Cargo.lock
- cargo +1.37.0-$TARGET test --features fail-on-warnings
- cargo +1.37.0-$TARGET test --release --features fail-on-warnings
except:
- www
#Disable use-system-libs tests until GMP version catches up
#
#x86_64-gnulinux-sys-libs:
# image: amd64/rust:1
# variables:
# TARGET: x86_64
# cache:
# key: $CI_JOB_NAME
# paths:
# - cargo/
# script:
# - apt-get -y update
# - apt-get -y install libgmp-dev libmpfr-dev libmpc-dev
# - cargo +beta-$TARGET test --features "fail-on-warnings use-system-libs"
# - cargo +beta-$TARGET test --release --features "fail-on-warnings use-system-libs"
# - cargo +beta-$TARGET fmt -- --check
# - cargo +beta-$TARGET clippy --all-targets --features "fail-on-warnings use-system-libs"
# - rm Cargo.lock
# - cargo +1.37.0-$TARGET test --features "fail-on-warnings use-system-libs"
# - cargo +1.37.0-$TARGET test --release --features "fail-on-warnings use-system-libs"
# except:
# - www
#
#i686-gnulinux-sys-libs:
# image: i386/rust:1
# variables:
# TARGET: i686
# cache:
# key: $CI_JOB_NAME
# paths:
# - cargo/
# script:
# - apt-get -y update
# - apt-get -y install libgmp-dev libmpfr-dev libmpc-dev
# - cargo +beta-$TARGET test --features "fail-on-warnings use-system-libs"
# - cargo +beta-$TARGET test --release --features "fail-on-warnings use-system-libs"
# - cargo +beta-$TARGET fmt -- --check
# - cargo +beta-$TARGET clippy --all-targets --features "fail-on-warnings use-system-libs"
# - rm Cargo.lock
# - cargo +1.37.0-$TARGET test --features "fail-on-warnings use-system-libs"
# - cargo +1.37.0-$TARGET test --release --features "fail-on-warnings use-system-libs"
# except:
# - www
pages:
image: alpine:latest
before_script:
- "true"
script:
- "true"
after_script:
- "true"
artifacts:
paths:
- public
only:
- www