Skip to content

Commit

Permalink
[workflows] Set up GitHub actions for Classic Flang
Browse files Browse the repository at this point in the history
This commit squashes the following CI-related patches from the release_14x
branch.

  commit 54a96d0
  Author: Kiran Chandramohan <kiran.chandramohan@arm.com
  Date:   Wed Oct 28 17:08:22 2020 +0000

      [workflows] Removing a few CI pipelines

  commit 8bf9551
  Author: Bryan Chan <bryan.chan@huawei.com>
  Date:   Mon May 2 21:16:56 2022 -0400

      [workflows] Stop using upstream actions and enable OpenMP build

  commit b921dd2
  Author: michalpasztamobica <michal.paszta@mobica.com>
  Date:   Fri Jun 4 13:55:52 2021 +0200

      [workflows] Allow pre-compile jobs to be trigerred manually.

  commit 9f828fd
  Author: michalpasztamobica <michal.paszta@mobica.com>
  Date:   Fri Jun 4 22:09:44 2021 +0200

      [workflows] Add build scripts and make CI use them.

  commit a976b96
  Author: Abraham Tovar <abraham.tovar@mobica.com>
  Date:   Wed Oct 13 11:40:30 2021 +0200

      [workflows] LLVM release_13x CI changes

  commit 7a5ee22
  Author: Abraham Tovar <abraham.tovar@mobica.com>
  Date:   Wed Nov 17 10:14:21 2021 +0000

      [workflows] Removing CI test-base for release_100

  commit a39a0c6
  Author: pwisniewskimobica <przemyslaw.wisniewski@mobica.com>
  Date:   Thu Jan 27 15:06:19 2022 +0100

      [workflows] Use GCC 11 in CI builds

  commit 198a6b2
  Author: pwisniewskimobica <przemyslaw.wisniewski@mobica.com>
  Date:   Thu Jan 13 10:11:43 2022 +0100

      [workflows] Modify CI scripts to add more test variants

  commit 84ed34d
  Author: Bryan Chan <bryan.chan@huawei.com>
  Date:   Sun Apr 24 19:13:25 2022 -0400

      [workflows] support GitHub actions for release_14x branch

  commit dd852a6
  Author: Bryan Chan <bryanpkc@gmail.com>
  Date:   Fri Jul 15 21:50:21 2022 -0400

      [workflows] Fix CI for release_14x

  commit b52bcc0
  Author: Bryan Chan <bryanpkc@gmail.com>
  Date:   Wed Jul 27 22:28:43 2022 -0400

      [build] Stop caching AArch64 Docker image layers
  • Loading branch information
kiranchandramohan authored and bryanpkc committed Oct 18, 2023
1 parent 0b2c1b5 commit 2249939
Show file tree
Hide file tree
Showing 15 changed files with 291 additions and 519 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/clang-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ concurrency:

jobs:
check_clang:
if: github.repository_owner == 'llvm'
name: Test clang,lldb,libclc
if: github.repository_owner == 'flang-compiler'
name: Test clang
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: check-clang
projects: clang;lldb;libclc
projects: clang;openmp
80 changes: 80 additions & 0 deletions .github/workflows/flang-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build and test Flang

on:
pull_request:
branches: [ release_11x, release_12x, release_13x, release_14x ]

jobs:
build:
runs-on: ubuntu-20.04
env:
install_prefix: /usr/local
strategy:
matrix:
target: [X86]
cc: [clang]
cpp: [clang++]
version: [10, 11]
include:
- target: X86
cc: gcc
cpp: g++
version: 10

steps:
- uses: actions/checkout@v2

- if: matrix.cc == 'clang'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo touch /etc/apt/sources.list.d/llvm.list
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee -a /etc/apt/sources.list.d/llvm.list
echo 'deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt update
sudo apt install -f -y llvm-${{ matrix.version }} clang-${{ matrix.version}}
- if: matrix.cc == 'gcc' && matrix.version == '10'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 20
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: key-${{ matrix.cc }}-${{ matrix.version }}

- name: Check tools
run: |
git --version
cmake --version
make --version
${{ matrix.cc }}-${{ matrix.version }} --version
${{ matrix.cpp }}-${{ matrix.version }} --version
- name: Build and install llvm
run: ./build-llvm-project.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -a /usr/bin/${{ matrix.cc }}-${{ matrix.version }} -b /usr/bin/${{ matrix.cpp }}-${{ matrix.version }} -n $(nproc) -c -i -s -v

- name: Checkout flang
run: |
cd ../..
git clone --depth 1 --single-branch --branch master https://github.com/flang-compiler/flang.git
- name: Build and install libpgmath & flang
run: |
cd ../../flang
./build-flang.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -n $(nproc) -c -s
- name: Copy llvm-lit
run: |
cd ../../flang
cp ../classic-flang-llvm-project/classic-flang-llvm-project/build/bin/llvm-lit build/bin/.
- name: Test flang
run: |
cd ../../flang/build
make check-all
168 changes: 0 additions & 168 deletions .github/workflows/libclang-abi-tests.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/libclc-tests.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/lld-tests.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/lldb-tests.yml

This file was deleted.

Loading

0 comments on commit 2249939

Please sign in to comment.