Add running cicd 32bit #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 latest Alpine Linux | |
uses: jirutka/setup-alpine@v1 | |
- name: Setup Alpine Linux (32-bit) | |
uses: jirutka/setup-alpine@v1 | |
with: | |
arch: x86 | |
packages: > | |
automake | |
autoconf | |
libtool | |
autogen | |
bison | |
flex | |
gmp-dev | |
mpfr-dev | |
mpc1-dev | |
build-base | |
gcc-multilib | |
g++-multilib | |
dejagnu | |
curl | |
- 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 | |
- name: Configure | |
run: | | |
mkdir -p gccrs-build; | |
cd gccrs-build; | |
../configure \ | |
--enable-languages=rust \ | |
--disable-bootstrap \ | |
--enable-multilib | |
- name: Build | |
shell: bash | |
run: | | |
cd gccrs-build; \ | |
# Add cargo to our path quickly | |
. "$HOME/.cargo/env"; | |
make -Otarget -j $(nproc) 2>&1 | tee log | |
- name: Check for new warnings | |
run: | | |
cd gccrs-build | |
< log grep 'warning: ' | sort > log_warnings | |
if diff -U0 ../.github/bors_log_expected_warnings log_warnings; then | |
: | |
else | |
echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.' | |
exit 1 | |
fi >&2 | |
- 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 | |