Skip to content

Commit 4554989

Browse files
authored
Add intel compiler to CI (#722)
* Update docs * Add intel compiler to CI * Add folder to boost root * Use CMAKE
1 parent 3db0475 commit 4554989

File tree

3 files changed

+72
-4
lines changed

3 files changed

+72
-4
lines changed

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,3 +730,69 @@ jobs:
730730

731731
- name: Run tests
732732
run: ci/build.sh
733+
734+
intel:
735+
runs-on: ubuntu-latest
736+
strategy:
737+
fail-fast: false
738+
matrix:
739+
compiler: [ intel ]
740+
standard: [ c++20 ]
741+
steps:
742+
- uses: actions/checkout@v4
743+
with:
744+
fetch-depth: '0'
745+
746+
- name: Intel Apt repository
747+
timeout-minutes: 1
748+
run: |
749+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
750+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
751+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
752+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
753+
sudo apt-get update
754+
- name: Install Intel oneAPI compilers
755+
timeout-minutes: 5
756+
run: sudo apt-get install -y intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp
757+
758+
- name: Setup Intel oneAPI environment
759+
run: |
760+
source /opt/intel/oneapi/setvars.sh
761+
printenv >> $GITHUB_ENV
762+
763+
- name: Setup Boost
764+
run: |
765+
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
766+
LIBRARY=${GITHUB_REPOSITORY#*/}
767+
echo LIBRARY: $LIBRARY
768+
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
769+
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
770+
echo GITHUB_REF: $GITHUB_REF
771+
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
772+
REF=${REF#refs/heads/}
773+
echo REF: $REF
774+
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
775+
echo BOOST_BRANCH: $BOOST_BRANCH
776+
cd ..
777+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
778+
cd boost-root
779+
mkdir -p libs/$LIBRARY
780+
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
781+
git submodule update --init tools/boostdep
782+
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
783+
784+
- name: Configure
785+
run: |
786+
cd ../boost-root
787+
mkdir __build__ && cd __build__
788+
cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ..
789+
790+
- name: Build tests
791+
run: |
792+
cd ../boost-root/__build__
793+
cmake --build . --target tests
794+
795+
- name: Run tests
796+
run: |
797+
cd ../boost-root/__build__
798+
ctest --output-on-failure --no-tests=error

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ conan create decimal/conan --build missing
5151

5252
# Supported Platforms
5353

54-
Boost.Decimal is tested on Ubuntu (x86_64, s390x, and aarch64),
55-
macOS (x86_64, and Apple Silicon), and Windows (x86_64)
56-
with the following compilers:
54+
Boost.Decimal is tested natively on Ubuntu (x86_64, s390x, and aarch64), macOS (x86_64, and Apple Silicon), and Windows (x32 and x64);
55+
as well as emulated PPC64LE and STM32 using QEMU with the following compilers:
5756

5857
* GCC 7 and later
5958
* Clang 6 and later
6059
* Visual Studio 2017 and later
60+
* Intel OneAPI DPC++
6161

6262
# Synopsis
6363

doc/decimal/overview.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ For example, while a fixed-point representation that allocates 8 decimal digits
3030

3131
== Supported Compilers
3232

33-
Boost.Decimal is tested on Ubuntu (x86_64, s390x, and aarch64), macOS (x86_64, and Apple Silicon), and Windows with the following compilers:
33+
Boost.Decimal is tested natively on Ubuntu (x86_64, s390x, and aarch64), macOS (x86_64, and Apple Silicon), and Windows (x32 and x64);
34+
as well as emulated PPC64LE and STM32 using QEMU with the following compilers:
3435

3536
* GCC 7 and later
3637
* Clang 6 and later
3738
* Visual Studio 2017 and later
39+
* Intel OneAPI DPC++
3840

3941
Tested on https://github.com/cppalliance/decimal/actions[Github Actions] and https://drone.cpp.al/cppalliance/decimal[Drone].
4042
Coverage can be found on https://app.codecov.io/gh/cppalliance/decimal[Codecov].

0 commit comments

Comments
 (0)