Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 11, 2019
2 parents 967f01e + 346cbc2 commit 1ae88b5
Show file tree
Hide file tree
Showing 29 changed files with 1,318 additions and 204 deletions.
6 changes: 3 additions & 3 deletions .scripts/appveyor_script.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ IF DEFINED PIP (
cd python
%PIP% install -r requirements.txt
IF DEFINED LINT (
%RUN% -m pytest -v --mypy --mypy-ignore-missing-imports --flake8 --isort -k "not test_problem and not test_is_prime and not test_groupwise" || goto :error
%RUN% -m pytest -vl --mypy --mypy-ignore-missing-imports --flake8 --isort -k "not test_problem and not test_is_prime and not test_groupwise" || goto :error
) ELSE (
%RUN% -m pytest test_euler.py -v --benchmark-min-time=0.05 --benchmark-sort=fullname --benchmark-verbose || goto :error
%RUN% -m pytest test_euler.py -vl --benchmark-min-time=0.05 --benchmark-sort=fullname --benchmark-verbose || goto :error
)
) ELSE (
IF DEFINED NODE (
Expand All @@ -23,7 +23,7 @@ IF DEFINED PIP (
C:\Python36\python -m pip install -r requirements.txt
%WIN_SDK%
%VCVARS%
C:\Python36\python -m pytest test_euler.py -v --benchmark-min-time=0.05 --benchmark-group-by=fullfunc --benchmark-sort=fullname --benchmark-verbose || goto :error
C:\Python36\python -m pytest test_euler.py -vl --benchmark-min-time=0.05 --benchmark-group-by=fullfunc --benchmark-sort=fullname --benchmark-verbose || goto :error
)
)
goto :EOF
Expand Down
53 changes: 30 additions & 23 deletions .scripts/shippable_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,37 @@ elif [ $jsver ]; then
make jstest
fi
else
if [ $linter ]; then
sudo apt-get update
if [ $pcc ]; then
sudo apt-get install -y build-essential flex bison
mkdir pcc pcc-libs
wget -O - -o /dev/null http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-1.1.0.tgz | tar -xz --no-seek -C pcc --strip-components=1
wget -O - -o /dev/null http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-libs-1.1.0.tgz | tar -xz --no-seek -C pcc-libs --strip-components=1
cd pcc
sed -i 's/MANPAGE=@BINPREFIX@cpp/MANPAGE=@BINPREFIX@pcc-cpp/' cc/cpp/Makefile.in
./configure --prefix=/usr --libexecdir=/usr/lib/{x86_64,i386}-linux-gnu
sudo make && sudo make install
cd ../pcc-libs
./configure --prefix=/usr --libexecdir=/usr/lib/{x86_64,i386}-linux-gnu
sudo make && sudo make install
cd ..
elif [ $icc ]; then
mkdir iccdir
wget -O - -o /dev/null https://registrationcenter-download.intel.com/akdlm/irc_nas/15873/intel-sw-tools-installer.tar.gz | tar -xz --no-seek -C iccdir --strip-components=1
cd iccdir
sudo apt-get update
sudo apt-get install -y clang-tidy
cd c
clang-tidy --help
clang-tidy *.c
sudo apt-get install -y cpio
sed -i -e "s/ACCEPT_EULA=decline/ACCEPT_EULA=accept/g" silent.cfg
sed -i -e "s/ACTIVATION_TYPE=no_license/ACTIVATION_TYPE=serial_number/g" silent.cfg
echo "ACTIVATION_SERIAL_NUMBER=CKDX-WNDG7BK7" >> silent.cfg
echo "SELECTION_CONFIG_FILES_PATH=$PWD/packages.json" >> silent.cfg
echo '{"selections":[{"moduleId":"intel_cpp_compiler"},{"moduleId":"intel_threading_building_blocks","isDependencyTool":true}]}' > packages.json
sudo ./install.sh -s silent.cfg
PATH="/opt/intel/system_studio_2019/bin${PATH:+:${PATH}}"
export PATH
cd ..
else
sudo apt-get update
if [ $pcc ]; then
sudo apt-get install -y build-essential flex bison
mkdir pcc pcc-libs
wget -O - -o /dev/null http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-1.1.0.tgz | tar -xz --no-seek -C pcc --strip-components=1
wget -O - -o /dev/null http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-libs-1.1.0.tgz | tar -xz --no-seek -C pcc-libs --strip-components=1
cd pcc
sed -i 's/MANPAGE=@BINPREFIX@cpp/MANPAGE=@BINPREFIX@pcc-cpp/' cc/cpp/Makefile.in
./configure --prefix=/usr --libexecdir=/usr/lib/{x86_64,i386}-linux-gnu
sudo make && sudo make install
cd ../pcc-libs
./configure --prefix=/usr --libexecdir=/usr/lib/{x86_64,i386}-linux-gnu
sudo make && sudo make install
cd ..
else
sudo apt-get install -y $COMPILER_OVERRIDE python3-pip
fi
cd c && make test USER_FLAG=
sudo apt-get install -y $COMPILER_OVERRIDE python3-pip
fi
cd c && make test USER_FLAG=
fi
22 changes: 2 additions & 20 deletions .scripts/travis_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,8 @@ elif [ $jsver ]; then
make jstest;
fi
else
if [ $linter ]; then
brew install llvm;
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy";
make clint;
else
if [ $pcc ]; then
brew install flex bison
mkdir pcc pcc-libs
wget -O - -o /dev/null http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-1.1.0.tgz | tar -xz -C pcc --strip-components=1
wget -O - -o /dev/null http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-libs-1.1.0.tgz | tar -xz -C pcc-libs --strip-components=1
cd pcc
./configure
sudo make && sudo make install
cd ../pcc-libs
./configure
sudo make && sudo make install
cd ..
elif [ $GCC_OVERRIDE ]; then
if [ $GCC_OVERRIDE ]; then
brew install gcc;
fi
make ctest;
fi
make ctest;
fi
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ matrix:
node_js: "11"
os: osx
env: jsver=11 linter=true
- language: c
os: osx
env: linter=true
- language: node_js
node_js: "11"
os: osx
Expand All @@ -36,9 +33,6 @@ matrix:
os: osx
env: COMPILER_OVERRIDE=gcc GCC_OVERRIDE=gcc-9
osx_image: xcode10.1
- language: c
os: osx
env: COMPILER_OVERRIDE=pcc pcc=true
- language: generic
python: 3.6
os: osx
Expand All @@ -61,8 +55,12 @@ matrix:
python: pypy3
os: osx
env: pyver=pypy3 pydist=homebrew NO_SLOW=true
- language: generic
python: 3.7
os: osx
env: pyver=3.7 pydist=macpython ONLY_SLOW=true
allow_failures:
- env: COMPILER_OVERRIDE=pcc pcc=true
- env: ONLY_SLOW=true
- python: pypy3

script:
Expand Down
4 changes: 2 additions & 2 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ endif
endif

test_%: dependencies
$(PY) -m pytest -v -n$* test_euler.py
$(PY) -m pytest -vl -n$* test_euler.py

test: dependencies
$(PY) -m pytest -v --benchmark-sort=fullname --benchmark-group-by=fullfunc --benchmark-verbose test_euler.py
$(PY) -m pytest -vl --benchmark-sort=fullname --benchmark-group-by=fullfunc --benchmark-verbose test_euler.py

dependencies:
$(PIP) install -r requirements.txt $(USER_FLAG) $(PROXY_ARG)
Expand Down
16 changes: 10 additions & 6 deletions c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,23 @@ Note that there are optional test that leverage the Python infrastructure. If yo

If this variable is defined, it should contain a comma-separated list of the compilers you would like to test from the following list (case insensitive):

* aocc (not yet supported)
* cl
* aocc (AMD Optimized C Compiler)
* cl (Visual Studios compiler)
* clang
* gcc
* icc (not yet supported)
* pcc (partial support)
* tcc
* icc (Intel C Compiler)
* pcc (Portable C Compiler)
* tcc (Tiny C Compiler)

If this variable is not defined, compilers will be auto-detected using `which()`.

### AOCC_OVERRIDE

If this variable is defined, it should hold a string representing the AMD compiler binary you would like to use. One case you may want this in is to test both the AMD compiler and traditional clang by renaming the AMD compiler's executable.

### GCC_OVERRIDE

If this variable is defined, it should hold a string representing the `gcc` binary you would like to use. One case you may want this in is on OSX, where `gcc` is often remapped to `clang`.
If this variable is defined, it should hold a string representing the `gcc` binary you would like to use. One case you may want this in is on OSX or Termux, where `gcc` is often remapped to `clang`.

### NO_OPTIONAL_TESTS

Expand Down
14 changes: 14 additions & 0 deletions c/assertions/x64_assert.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "../include/macros.h"
// this file should trigger compilation errors on non-x86 targets

int main(int argc, char const *argv[]) {
#if CL_COMPILER
__asm {
aaa;
}
#else
__asm__ (
"aaa;"
);
#endif
}
Loading

0 comments on commit 1ae88b5

Please sign in to comment.