public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tal Regev <tal.regev@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] ci: Add a linux CI
Date: Sun, 9 Jul 2023 20:12:34 +0300	[thread overview]
Message-ID: <CAEW4+Yw-8dQezs_T4GzGA=S8msM267rnwcrv0=4QSK6b-539JA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 500 bytes --]

Description: adding a ci in a github repo. Everytime a user will do a PR to
master branch or releases branches, it will activate the ci on their repo.
for example: https://github.com/talregev/gcc/pull/1. Can help users to
verify their own changes before submitting a patch.

ChangeLog: Add a linux CI

Bootstrapping and testing: I tested it on linux with
host: x86_64-linux-gnu
target: x86_64-linux-gnu
some tests are failing. You can see the results in my CI yourself.

Patch: attach to this email.

[-- Attachment #2: linux_ci.patch --]
[-- Type: application/octet-stream, Size: 3551 bytes --]

diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml
new file mode 100644
index 00000000000..f90ea0bd311
--- /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

             reply	other threads:[~2023-07-09 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09 17:12 Tal Regev [this message]
2023-07-12 12:42 ` Christophe Lyon
2023-07-12 17:52   ` Tal Regev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEW4+Yw-8dQezs_T4GzGA=S8msM267rnwcrv0=4QSK6b-539JA@mail.gmail.com' \
    --to=tal.regev@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).