From 1e27cd0d0cc88b96116e945332917ce59c17ae0d Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Sat, 8 Jul 2023 00:57:05 +0300 Subject: [PATCH 01/23] Add linux ci --- .github/workflows/linux.yaml | 113 +++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 .github/workflows/linux.yaml diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml new file mode 100644 index 0000000000000..f90ea0bd3115a --- /dev/null +++ b/.github/workflows/linux.yaml @@ -0,0 +1,113 @@ +name: Linux +on: + push: + branches: + - master + - releases/gcc-* + tags: + - releases/gcc-* + pull_request: + branches: + - master + - 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 + 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 + + - 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: Download prerequisites + if: success() + run: | + ./contrib/download_prerequisites + + - name: Configure x86_64 + if: success() && matrix.target == 'x86_64' + run: | + unset ADA_INCLUDE_PATH + unset ADA_OBJECT_PATH + cd ../ + mkdir build + cd build + ../gcc/configure \ + --enable-languages=c,c++,go,d,fortran,objc,obj-c++,m2 \ + --prefix=/usr \ + --with-gcc-major-version-only \ + --program-prefix=x86_64-linux-gnu- \ + --enable-shared \ + --enable-linker-build-id \ + --libexecdir=/usr/lib \ + --without-included-gettext \ + --enable-threads=posix \ + --libdir=/usr/lib \ + --enable-nls \ + --enable-clocale=gnu \ + --enable-libstdcxx-debug \ + --enable-libstdcxx-time=yes \ + --with-default-libstdcxx-abi=new \ + --enable-gnu-unique-object \ + --disable-vtable-verify \ + --enable-plugin \ + --enable-default-pie \ + --with-system-zlib \ + --with-target-system-zlib=auto \ + --enable-objc-gc=auto \ + --enable-multiarch \ + --disable-werror \ + --with-arch-32=i686 \ + --with-abi=m64 \ + --with-multilib-list=m32,m64,mx32 \ + --enable-multilib \ + --with-tune=generic \ + --without-cuda-driver \ + --enable-checking=release \ + --build=x86_64-linux-gnu \ + --host=x86_64-linux-gnu \ + --target=x86_64-linux-gnu + + - name: Make bootstrap + if: success() + run: | + cd ../build + make bootstrap -j$(nproc) + + - name: Make install + if: success() + run: | + cd ../build + sudo make install + + - name: Tests + if: success() + run: | + /usr/bin/x86_64-linux-gnu-gcc --version + /usr/bin/x86_64-linux-gnu-gcc -v + cd ../build + make -k check From c74844efa046ab196e2830cd6ac89a63185169c6 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 01:08:40 -0400 Subject: [PATCH 02/23] Update linux.yaml try using bootstrap-lean instead of bootstrap --- .github/workflows/linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index f90ea0bd3115a..6a641cd770ac9 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -96,7 +96,7 @@ jobs: if: success() run: | cd ../build - make bootstrap -j$(nproc) + make bootstrap-lean -j$(nproc) - name: Make install if: success() From 03387feb9ff7fe33abe08d129b20a34fbbf43510 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 05:06:26 -0400 Subject: [PATCH 03/23] Update linux.yaml hopefully this goes quicker... --- .github/workflows/linux.yaml | 65 ++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 6a641cd770ac9..9887c92d16d62 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -3,14 +3,14 @@ on: push: branches: - master + - me/* - releases/gcc-* tags: - releases/gcc-* pull_request: branches: - master - - releases/gcc-* - tags: + - me/* - releases/gcc-* concurrency: @@ -36,13 +36,26 @@ jobs: - name: Install dependencies run: | sudo apt-get -qq update - sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-devtools - 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: 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: | @@ -51,13 +64,13 @@ jobs: - name: Configure x86_64 if: success() && matrix.target == 'x86_64' run: | - unset ADA_INCLUDE_PATH - unset ADA_OBJECT_PATH + 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 ../ - mkdir build + if test ! -d build; then mkdir build; fi cd build ../gcc/configure \ - --enable-languages=c,c++,go,d,fortran,objc,obj-c++,m2 \ + --enable-languages=c,c++,objc,obj-c++ \ --prefix=/usr \ --with-gcc-major-version-only \ --program-prefix=x86_64-linux-gnu- \ @@ -80,6 +93,7 @@ jobs: --with-target-system-zlib=auto \ --enable-objc-gc=auto \ --enable-multiarch \ + --disable-bootstrap \ --disable-werror \ --with-arch-32=i686 \ --with-abi=m64 \ @@ -88,26 +102,51 @@ jobs: --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 bootstrap + - name: Make docs + if: success() + run: | + cd ../build + make etags || make tags + make info + make dvi + make pdf + make html + + - name: Make if: success() run: | cd ../build - make bootstrap-lean -j$(nproc) + 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) + + - 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; fi - - name: Make install + - 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: | - /usr/bin/x86_64-linux-gnu-gcc --version - /usr/bin/x86_64-linux-gnu-gcc -v + 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 - make -k check + if test -e build.log; then make warning.log; fi + time make -k check + if test -e warning.log; then make mail-report-with-warnings.log; else make mail-report.log; fi + if test -x mail-report-with-warnings.log; then ./mail-report-with-warnings.log; elif test -x mail-report.log; then ./mail-report.log; fi From 8562ebb9b738d04a3d3bb4cb0347d953503737b4 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 05:16:44 -0400 Subject: [PATCH 04/23] Update linux.yaml --- .github/workflows/linux.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 9887c92d16d62..f5f2d1f29a470 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -36,7 +36,7 @@ jobs: - 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-devtools + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-devtools exuberant-ctags - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -58,8 +58,14 @@ jobs: - name: Download prerequisites if: success() + env: + revision: ${{ github.head_ref }} run: | - ./contrib/download_prerequisites + ./contrib/download_prerequisites + { + date + echo "$(TZ=UTC date) (revision ${revision})" + } > LAST_UPDATED - name: Configure x86_64 if: success() && matrix.target == 'x86_64' From 5d21e9740f5c626e6f24efd330d34fe9a8f4d158 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 05:23:39 -0400 Subject: [PATCH 05/23] Update linux.yaml reorder --- .github/workflows/linux.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index f5f2d1f29a470..cdd8ece9a051b 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -36,13 +36,24 @@ jobs: - 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-devtools exuberant-ctags + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-devtools emacs - 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 @@ -58,14 +69,9 @@ jobs: - name: Download prerequisites if: success() - env: - revision: ${{ github.head_ref }} run: | ./contrib/download_prerequisites - { - date - echo "$(TZ=UTC date) (revision ${revision})" - } > LAST_UPDATED + ls - name: Configure x86_64 if: success() && matrix.target == 'x86_64' From 0e35a4546f16972df244f6b50a22db5b9e0b0d6c Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 05:34:46 -0400 Subject: [PATCH 06/23] Update linux.yaml all right, never mind about tags... --- .github/workflows/linux.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index cdd8ece9a051b..5ec639215d64a 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -36,7 +36,7 @@ jobs: - 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-devtools emacs + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-devtools - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -123,7 +123,6 @@ jobs: if: success() run: | cd ../build - make etags || make tags make info make dvi make pdf From ff39e773be808117d5287572438e74ab2c9eaed6 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 06:37:09 -0400 Subject: [PATCH 07/23] Update linux.yaml trim down build a bit --- .github/workflows/linux.yaml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 5ec639215d64a..5f6c6859a58e5 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -36,7 +36,7 @@ jobs: - 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-devtools + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-devtools texlive - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -86,31 +86,17 @@ jobs: --prefix=/usr \ --with-gcc-major-version-only \ --program-prefix=x86_64-linux-gnu- \ - --enable-shared \ - --enable-linker-build-id \ --libexecdir=/usr/lib \ --without-included-gettext \ --enable-threads=posix \ --libdir=/usr/lib \ - --enable-nls \ - --enable-clocale=gnu \ - --enable-libstdcxx-debug \ - --enable-libstdcxx-time=yes \ - --with-default-libstdcxx-abi=new \ - --enable-gnu-unique-object \ --disable-vtable-verify \ - --enable-plugin \ - --enable-default-pie \ --with-system-zlib \ --with-target-system-zlib=auto \ - --enable-objc-gc=auto \ - --enable-multiarch \ + --disable-multiarch \ --disable-bootstrap \ --disable-werror \ - --with-arch-32=i686 \ - --with-abi=m64 \ - --with-multilib-list=m32,m64,mx32 \ - --enable-multilib \ + --disable-multilib \ --with-tune=generic \ --without-cuda-driver \ --enable-checking=release \ @@ -123,10 +109,9 @@ jobs: if: success() run: | cd ../build - make info - make dvi - make pdf - make html + echo "make dvi" && time make dvi + echo "make pdf" && time make pdf + echo "make html" && time make html - name: Make if: success() @@ -135,6 +120,12 @@ jobs: 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) + - name: Make docs (post-build) + if: success() + run: | + cd ../build + echo "make info" && time make info + - name: Debug failure if: failure() run: | From 575796064c82958f4e55e74fe618973e98afd145 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 07:03:24 -0400 Subject: [PATCH 08/23] Update linux.yaml I don't get why it needs to compile before building the docs... --- .github/workflows/linux.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 5f6c6859a58e5..7c0e09cd2d8cc 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -105,11 +105,11 @@ jobs: --host=x86_64-linux-gnu \ --target=x86_64-linux-gnu - - name: Make docs + - name: Make docs (pre-build) if: success() run: | cd ../build - echo "make dvi" && time make dvi + echo "make dvi-fixincludes" && time make dvi-fixincludes echo "make pdf" && time make pdf echo "make html" && time make html @@ -125,6 +125,7 @@ jobs: run: | cd ../build echo "make info" && time make info + echo "make dvi" && time make dvi - name: Debug failure if: failure() From f59981d56406c2284e42ca5f33c0f971f10f8e9b Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 14:50:48 -0400 Subject: [PATCH 09/23] Update linux.yaml docbuilding is annoying --- .github/workflows/linux.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 7c0e09cd2d8cc..abc707f07c209 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -109,9 +109,8 @@ jobs: if: success() run: | cd ../build - echo "make dvi-fixincludes" && time make dvi-fixincludes - echo "make pdf" && time make pdf - echo "make html" && time make html + echo "make pdf" && (time make pdf-fixincludes) && echo "pdfs done" + echo "make html" && (time make html) && echo "html done" - name: Make if: success() @@ -124,8 +123,8 @@ jobs: if: success() run: | cd ../build - echo "make info" && time make info - echo "make dvi" && time make dvi + echo "make info" && (time make info) && echo "info done" + echo "make dvi" && (time make dvi) && echo "dvi done" - name: Debug failure if: failure() From 2fdfa60cfb8bc97f4eabd415dccd67f3946ea49e Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 15:34:52 -0400 Subject: [PATCH 10/23] Update linux.yaml more reordering --- .github/workflows/linux.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index abc707f07c209..3d58919e58f2d 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -36,7 +36,7 @@ jobs: - 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-devtools texlive + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-devtools texlive findutils - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -109,8 +109,7 @@ jobs: if: success() run: | cd ../build - echo "make pdf" && (time make pdf-fixincludes) && echo "pdfs done" - echo "make html" && (time make html) && echo "html done" + echo "make html" && (time make html-fixincludes) && echo "html done" - name: Make if: success() @@ -123,8 +122,9 @@ jobs: if: success() run: | cd ../build - echo "make info" && (time make info) && echo "info done" - echo "make dvi" && (time make dvi) && echo "dvi done" + 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) && echo "pdfs done" - name: Debug failure if: failure() From 122eaa04f051d841767e95fe743d0361c5fae122 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 16:04:07 -0400 Subject: [PATCH 11/23] Update linux.yaml latest error was: "/usr/bin/x86_64-linux-gnu-ld: cannot find crti.o: No such file or directory" --- .github/workflows/linux.yaml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 3d58919e58f2d..7b9d9741782d1 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -36,7 +36,7 @@ jobs: - 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-devtools texlive findutils + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-dev libc-devtools texlive findutils - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -93,10 +93,8 @@ jobs: --disable-vtable-verify \ --with-system-zlib \ --with-target-system-zlib=auto \ - --disable-multiarch \ --disable-bootstrap \ --disable-werror \ - --disable-multilib \ --with-tune=generic \ --without-cuda-driver \ --enable-checking=release \ @@ -105,12 +103,6 @@ jobs: --host=x86_64-linux-gnu \ --target=x86_64-linux-gnu - - name: Make docs (pre-build) - if: success() - run: | - cd ../build - echo "make html" && (time make html-fixincludes) && echo "html done" - - name: Make if: success() run: | @@ -118,18 +110,25 @@ jobs: 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) + - 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; \ + else \ + sudo apt install remake; \ + cd ../build; \ + remake -dpPw --trace=full; \ + 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) && echo "pdfs done" - - - 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; fi + 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() From 59eb82bfdc1ce4a1e8c5f576e4cbd0b7878f5dfc Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 22:21:59 -0400 Subject: [PATCH 12/23] Update linux.yaml last build timed out; let's see if we can fix that... --- .github/workflows/linux.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 7b9d9741782d1..1ab67a82b5750 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -21,6 +21,7 @@ jobs: build: name: ${{ matrix.name }}-build runs-on: ubuntu-latest + timeout-minutes: 720 strategy: matrix: include: @@ -36,7 +37,7 @@ jobs: - 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 + sudo apt install -y gcc-multilib build-essential flex zlib1g-dev gnat gdc expect dejagnu libc-dev libc-devtools texlive findutils binutils autogen gettext - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -109,6 +110,7 @@ jobs: 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() @@ -148,6 +150,6 @@ jobs: 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 check + 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 mail-report-with-warnings.log; then ./mail-report-with-warnings.log; elif test -x mail-report.log; then ./mail-report.log; fi From 264c728257134155cee20c02d501f2af06a742bb Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Sun, 15 Oct 2023 23:56:47 -0400 Subject: [PATCH 13/23] Update linux.yaml add mailutils dependency to see if that will let the mailing of the testresults work properly --- .github/workflows/linux.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 1ab67a82b5750..d91eeed0ad6fb 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 + 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 - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -83,7 +83,7 @@ jobs: if test ! -d build; then mkdir build; fi cd build ../gcc/configure \ - --enable-languages=c,c++,objc,obj-c++ \ + --enable-languages=c,c++,lto,objc,obj-c++ \ --prefix=/usr \ --with-gcc-major-version-only \ --program-prefix=x86_64-linux-gnu- \ From b7c6ea0a3a146972f61c659a41116bdc04cc6a07 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 01:29:11 -0400 Subject: [PATCH 14/23] Update linux.yaml `Mail` might be missing... --- .github/workflows/linux.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index d91eeed0ad6fb..5e74a1419dfd7 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 + 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 postfix emacs - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') @@ -152,4 +152,16 @@ jobs: 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 mail-report-with-warnings.log; then ./mail-report-with-warnings.log; elif test -x mail-report.log; then ./mail-report.log; fi + if test -x "$(which Mail)"; then \ + if test -x mail-report-with-warnings.log; then \ + ./mail-report-with-warnings.log; \ + elif test -x mail-report.log; then \ + ./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 From 646365856cdfc289a34f654b0faa70b9fd8e4495 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 04:26:01 -0400 Subject: [PATCH 15/23] Update linux.yaml 2 more mailer suggestions from @ArsenArsen --- .github/workflows/linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 5e74a1419dfd7..3188f8f511844 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 postfix emacs + 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 postfix emacs exim msmtp - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') From 9f403936655a1e040cb2d98a7ac4fd0fb1267485 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 04:30:23 -0400 Subject: [PATCH 16/23] Update linux.yaml ok so I guess it isn't called just "exim" exactly --- .github/workflows/linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 3188f8f511844..161d31b67d76d 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 postfix emacs exim msmtp + 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 postfix emacs exim4-base msmtp - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') From 9fcfd81b59ac3a20d255fced479623007a5fdb55 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 04:49:43 -0400 Subject: [PATCH 17/23] Update linux.yaml exim4-base says that postfix conflicts with it --- .github/workflows/linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 161d31b67d76d..6c6737e7a4beb 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 postfix emacs exim4-base msmtp + 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 - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') From c2cd05dadac56eb3153a6e4d0cea40a2dd06b5da Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 17:02:46 -0400 Subject: [PATCH 18/23] Update linux.yaml 2 more mail dependencies --- .github/workflows/linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 6c6737e7a4beb..ad7247acb8f90 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 + 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 msmtp-mta mailx - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') From 9392ef843bf8a29371b5c397513adad1da34ad73 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 17:15:56 -0400 Subject: [PATCH 19/23] Update linux.yaml tweak mailx dependency --- .github/workflows/linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index ad7247acb8f90..b3dc7fa534b6e 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 msmtp-mta mailx + 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 msmtp-mta bsd-mailx - name: Install dependencies for aarch64 if: success() && contains(matrix.target, 'aarch64') From dbc232e9b38e4cbde18e515c269178e1d3ce07d5 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 17:25:53 -0400 Subject: [PATCH 20/23] Update linux.yaml remove msmtp-mta (conflicts with exim4-config) --- .github/workflows/linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index b3dc7fa534b6e..d1b0fbfa4369f 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -37,7 +37,7 @@ jobs: - 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 msmtp-mta bsd-mailx + 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') From ea929b66a84e26cf9d5a4ab256d780cf17c57591 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 18:49:44 -0400 Subject: [PATCH 21/23] Update linux.yaml try seeing if there are more ways to upload logfiles --- .github/workflows/linux.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index d1b0fbfa4369f..ead4304f5112f 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -117,10 +117,14 @@ jobs: 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; \ - else \ + 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) @@ -154,9 +158,13 @@ jobs: 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 \ @@ -165,3 +173,13 @@ jobs: else \ echo "Warning: \"Mail\" program is missing, so skipping emailing of testresults!"; \ fi + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.1.3 + with: + # Artifact name + name: logfiles + # A file, directory or wildcard pattern that describes what to upload + path: | + ./*.log + ../build/*.log From d38fe5f4c4cf4182db51e840c0cd86e217eced1f Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Mon, 16 Oct 2023 20:17:31 -0400 Subject: [PATCH 22/23] Update linux.yaml "upload-artifact" doesn't allow relative paths, apparently --- .github/workflows/linux.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index ead4304f5112f..37af03f157f73 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -181,5 +181,7 @@ jobs: name: logfiles # A file, directory or wildcard pattern that describes what to upload path: | - ./*.log - ../build/*.log + *.log + build/*.log + path/*.log + testsuite/*.log From 59d859a85e3d9573085ac9390d4e6464fa4bae69 Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Sat, 8 Jul 2023 00:57:05 +0300 Subject: [PATCH 23/23] Add linux ci --- .github/workflows/linux.yaml | 113 +++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 .github/workflows/linux.yaml diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml new file mode 100644 index 0000000000000..f90ea0bd3115a --- /dev/null +++ b/.github/workflows/linux.yaml @@ -0,0 +1,113 @@ +name: Linux +on: + push: + branches: + - master + - releases/gcc-* + tags: + - releases/gcc-* + pull_request: + branches: + - master + - 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 + 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 + + - 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: Download prerequisites + if: success() + run: | + ./contrib/download_prerequisites + + - name: Configure x86_64 + if: success() && matrix.target == 'x86_64' + run: | + unset ADA_INCLUDE_PATH + unset ADA_OBJECT_PATH + cd ../ + mkdir build + cd build + ../gcc/configure \ + --enable-languages=c,c++,go,d,fortran,objc,obj-c++,m2 \ + --prefix=/usr \ + --with-gcc-major-version-only \ + --program-prefix=x86_64-linux-gnu- \ + --enable-shared \ + --enable-linker-build-id \ + --libexecdir=/usr/lib \ + --without-included-gettext \ + --enable-threads=posix \ + --libdir=/usr/lib \ + --enable-nls \ + --enable-clocale=gnu \ + --enable-libstdcxx-debug \ + --enable-libstdcxx-time=yes \ + --with-default-libstdcxx-abi=new \ + --enable-gnu-unique-object \ + --disable-vtable-verify \ + --enable-plugin \ + --enable-default-pie \ + --with-system-zlib \ + --with-target-system-zlib=auto \ + --enable-objc-gc=auto \ + --enable-multiarch \ + --disable-werror \ + --with-arch-32=i686 \ + --with-abi=m64 \ + --with-multilib-list=m32,m64,mx32 \ + --enable-multilib \ + --with-tune=generic \ + --without-cuda-driver \ + --enable-checking=release \ + --build=x86_64-linux-gnu \ + --host=x86_64-linux-gnu \ + --target=x86_64-linux-gnu + + - name: Make bootstrap + if: success() + run: | + cd ../build + make bootstrap -j$(nproc) + + - name: Make install + if: success() + run: | + cd ../build + sudo make install + + - name: Tests + if: success() + run: | + /usr/bin/x86_64-linux-gnu-gcc --version + /usr/bin/x86_64-linux-gnu-gcc -v + cd ../build + make -k check