Skip to content

Commit 8d48597

Browse files
committed
Add testing on powerpc to the github CI
ChangeLog: * .github/workflows/ccpp.yml: Add powerpc target compile and test. Signed-off-by: Owen Avery <[email protected]>
1 parent 7691105 commit 8d48597

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

.github/workflows/ccpp.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,3 +512,90 @@ jobs:
512512
else \
513513
exit 0; \
514514
fi
515+
516+
build-and-check-powerpc:
517+
518+
env:
519+
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
520+
LC_ALL: C.UTF-8
521+
522+
runs-on: ubuntu-22.04
523+
524+
steps:
525+
- uses: actions/checkout@v4
526+
527+
- name: Install Deps
528+
run: |
529+
sudo apt-get update;
530+
sudo apt-get install -y \
531+
automake \
532+
autoconf \
533+
libtool \
534+
autogen \
535+
bison \
536+
flex \
537+
libgmp3-dev \
538+
libmpfr-dev \
539+
libmpc-dev \
540+
build-essential \
541+
gcc-multilib \
542+
g++-multilib \
543+
dejagnu;
544+
# install Rust directly using rustup
545+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
546+
# set up combined tree build
547+
git clone https://sourceware.org/git/binutils-gdb.git \
548+
-b binutils-2_44-branch --depth 1 ../binutils;
549+
ln -s "$(pwd)"/../binutils/* . || true;
550+
git clone https://sourceware.org/git/newlib-cygwin.git \
551+
-b newlib-4.5.0 --depth 1 ../newlib;
552+
ln -s "$(pwd)"/../newlib/* . || true;
553+
git clone https://git.savannah.gnu.org/git/dejagnu.git \
554+
-b dejagnu-1.6.3-release --depth 1 ../dejagnu;
555+
ln -s "$(pwd)"/../dejagnu/* . || true;
556+
git clone https://sourceware.org/git/binutils-gdb.git \
557+
-b gdb-16.2-release --depth 1 ../gdb;
558+
ln -s "$(pwd)"/../gdb/* . || true;
559+
560+
- name: Make Source Read-Only
561+
run: chmod -R a-w ./*
562+
563+
- name: Configure
564+
run: |
565+
mkdir -p gccrs-build;
566+
cd gccrs-build;
567+
../configure \
568+
--enable-languages=rust \
569+
--disable-bootstrap \
570+
--enable-multilib \
571+
--target=powerpc-eabisim
572+
573+
- name: Build
574+
shell: bash
575+
run: |
576+
cd gccrs-build; \
577+
# Add cargo to our path quickly
578+
. "$HOME/.cargo/env";
579+
make -Otarget -j $(nproc) 2>&1 | tee log
580+
581+
- name: Run Tests
582+
run: |
583+
cd gccrs-build; \
584+
make check-rust RUNTESTFLAGS="--target_board=powerpc-sim"
585+
- name: Archive check-rust results
586+
uses: actions/upload-artifact@v4
587+
with:
588+
name: check-rust-logs-powerpc
589+
path: |
590+
gccrs-build/gcc/testsuite/rust/
591+
- name: Check regressions
592+
run: |
593+
cd gccrs-build; \
594+
if grep -e "unexpected" -e "unresolved" -e "ERROR:" gcc/testsuite/rust/rust.sum;\
595+
then \
596+
echo "::error title=Regression test failed::some tests are not correct"; \
597+
perl -n ../.github/emit_test_errors.pl < gcc/testsuite/rust/rust.sum; \
598+
exit 1; \
599+
else \
600+
exit 0; \
601+
fi

0 commit comments

Comments
 (0)