-
Notifications
You must be signed in to change notification settings - Fork 161
115 lines (101 loc) · 3.2 KB
/
cppp32.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
name: GCC Rust build and test
on:
push:
branches:
- trying
- staging
pull_request:
branches: [ master ]
merge_group:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
build-alpine-32bit-and-check-alpine-32bit:
env:
# Force locale, in particular for reproducible results re '.github/bors_log_expected_warnings' (see below).
LC_ALL: C.UTF-8
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Alpine Linux (32-bit)
uses: jirutka/setup-alpine@v1
with:
arch: x86
packages: >
automake
autoconf
libtool
bison
flex
gmp-dev
mpfr-dev
mpc1-dev
build-base
dejagnu
curl
- name: This should print 32bit # TODO : Remove this after all is passing
run: uname -m
shell: alpine.sh {0}
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0 --target i686-unknown-linux-musl
shell: alpine.sh {0}
- name: Install dependencies with gcc
run: |
./contrib/download_prerequisites
shell: alpine.sh {0}
- name: Configure
run: |
mkdir -p gccrs-build;
cd gccrs-build;
../configure \
--enable-languages=rust \
--disable-bootstrap \
--disable-multilib # Try to disable multilib on alpine https://github.com/conan-io/conan/issues/14307#issuecomment-1652433132
shell: alpine.sh {0}
- name: Build
run: |
cd gccrs-build; \
# Add cargo to our path quickly
. "$HOME/.cargo/env";
make -Otarget -j $(nproc) 2>&1 | tee log
shell: alpine.sh {0}
- name: Archive the build log # TODO : Remove this after all is passing
uses: actions/upload-artifact@v3
with:
# Store it now since the log is too big for github actions to display on web ui
name: gccrs-build-log
path: gccrs-build/log
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
if diff -U0 ../.github/alpine_32bit_log_warnings log_warnings; then
:
else
echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.'
exit 1
fi >&2
shell: alpine.sh {0}
- name: Run Tests
run: |
cd gccrs-build; \
make check-rust RUNTESTFLAGS="--target_board=unix\{-m32}"
- name: Archive check-rust results
uses: actions/upload-artifact@v3
with:
name: check-rust-logs
path: |
gccrs-build/gcc/testsuite/rust/
- name: Check regressions
run: |
cd gccrs-build; \
if grep -e "unexpected" -e "unresolved" -e "ERROR:" gcc/testsuite/rust/rust.sum;\
then \
echo "::error title=Regression test failed::some tests are not correct"; \
perl -n ../.github/emit_test_errors.pl < gcc/testsuite/rust/rust.sum; \
exit 1; \
else \
exit 0; \
fi
shell: alpine.sh {0}