File tree Expand file tree Collapse file tree 2 files changed +458
-433
lines changed Expand file tree Collapse file tree 2 files changed +458
-433
lines changed Original file line number Diff line number Diff line change 1+ name : ' Build GCC'
2+ description : ' Builds GCC with Rust enabled'
3+ inputs :
4+ extra-configure-env :
5+ description : ' Extra env for configure'
6+ required : false
7+ default : ' '
8+
9+ run_test_flags :
10+ description : ' Args for RUN_TEST_FLAGS'
11+ required : true
12+
13+ warning_file :
14+ description : ' Filename with expected warnings'
15+ required : true
16+
17+ # outputs:
18+ # random-number:
19+ # description: "Random number"
20+ # value: ${{ steps.random-number-generator.outputs.random-number }}
21+ runs :
22+ using : " composite"
23+ steps :
24+ - name : Install dependencies
25+ run : |
26+ sudo apt-get update;
27+ sudo apt-get install -y \
28+ automake \
29+ autoconf \
30+ libtool \
31+ autogen \
32+ bison \
33+ flex \
34+ libgmp3-dev \
35+ libmpfr-dev \
36+ libmpc-dev \
37+ build-essential \
38+ gcc-multilib \
39+ g++-multilib \
40+ dejagnu;
41+ # install Rust directly using rustup
42+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
43+ shell : bash
44+
45+ - name : Make Source Read-Only
46+ run : chmod -R a-w ./*
47+
48+ - name : Configure GCC
49+ run : |
50+ mkdir -p gccrs-build;
51+ cd gccrs-build;
52+ ${{ inputs.extra-configure-env }}
53+ ../configure \
54+ --enable-languages=rust \
55+ --disable-bootstrap \
56+ --enable-multilib
57+
58+ - name : Build GCC
59+ shell : bash
60+ run : |
61+ cd gccrs-build; \
62+ # Add cargo to our path quickly
63+ . "$HOME/.cargo/env";
64+ make -Otarget -j $(nproc) 2>&1 | tee log
65+
66+ - name : Check for new warnings
67+ run : |
68+ cd gccrs-build
69+ < log grep 'warning: ' | grep rust | sort > log_warnings
70+ if diff -U0 ../.github/${{ inputs.warning_file }} log_warnings; then
71+ :
72+ else
73+ echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.'
74+ exit 1
75+ fi >&2
76+
77+ - name : Run Tests
78+ run : |
79+ cd gccrs-build; \
80+ make check-rust RUNTESTFLAGS="${{ inputs.run_test_flags }}"
81+
82+ - name : Check regressions
83+ run : |
84+ cd gccrs-build; \
85+ if grep -e "unexpected" -e "unresolved" -e "ERROR:" gcc/testsuite/rust/rust.sum;\
86+ then \
87+ echo "::error title=Regression test failed::some tests are not correct"; \
88+ perl -n ../.github/emit_test_errors.pl < gcc/testsuite/rust/rust.sum; \
89+ exit 1; \
90+ else \
91+ exit 0; \
92+ fi
You can’t perform that action at this time.
0 commit comments