File tree 2 files changed +59
-120
lines changed
2 files changed +59
-120
lines changed Original file line number Diff line number Diff line change
1
+ name : ci
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-22.04
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ - run : rustup component add rustfmt rustc-dev
15
+ - uses : Swatinem/rust-cache@v2
16
+ - run : |
17
+ sudo apt-get update
18
+ sudo apt-get install \
19
+ libbrotli-dev \
20
+ libclang-15-dev \
21
+ libgcrypt20 \
22
+ libreadline-dev \
23
+ libidn2-dev \
24
+ libldap2-dev \
25
+ libnghttp2-dev \
26
+ libpcre3-dev \
27
+ libpsl-dev \
28
+ librtmp-dev \
29
+ libtool \
30
+ python3-setuptools \
31
+ python3-wheel \
32
+ rcs \
33
+ zlib1g-dev
34
+ - name : cargo fmt --check
35
+ run : |
36
+ export RUSTFLAGS="-D warnings"
37
+ export RUSTDOCFLAGS="-D warnings"
38
+ cargo fmt --check
39
+ - name : cargo build --release
40
+ run : |
41
+ export RUSTFLAGS="-D warnings"
42
+ export RUSTDOCFLAGS="-D warnings"
43
+ # Don't build with `--all-features` as `--all-features` includes `--features llvm-static`,
44
+ # which we don't want to test here (see https://github.com/immunant/c2rust/issues/500).
45
+ cargo build --release
46
+ - name : cargo test --release --workspace
47
+ run : |
48
+ export RUSTFLAGS="-D warnings"
49
+ export RUSTDOCFLAGS="-D warnings"
50
+ cargo test --release --workspace
51
+ - name : Test translator
52
+ run : |
53
+ # `test_translator.py` compiles translated code,
54
+ # which has tons of warnings.
55
+ # `RUSTFLAGS="-D warnings"` would be inherited by that,
56
+ # causing tons of errors, so don't set that.
57
+ # `test_translator.py` does not rebuild,
58
+ # so changing `RUSTFLAGS` will not trigger a full rebuild.
59
+ ./scripts/test_translator.py tests/
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments