-
Notifications
You must be signed in to change notification settings - Fork 173
132 lines (116 loc) · 3.54 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: GCC Rust build and test (Alpine 32-bit)
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
gcompat
libc6-compat
libc-dev
libc++-dev
# - name: Install gcc dependency
# run: |
# sudo apt install gcc-multilib g++-multilib libc6-dev-i386
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0
shell: alpine.sh {0}
- name: Install dependencies with gcc
run: |
./contrib/download_prerequisites
shell: alpine.sh {0}
- name: Inspect libc file
run: |
file /usr/lib/* | grep "libc"
- name: Configure
run: |
mkdir -p gccrs-build;
cd gccrs-build;
../configure \
--host=i586-alpine-linux-musl --build=i586-alpine-linux-musl --target=i586-alpine-linux-musl \
--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: Produce warning logs
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
cat log_warnings
shell: alpine.sh {0}
- name: Archive warnings logs
uses: actions/upload-artifact@v3
with:
name: warnings
path: |
gccrs-build/log_warnings
- 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}"
shell: alpine.sh {0}
- 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}