pp_add: fix UB in a right shift #4
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
name: testsuite | |
on: | |
push: | |
branches: | |
- "**" | |
tags-ignore: | |
- "*" | |
pull_request: | |
jobs: | |
# ___ _ ___ __ _ _ | |
# / __|_ __ ___| |_____ |_ _|_ _ / _|___ _ _ _ __ __ _| |_(_)___ _ _ ___ | |
# \__ \ ' \/ _ \ / / -_) | || ' \| _/ _ \ '_| ' \/ _` | _| / _ \ ' \(_-< | |
# |___/_|_|_\___/_\_\___| |___|_||_|_| \___/_| |_|_|_\__,_|\__|_\___/_||_/__/ | |
authors: | |
runs-on: ubuntu-latest | |
if: ( github.event.pull_request.head.repo.full_name == 'Perl/perl5' || github.repository == 'Perl/perl5' ) && github.base_ref != '' | |
continue-on-error: true | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1000 | |
- name: git setup | |
run: | | |
echo "Pull request authors" | |
echo "# git merge-base origin/${BASE_REF} HEAD" | |
git config diff.renameLimit 999999 | |
git fetch --depth=1000 origin ${BASE_REF} | |
env: | |
BASE_REF: ${{ github.base_ref }} | |
- name: Involved authors | |
run: | | |
git log --pretty=format:"Author: %an <%ae>" origin/${BASE_REF}...${SHA}^2 | sort -u | |
env: | |
BASE_REF: ${{ github.base_ref }} | |
SHA: ${{ github.sha }} | |
# ___ _ _ ___ _ _ | |
# / __| __ _ _ _ (_) |_ _ _ / __| |_ ___ __| |__ | |
# \__ \/ _` | ' \| | _| || | | (__| ' \/ -_) _| / / | |
# |___/\__,_|_||_|_|\__|\_, | \___|_||_\___\__|_\_\ | |
# |__/ | |
# ascii art small font from https://ascii.co.uk/text | |
sanity_check: | |
name: "Sanity: Linux -Dusethreads" | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
WORKSPACE: ${{ github.workspace }} | |
outputs: | |
run_all_jobs: ${{ steps.check_extended_testing.outputs.run_all_jobs }} | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: git cfg + fetch tags | |
run: | | |
git config diff.renameLimit 999999 | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Configure | |
run: | | |
./Configure -des -Dusedevel ${CONFIGURE_ARGS} -Dprefix="$HOME/perl-blead" -DDEBUGGING | |
env: | |
CONFIGURE_ARGS: "-Dusethreads" | |
- name: Build | |
run: | | |
make -j2 | |
- name: Run Tests | |
run: | | |
TEST_JOBS=2 make -j2 test | |
# Set a variable for dependent jobs to signal if full testsuite is enabled | |
- name: "Check if EXTENDED_TESTING is set" | |
id: check_extended_testing | |
env: | |
EXTENDED_TESTING: ${{ secrets.EXTENDED_TESTING }} | |
CURRENT_REPOSITORY: ${{ github.repository }} | |
run: | | |
if [[ -z "${EXTENDED_TESTING}" && "${CURRENT_REPOSITORY}" != 'Perl/perl5' ]]; then | |
echo "Skipping extended test jobs." | |
echo "::set-output name=run_all_jobs::false" | |
else | |
echo "Running all test jobs" | |
echo "::set-output name=run_all_jobs::true" | |
fi | |
# _ _ | |
# | (_)_ _ _ ___ __ | |
# | | | ' \ || \ \ / | |
# |_|_|_||_\_,_/_\_\ | |
linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
needs: sanity_check | |
if: needs.sanity_check.outputs.run_all_jobs == 'true' | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
WORKSPACE: ${{ github.workspace }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# exercise a variety of build options | |
# threads often cause build issues | |
CONFIGURE_ARGS: | |
- "-Uusethreads" | |
#- "-Dusethreads" # already tested above by sanity_check | |
- "-Duseshrplib -Dusesitecustomize -Duselongdouble PERL_UNICODE='' LANG='en_US.UTF-8'" | |
- "-Duseshrplib -Dusequadmath -Dusecbacktrace -Dusethreads PERL_UNICODE='' LANG='de_DE.UTF-8'" | |
- "-Duserelocatableinc" | |
- "-Dcc='clang'" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: git cfg + fetch tags | |
run: | | |
git config diff.renameLimit 999999 | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Configure | |
run: | | |
./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead" -DDEBUGGING | |
- name: Build | |
run: | | |
make -j2 | |
- name: Run Tests | |
run: | | |
TEST_JOBS=2 make -j2 test | |
#=============================================== | |
linux-i386: | |
name: "linux i386/ubuntu" | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
needs: sanity_check | |
if: needs.sanity_check.outputs.run_all_jobs == 'true' | |
# https://hub.docker.com/r/i386/ubuntu/ | |
container: | |
image: i386/ubuntu:latest | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
WORKSPACE: ${{ github.workspace }} | |
strategy: | |
fail-fast: false | |
matrix: | |
CONFIGURE_ARGS: | |
- "-Dusedevel" | |
steps: | |
- name: Install System dependencies | |
run: | | |
apt-get update ||: | |
apt-get -y install build-essential git-core | |
# actions/checkout@v2 doesn't work in a container, so we use v1. | |
- uses: actions/checkout@v1 | |
- name: fix git remote credential | |
run: git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY" | |
- name: git cfg + fetch tags | |
run: | | |
git config diff.renameLimit 999999 | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Configure | |
run: | | |
./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead" -DDEBUGGING | |
- name: Build | |
run: | | |
make -j2 | |
- name: Run Tests | |
run: | | |
TEST_JOBS=2 make -j2 test | |
# ___ ___ | |
# _ __ __ _ __ / _ \/ __| | |
# | ' \/ _` / _| (_) \__ \ | |
# |_|_|_\__,_\__|\___/|___/ | |
smoke-macos-catalina-xcode12: | |
name: "macOS (catalina) xcode 12" | |
runs-on: macos-10.15 | |
timeout-minutes: 120 | |
needs: sanity_check | |
if: needs.sanity_check.outputs.run_all_jobs == 'true' | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 10 | |
- name: Configure | |
run: | | |
export SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk | |
sh ./Configure -des -Dusedevel | |
- name: Build | |
run: | | |
make -j2 | |
- name: Run Tests | |
run: | | |
make -j2 test | |
# _ _ | |
# __ __ _(_)_ _ __| |_____ __ _____ | |
# \ V V / | ' \/ _` / _ \ V V (_-< | |
# \_/\_/|_|_||_\__,_\___/\_/\_//__/ | |
windows-msvc142: | |
name: "Windows msvc142" | |
runs-on: windows-latest | |
timeout-minutes: 120 | |
needs: sanity_check | |
if: needs.sanity_check.outputs.run_all_jobs == 'true' | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
steps: | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 10 | |
#- name: Install clcache | |
# shell: cmd | |
# run: | | |
# curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache.4.2.0.nupkg --output clcache.4.2.0.nupkg | |
# choco install clcache --source=. | |
#- name: find home directory | |
# shell: cmd | |
# run: | | |
# set | |
#- name: C compiler cache | |
# id: clcache | |
# uses: actions/cache@v1 | |
# with: | |
# path: $HOME\clcache | |
# key: ${{ runner.os }}-x64 | |
#- name: Set up Perl build environment | |
# # pushd "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" | |
# # for /f "delims=" %%x in ('.\vswhere.exe -latest -property InstallationPath') do set VSPATH=%%x | |
# # popd | |
# # call "%VSPATH%\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
# #run: | | |
- name: Build | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
cd win32 | |
nmake CCTYPE=MSVC142 | |
- name: Run Tests | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
cd win32 | |
nmake CCTYPE=MSVC142 test | |
#=============================================== | |
windows-msvc100: | |
name: "Windows msvc100" | |
runs-on: windows-latest | |
timeout-minutes: 120 | |
needs: sanity_check | |
if: needs.sanity_check.outputs.run_all_jobs == 'true' | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
steps: | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 10 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
${{ github.workspace }}\choco-cache | |
key: v2-msvc100 | |
- name: Set up MSVC100 | |
run: | | |
choco config set cacheLocation "${{ github.workspace }}\choco-cache" | |
choco install vcexpress2010 | |
- name: Help | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" /help | |
- name: Build | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 | |
cd win32 | |
nmake CCTYPE=MSVC100 WIN64=undef | |
- name: Run Tests | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 | |
cd win32 | |
nmake CCTYPE=MSVC100 WIN64=undef test | |
#=============================================== | |
mingw64: | |
name: "Windows mingw64" | |
runs-on: windows-latest | |
timeout-minutes: 120 | |
needs: sanity_check | |
if: needs.sanity_check.outputs.run_all_jobs == 'true' | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
steps: | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 10 | |
- name: Set up Perl build environment | |
run: | | |
# skip installing perl if it is already installed. | |
if (!(Test-Path "C:\strawberry\perl\bin")) { | |
choco install strawberryperl | |
} | |
echo @" | |
C:\strawberry\c\bin | |
C:\strawberry\perl\site\bin | |
C:\strawberry\perl\bin | |
"@ | | |
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Host perl -V | |
run: perl -V | |
- name: gcc --version | |
run: gcc --version | |
- name: Build | |
shell: cmd | |
run: | | |
cd win32 | |
gmake CCHOME=C:\strawberry\c -f GNUMakefile -j2 | |
- name: Run Tests | |
shell: cmd | |
run: | | |
cd win32 | |
set HARNESS_OPTIONS=j2 | |
gmake CCHOME=C:\strawberry\c -f GNUMakefile test | |
#=============================================== | |
cygwin: | |
name: "cygwin" | |
runs-on: windows-latest | |
timeout-minutes: 120 | |
needs: sanity_check | |
if: needs.sanity_check.outputs.run_all_jobs == 'true' | |
env: | |
PERL_SKIP_TTY_TEST: 1 | |
CONTINUOUS_INTEGRATION: 1 | |
steps: | |
# we use Cygwin git, so no need to configure git here. | |
- name: Set up Cygwin | |
shell: cmd | |
run: | | |
choco install cygwin --params="/InstallDir:%GITHUB_WORKSPACE%\cygwin" | |
choco install cyg-get | |
cyg-get cygwin-devel gcc-core gcc gcc-g++ make cygwin64-w32api-headers binutils libtool git ccache | |
- name: Check out using Cygwin git, to ensure correct file permissions | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: cmd | |
run: | | |
path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin | |
sh -c "git config --global core.autocrlf false" | |
sh -c "mkdir -p ~; cd ~; git clone -qn \"https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY\" work ; cd work ; if [ \"$GITHUB_EVENT_NAME\" = pull_request ] ; then git fetch origin \"$GITHUB_REF\" && git checkout FETCH_HEAD ; else git checkout \"$GITHUB_SHA\" ; fi" | |
- name: Configure | |
shell: cmd | |
run: | | |
path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin | |
sh -c "cd ~/work; ./Configure -des -Dusedevel -Doptimize=-g -DDEBUGGING" | |
- name: Build | |
shell: cmd | |
run: | | |
path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin | |
sh -c "cd ~/work; make -j2" | |
- name: Run Tests | |
shell: cmd | |
run: | | |
path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin | |
sh -c "cd ~/work; make -j2 test" |