Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc ci continue by @cooljeanius #96

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1e27cd0
Add linux ci
talregev Jul 7, 2023
e6f92c6
Merge pull request #1 from talregev/TalR/gcc_ci
cooljeanius Sep 10, 2023
0084cad
Merge branch 'gcc-mirror:master' into me/CI
cooljeanius Sep 29, 2023
53bb6b5
Merge branch 'gcc-mirror:master' into me/CI
cooljeanius Oct 14, 2023
c74844e
Update linux.yaml
cooljeanius Oct 15, 2023
03387fe
Update linux.yaml
cooljeanius Oct 15, 2023
8562ebb
Update linux.yaml
cooljeanius Oct 15, 2023
5d21e97
Update linux.yaml
cooljeanius Oct 15, 2023
0e35a45
Update linux.yaml
cooljeanius Oct 15, 2023
ff39e77
Update linux.yaml
cooljeanius Oct 15, 2023
5757960
Update linux.yaml
cooljeanius Oct 15, 2023
f59981d
Update linux.yaml
cooljeanius Oct 15, 2023
2fdfa60
Update linux.yaml
cooljeanius Oct 15, 2023
122eaa0
Update linux.yaml
cooljeanius Oct 15, 2023
59eb82b
Update linux.yaml
cooljeanius Oct 16, 2023
264c728
Update linux.yaml
cooljeanius Oct 16, 2023
b7c6ea0
Update linux.yaml
cooljeanius Oct 16, 2023
6129fa5
Merge branch 'gcc-mirror:master' into me/CI
cooljeanius Oct 16, 2023
6463658
Update linux.yaml
cooljeanius Oct 16, 2023
2f81295
Merge branch 'me/CI' of github.com:cooljeanius/gcc into me/CI
cooljeanius Oct 16, 2023
9f40393
Update linux.yaml
cooljeanius Oct 16, 2023
9fcfd81
Update linux.yaml
cooljeanius Oct 16, 2023
c2cd05d
Update linux.yaml
cooljeanius Oct 16, 2023
9392ef8
Update linux.yaml
cooljeanius Oct 16, 2023
dbc232e
Update linux.yaml
cooljeanius Oct 16, 2023
ea929b6
Update linux.yaml
cooljeanius Oct 16, 2023
d38fe5f
Update linux.yaml
cooljeanius Oct 17, 2023
7b93be5
Merge branch 'gcc-mirror:master' into me/CI
cooljeanius Oct 17, 2023
59d859a
Add linux ci
talregev Jul 7, 2023
3ab36d8
Merge branch 'TalR/gcc_ci_cooljeanius' into me/CI
cooljeanius Oct 19, 2023
5afa3f7
Merge pull request #4 from cooljeanius/me/CI
talregev Oct 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 189 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: Linux
on:
push:
branches:
- master
- me/*
- releases/gcc-*
tags:
- releases/gcc-*
pull_request:
branches:
- master
- me/*
- releases/gcc-*
tags:
- releases/gcc-*

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.name }}-build
runs-on: ubuntu-latest
timeout-minutes: 720
strategy:
matrix:
include:
- name: ubuntu-x64
target: x86_64

fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-dev libc-devtools texlive findutils binutils autogen gettext autopoint libasprintf-dev libgettextpo-dev mailutils mailutils-mh procmail emacs exim4-base msmtp bsd-mailx

- name: Install dependencies for aarch64
if: success() && contains(matrix.target, 'aarch64')
run: |
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu

- name: Stamp
if: success()
env:
revision: ${{ github.head_ref }}
run: |
if test -z "${revision}"; then revision=0; fi
{
date
echo "$(TZ=UTC date) (revision ${revision})"
} > LAST_UPDATED

- name: Cache
id: cache-deps
uses: actions/cache@v3
env:
cache-name: cache-downloaded-prerequisites
with:
path: ../build
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('LAST_UPDATED') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Download prerequisites
if: success()
run: |
./contrib/download_prerequisites
ls

- name: Configure x86_64
if: success() && matrix.target == 'x86_64'
run: |
if test -n "${ADA_INCLUDE_PATH}"; then unset ADA_INCLUDE_PATH; fi
if test -n "${ADA_OBJECT_PATH}"; then unset ADA_OBJECT_PATH; fi
cd ../
if test ! -d build; then mkdir build; fi
cd build
../gcc/configure \
--enable-languages=c,c++,lto,objc,obj-c++ \
--prefix=/usr \
--with-gcc-major-version-only \
--program-prefix=x86_64-linux-gnu- \
--libexecdir=/usr/lib \
--without-included-gettext \
--enable-threads=posix \
--libdir=/usr/lib \
--disable-vtable-verify \
--with-system-zlib \
--with-target-system-zlib=auto \
--disable-bootstrap \
--disable-werror \
--with-tune=generic \
--without-cuda-driver \
--enable-checking=release \
--enable-silent-rules \
--build=x86_64-linux-gnu \
--host=x86_64-linux-gnu \
--target=x86_64-linux-gnu

- name: Make
if: success()
run: |
cd ../build
if test -x "$(which nproc)"; then echo "nproc says that we can use $(nproc) build jobs"; else echo "error: missing nproc!" >&2 && exit 1; fi
time (make -j"$(nproc)" | tee build.log)
if test -e build.log; then stat build.log && wc -l build.log; fi

- name: Debug failure
if: failure()
run: |
if test -r build.log; then grep -i "error:" build.log; \
elif test -r ../build/build.log; then grep -i "error:" ../build/build.log; \
elif test -e ../build/Makefile; then \
sudo apt install remake; \
cd ../build; \
remake -dpPw --trace=full; \
elif test -d ../build; then \
cd ../build && ls; \
else \
pwd && ls; \
fi

- name: Make docs (post-build)
if: success()
run: |
cd ../build
echo "make info" && (time make info) && find . -name "*.info" -print
echo "make dvi" && (time make dvi) && find . -name "*.dvi" -print
echo "make pdf" && (time make pdf) && find . -name "*.pdf" -print
echo "make html" && (time make html) && find . -name "*.html" -print

- name: Make install (plus docs)
if: success()
run: |
cd ../build
sudo make install
sudo make install-info
sudo make install-dvi
sudo make install-pdf
sudo make install-html
sudo make dir.info

- name: Tests
if: success()
run: |
if test -x /usr/bin/x86_64-linux-gnu-gcc; then /usr/bin/x86_64-linux-gnu-gcc --version; elif test -x ../build/gcc/xgcc; then ../build/gcc/xgcc --version; fi
if test -x /usr/bin/x86_64-linux-gnu-gcc; then /usr/bin/x86_64-linux-gnu-gcc -v; elif test -x ../build/gcc/xgcc; then ../build/gcc/xgcc --v; fi
cd ../build
if test -e build.log; then make warning.log; fi
time (make -k -j"$(nproc)" check RUNTESTFLAGS="compile.exp dg-torture.exp execute.exp old-deja.exp" | tee testsuite_output.log)
if test -e warning.log; then make mail-report-with-warnings.log; else make mail-report.log; fi
if test -x "$(which Mail)"; then \
if test -x mail-report-with-warnings.log; then \
echo "attempting to send mail-report-with-warnings.log"; \
./mail-report-with-warnings.log; \
stat mail-report-with-warnings.log; \
elif test -x mail-report.log; then \
echo "attempting to send mail-report.log"; \
./mail-report.log; \
stat mail-report.log; \
elif test -e testsuite_output.log; then \
echo "TODO: figure out a way to send testsuite_output.log"; \
else \
echo "Nothing to send."; \
fi; \
else \
echo "Warning: \"Mail\" program is missing, so skipping emailing of testresults!"; \
fi

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: logfiles
# A file, directory or wildcard pattern that describes what to upload
path: |
*.log
build/*.log
path/*.log
testsuite/*.log