Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .appveyor.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .azure-pipelines/azure-pipelines-linux-clang.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .azure-pipelines/azure-pipelines-linux-gcc.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .azure-pipelines/azure-pipelines-osx.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .azure-pipelines/unix-build.yml

This file was deleted.

70 changes: 35 additions & 35 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,55 @@ defaults:
shell: bash -e -l {0}
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}
strategy:
fail-fast: false
matrix:
sys:
- {compiler: gcc, version: '8'}
- {compiler: gcc, version: '9'}
- {compiler: gcc, version: '10'}
- {compiler: gcc, version: '11'}
- {compiler: clang, version: '15'}
- {compiler: clang, version: '16'}
- {compiler: gcc, version: '12'}
- {compiler: gcc, version: '13'}
- {compiler: gcc, version: '14'}
#- {compiler: clang, version: '19'}
- {compiler: clang, version: '20'}

steps:

- name: Setup GCC
if: ${{ matrix.sys.compiler == 'gcc' }}
run: |
GCC_VERSION=${{ matrix.sys.version }}
sudo apt-get update
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
CC=gcc-$GCC_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: Install GCC
if: matrix.sys.compiler == 'gcc'
uses: egor-tensin/setup-gcc@v1
with:
version: ${{matrix.sys.version}}
platform: x64

- name: Setup clang
if: ${{ matrix.sys.compiler == 'clang' }}
- name: Install LLVM and Clang
if: matrix.sys.compiler == 'clang'
run: |
LLVM_VERSION=${{ matrix.sys.version }}
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
if [[ $LLVM_VERSION -ge 13 ]]; then
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_VERSION main" || exit 1
else
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" || exit 1
fi || exit 1
sudo apt-get update || exit 1
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
sudo apt-get --no-install-suggests --no-install-recommends install g++-9 g++-9-multilib || exit 1
sudo ln -s /usr/include/asm-generic /usr/include/asm
CC=clang-$LLVM_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=clang++-$LLVM_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.sys.version}}
sudo apt-get install -y clang-tools-${{matrix.sys.version}}
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{matrix.sys.version}} 200
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{matrix.sys.version}} 200
sudo update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}} 200
sudo update-alternatives --set clang /usr/bin/clang-${{matrix.sys.version}}
sudo update-alternatives --set clang++ /usr/bin/clang++-${{matrix.sys.version}}
sudo update-alternatives --set clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}}

- name: Checkout code
uses: actions/checkout@v3

- name: Set conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment-dev.yml
cache-environment: true

- name: Configure using CMake
run: cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)
run: |
if [[ "${{matrix.sys.compiler}}" = "gcc" ]]; then export CC=gcc-${{matrix.sys.version}}; export CXX=g++-${{matrix.sys.version}}; else export CC=clang; export CXX=clang++; fi
cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)

- name: Install
working-directory: build
Expand All @@ -87,13 +80,20 @@ jobs:
export TAR="/usr/bin/tar"
R -e "library(devtools); install_github('xtensor-stack/Xtensor.R', configure.args = '--novendor')"

- name: print R HOME
run: |
R RHOME
echo "Printing R_HOME"
echo $R_HOME

- name: Run tests (C++)
working-directory: build/test
run: ./test_xtensor_r

- name: Run tests (R)
working-directory: test
run: |
if [[ "${{matrix.sys.compiler}}" = "gcc" ]]; then export CC=gcc-${{matrix.sys.version}}; export CXX=g++-${{matrix.sys.version}}; else export CC=clang; export CXX=clang++; fi
mkdir ~/.R
touch ~/.R/Makevars
echo "CXX14=$CXX" >> ~/.R/Makevars
Expand Down
40 changes: 24 additions & 16 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ jobs:
fail-fast: false
matrix:
os:
- 11
- 12
- 14
- 15

steps:

- name: Checkout code
uses: actions/checkout@v3

- name: Set conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment-dev.yml
cache-environment: true

- name: Configure using CMake
run: cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)
run: cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)

- name: Install
working-directory: build
Expand All @@ -53,16 +53,24 @@ jobs:
export TAR="/usr/bin/tar"
R -e "library(devtools); install_github('xtensor-stack/Xtensor.R', configure.args = '--novendor')"

- name: Run tests (C++)
working-directory: build/test
run: ./test_xtensor_r

- name: Run tests (R)
working-directory: test
- name: print R HOME
run: |
mkdir ~/.R
touch ~/.R/Makevars
echo "CXX14=$CXX" >> ~/.R/Makevars
echo "CXX14FLAGS=-fPIC -O2" >> ~/.R/Makevars
Rscript ./unittest.R

R RHOME
echo "Printing R_HOME"
echo $R_HOME

#- name: Run tests (C++)
# working-directory: build/test
# run: |
# export R_HOME=$(R RHOME)
# ./test_xtensor_r

#- name: Run tests (R)
# working-directory: test
# run: |
# mkdir ~/.R
# touch ~/.R/Makevars
# echo "CXX14=$CXX" >> ~/.R/Makevars
# echo "CXX14FLAGS=-fPIC -O2" >> ~/.R/Makevars
# Rscript ./unittest.R

Loading