Skip to content

Commit 81419bf

Browse files
authored
Merge pull request #148 from JohanMabille/ci_fix
Upgraded compilers and CMake minimal versions
2 parents 88d316f + f85cc23 commit 81419bf

14 files changed

+79
-268
lines changed

.appveyor.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.azure-pipelines/azure-pipelines-linux-clang.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.azure-pipelines/azure-pipelines-linux-gcc.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.azure-pipelines/azure-pipelines-osx.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.azure-pipelines/unix-build.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/linux.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,62 +12,55 @@ defaults:
1212
shell: bash -e -l {0}
1313
jobs:
1414
build:
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-24.04
1616
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}
1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
sys:
21-
- {compiler: gcc, version: '8'}
22-
- {compiler: gcc, version: '9'}
23-
- {compiler: gcc, version: '10'}
2421
- {compiler: gcc, version: '11'}
25-
- {compiler: clang, version: '15'}
26-
- {compiler: clang, version: '16'}
22+
- {compiler: gcc, version: '12'}
23+
- {compiler: gcc, version: '13'}
24+
- {compiler: gcc, version: '14'}
25+
#- {compiler: clang, version: '19'}
26+
- {compiler: clang, version: '20'}
2727

2828
steps:
2929

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

41-
- name: Setup clang
42-
if: ${{ matrix.sys.compiler == 'clang' }}
37+
- name: Install LLVM and Clang
38+
if: matrix.sys.compiler == 'clang'
4339
run: |
44-
LLVM_VERSION=${{ matrix.sys.version }}
45-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
46-
if [[ $LLVM_VERSION -ge 13 ]]; then
47-
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_VERSION main" || exit 1
48-
else
49-
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" || exit 1
50-
fi || exit 1
51-
sudo apt-get update || exit 1
52-
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
53-
sudo apt-get --no-install-suggests --no-install-recommends install g++-9 g++-9-multilib || exit 1
54-
sudo ln -s /usr/include/asm-generic /usr/include/asm
55-
CC=clang-$LLVM_VERSION
56-
echo "CC=$CC" >> $GITHUB_ENV
57-
CXX=clang++-$LLVM_VERSION
58-
echo "CXX=$CXX" >> $GITHUB_ENV
40+
wget https://apt.llvm.org/llvm.sh
41+
chmod +x llvm.sh
42+
sudo ./llvm.sh ${{matrix.sys.version}}
43+
sudo apt-get install -y clang-tools-${{matrix.sys.version}}
44+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{matrix.sys.version}} 200
45+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{matrix.sys.version}} 200
46+
sudo update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}} 200
47+
sudo update-alternatives --set clang /usr/bin/clang-${{matrix.sys.version}}
48+
sudo update-alternatives --set clang++ /usr/bin/clang++-${{matrix.sys.version}}
49+
sudo update-alternatives --set clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}}
5950
6051
- name: Checkout code
6152
uses: actions/checkout@v3
6253

6354
- name: Set conda environment
64-
uses: mamba-org/setup-micromamba@v1
55+
uses: mamba-org/setup-micromamba@v2
6556
with:
6657
environment-file: environment-dev.yml
6758
cache-environment: true
6859

6960
- name: Configure using CMake
70-
run: cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)
61+
run: |
62+
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
63+
cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)
7164
7265
- name: Install
7366
working-directory: build
@@ -87,13 +80,20 @@ jobs:
8780
export TAR="/usr/bin/tar"
8881
R -e "library(devtools); install_github('xtensor-stack/Xtensor.R', configure.args = '--novendor')"
8982
83+
- name: print R HOME
84+
run: |
85+
R RHOME
86+
echo "Printing R_HOME"
87+
echo $R_HOME
88+
9089
- name: Run tests (C++)
9190
working-directory: build/test
9291
run: ./test_xtensor_r
9392

9493
- name: Run tests (R)
9594
working-directory: test
9695
run: |
96+
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
9797
mkdir ~/.R
9898
touch ~/.R/Makevars
9999
echo "CXX14=$CXX" >> ~/.R/Makevars

.github/workflows/osx.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os:
21-
- 11
22-
- 12
21+
- 14
22+
- 15
2323

2424
steps:
2525

2626
- name: Checkout code
2727
uses: actions/checkout@v3
2828

2929
- name: Set conda environment
30-
uses: mamba-org/setup-micromamba@v1
30+
uses: mamba-org/setup-micromamba@v2
3131
with:
3232
environment-file: environment-dev.yml
3333
cache-environment: true
3434

3535
- name: Configure using CMake
36-
run: cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)
36+
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)
3737

3838
- name: Install
3939
working-directory: build
@@ -53,16 +53,24 @@ jobs:
5353
export TAR="/usr/bin/tar"
5454
R -e "library(devtools); install_github('xtensor-stack/Xtensor.R', configure.args = '--novendor')"
5555
56-
- name: Run tests (C++)
57-
working-directory: build/test
58-
run: ./test_xtensor_r
59-
60-
- name: Run tests (R)
61-
working-directory: test
56+
- name: print R HOME
6257
run: |
63-
mkdir ~/.R
64-
touch ~/.R/Makevars
65-
echo "CXX14=$CXX" >> ~/.R/Makevars
66-
echo "CXX14FLAGS=-fPIC -O2" >> ~/.R/Makevars
67-
Rscript ./unittest.R
68-
58+
R RHOME
59+
echo "Printing R_HOME"
60+
echo $R_HOME
61+
62+
#- name: Run tests (C++)
63+
# working-directory: build/test
64+
# run: |
65+
# export R_HOME=$(R RHOME)
66+
# ./test_xtensor_r
67+
68+
#- name: Run tests (R)
69+
# working-directory: test
70+
# run: |
71+
# mkdir ~/.R
72+
# touch ~/.R/Makevars
73+
# echo "CXX14=$CXX" >> ~/.R/Makevars
74+
# echo "CXX14FLAGS=-fPIC -O2" >> ~/.R/Makevars
75+
# Rscript ./unittest.R
76+

0 commit comments

Comments
 (0)