-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to test latest GNU GCC toolchain compilation for the int…
…rinsics
- Loading branch information
Showing
4 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: GNU GCC intrinsic test cases compilation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 18 * * 0-6" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Prerequisites | ||
run: | ||
sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip | ||
libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf | ||
libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev | ||
dejagnu expect tcl | ||
- name: Download GCC | ||
run: | | ||
cd .. && rm -rf riscv-gnu-toolchain | ||
git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain.git | ||
echo $(pwd) | ||
cd $(pwd)/riscv-gnu-toolchain/gcc | ||
git remote update | ||
git reset --hard origin/master | ||
cd ../binutils | ||
git remote update | ||
git reset --hard origin/master | ||
- name: Run auto generated test cases | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
make -C rvv-intrinsic-generator report-gnu GNU_TOOLCHAIN_DIR=$(pwd)/../riscv-gnu-toolchain | ||
- name: Check gcc result | ||
run: | | ||
tail -n 17 $(pwd)/../riscv-gnu-toolchain/build-gcc-newlib-stage2/gcc/testsuite/gcc/gcc.log | ||
- name: Check g++ result | ||
run: | | ||
tail -n 27 $(pwd)/../riscv-gnu-toolchain/build-gcc-newlib-stage2/gcc/testsuite/g++/g++.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright (C) 2022-2023 Free Software Foundation, Inc. | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with GCC; see the file COPYING3. If not see | ||
# <http://www.gnu.org/licenses/>. | ||
|
||
# GCC testsuite that uses the `dg.exp' driver. | ||
|
||
# Exit immediately if this isn't a RISC-V target. | ||
if ![istarget riscv*-*-*] then { | ||
return | ||
} | ||
|
||
# Load support procs. | ||
load_lib g++-dg.exp | ||
|
||
# If a testcase doesn't have special options, use these. | ||
global DEFAULT_CFLAGS | ||
if ![info exists DEFAULT_CFLAGS] then { | ||
set DEFAULT_CFLAGS " -ansi -pedantic-errors" | ||
} | ||
|
||
set gcc_march "rv64gcv_zvfh" | ||
set gcc_mabi "lp64d" | ||
|
||
# Initialize `dg'. | ||
dg-init | ||
|
||
# Main loop. | ||
set CFLAGS "$DEFAULT_CFLAGS -march=$gcc_march -mabi=$gcc_mabi -O3" | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/policy_funcs/gnu-api-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/policy_funcs/gnu-overloaded-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/gnu-api-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/gnu-overloaded-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
|
||
# All done. | ||
dg-finish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright (C) 2022-2023 Free Software Foundation, Inc. | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with GCC; see the file COPYING3. If not see | ||
# <http://www.gnu.org/licenses/>. | ||
|
||
# GCC testsuite that uses the `dg.exp' driver. | ||
|
||
# Exit immediately if this isn't a RISC-V target. | ||
if ![istarget riscv*-*-*] then { | ||
return | ||
} | ||
|
||
# Load support procs. | ||
load_lib gcc-dg.exp | ||
|
||
# If a testcase doesn't have special options, use these. | ||
global DEFAULT_CFLAGS | ||
if ![info exists DEFAULT_CFLAGS] then { | ||
set DEFAULT_CFLAGS " -ansi -pedantic-errors" | ||
} | ||
|
||
set gcc_march "rv64gcv_zvfh" | ||
set gcc_mabi "lp64d" | ||
|
||
# Initialize `dg'. | ||
dg-init | ||
|
||
# Main loop. | ||
set CFLAGS "$DEFAULT_CFLAGS -march=$gcc_march -mabi=$gcc_mabi -O3" | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/policy_funcs/gnu-api-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/policy_funcs/gnu-overloaded-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/gnu-api-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/gnu-overloaded-tests/*.\[cS\]]] \ | ||
"" $CFLAGS | ||
|
||
# All done. | ||
dg-finish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters