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
57 changes: 57 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Linux
on:
workflow_dispatch:
pull_request:
push:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -e -l {0}
jobs:
build:
runs-on: ubuntu-24.04
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}
strategy:
fail-fast: false
matrix:
sys:
- {compiler: gcc, version: '11',}
- {compiler: gcc, version: '12'}
- {compiler: gcc, version: '13'}
- {compiler: gcc, version: '14'}
- {compiler: gcc, version: '11', novendor: 1}
- {compiler: gcc, version: '12', novendor: 1}
- {compiler: gcc, version: '13', novendor: 1}
- {compiler: gcc, version: '14', novendor: 1}
#- {compiler: clang, version: '19'}
- {compiler: clang, version: '20'}

steps:

- name: Install GCC
if: matrix.sys.compiler == 'gcc'
uses: egor-tensin/setup-gcc@v1
with:
version: ${{matrix.sys.version}}
platform: x64

- name: Install LLVM and Clang
if: matrix.sys.compiler == 'clang'
run: |
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: Build and run tests
uses: ./.github/workflows/unix_impl.yml

28 changes: 28 additions & 0 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: OSX
on:
workflow_dispatch:
pull_request:
push:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -e -l {0}
jobs:
build:
runs-on: macos-${{ matrix.os }}
name: macos-${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 14
- 15

steps:

- name: Build and run tests
uses: ./.github/workflows/unix_impl.yml

49 changes: 49 additions & 0 deletions .github/workflows/unix_impl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Common steps for Linux and OSX"
runs:
steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install NOVENDOR dependencies
if: env.NOVENDOR == '1'
run: |
if [[ $USE_DEV_XTENSOR_R == 1 ]]; then
micromamba install xtensor==0.24.4 xsimd=10.0.0 cmake -c conda-forge;
git clone https://github.com/xtensor-stack/xtensor-r.git;
cd xtensor-r; mkdir build; cd build;
cmake -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..;
make install;
cd ../..;
else
micromamba install xtensor-r==0.14.0 -c conda-forge;
fi

- name: Build Xtensor.R package
run: |
R CMD build ${{ github.workspace }};

- name: Check R package
run: |
if [[ $NOVENDOR == 1 ]]; then
echo "Running R CMD check with --novendor argument";
echo "R CMD check --install-args=\"--configure-args='--novendor'\" ./xtensor_*.tar.gz"
R CMD check --install-args="--configure-args='--novendor'" ./xtensor_*.tar.gz || (
cat xtensor.Rcheck/00install.out &&
cat xtensor.Rcheck/00check.log &&
cat xtensor.Rcheck/Rdlatex.log
);
else
echo "Running R CMD check with --as-cran argument.";
echo "R CMD check --as-cran ./xtensor_*.tar.gz"
R CMD check --as-cran ./xtensor_*.tar.gz || (
cat xtensor.Rcheck/00install.out &&
cat xtensor.Rcheck/00check.log &&
cat xtensor.Rcheck/Rdlatex.log
);
fi
9 changes: 0 additions & 9 deletions azure-pipelines.yml

This file was deleted.