Skip to content

Commit 12838d3

Browse files
authored
Merge pull request #40 from JohanMabille/ci_fix
Added linux GHA file
2 parents dde6a11 + ca53e9a commit 12838d3

File tree

4 files changed

+134
-9
lines changed

4 files changed

+134
-9
lines changed

.github/workflows/linux.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Linux
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
defaults:
11+
run:
12+
shell: bash -e -l {0}
13+
jobs:
14+
build:
15+
runs-on: ubuntu-24.04
16+
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
sys:
21+
- {compiler: gcc, version: '11',}
22+
- {compiler: gcc, version: '12'}
23+
- {compiler: gcc, version: '13'}
24+
- {compiler: gcc, version: '14'}
25+
- {compiler: gcc, version: '11', novendor: 1}
26+
- {compiler: gcc, version: '12', novendor: 1}
27+
- {compiler: gcc, version: '13', novendor: 1}
28+
- {compiler: gcc, version: '14', novendor: 1}
29+
#- {compiler: clang, version: '19'}
30+
- {compiler: clang, version: '20'}
31+
32+
steps:
33+
34+
- name: Install GCC
35+
if: matrix.sys.compiler == 'gcc'
36+
uses: egor-tensin/setup-gcc@v1
37+
with:
38+
version: ${{matrix.sys.version}}
39+
platform: x64
40+
41+
- name: Install LLVM and Clang
42+
if: matrix.sys.compiler == 'clang'
43+
run: |
44+
wget https://apt.llvm.org/llvm.sh
45+
chmod +x llvm.sh
46+
sudo ./llvm.sh ${{matrix.sys.version}}
47+
sudo apt-get install -y clang-tools-${{matrix.sys.version}}
48+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{matrix.sys.version}} 200
49+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{matrix.sys.version}} 200
50+
sudo update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}} 200
51+
sudo update-alternatives --set clang /usr/bin/clang-${{matrix.sys.version}}
52+
sudo update-alternatives --set clang++ /usr/bin/clang++-${{matrix.sys.version}}
53+
sudo update-alternatives --set clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}}
54+
55+
- name: Build and run tests
56+
uses: ./.github/workflows/unix_impl.yml
57+

.github/workflows/osx.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: OSX
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
defaults:
11+
run:
12+
shell: bash -e -l {0}
13+
jobs:
14+
build:
15+
runs-on: macos-${{ matrix.os }}
16+
name: macos-${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os:
21+
- 14
22+
- 15
23+
24+
steps:
25+
26+
- name: Build and run tests
27+
uses: ./.github/workflows/unix_impl.yml
28+

.github/workflows/unix_impl.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Common steps for Linux and OSX"
2+
runs:
3+
steps:
4+
- name: Checkout code
5+
uses: actions/checkout@v3
6+
7+
- name: Set conda environment
8+
uses: mamba-org/setup-micromamba@v2
9+
with:
10+
environment-file: environment-dev.yml
11+
cache-environment: true
12+
13+
- name: Install NOVENDOR dependencies
14+
if: env.NOVENDOR == '1'
15+
run: |
16+
if [[ $USE_DEV_XTENSOR_R == 1 ]]; then
17+
micromamba install xtensor==0.24.4 xsimd=10.0.0 cmake -c conda-forge;
18+
git clone https://github.com/xtensor-stack/xtensor-r.git;
19+
cd xtensor-r; mkdir build; cd build;
20+
cmake -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..;
21+
make install;
22+
cd ../..;
23+
else
24+
micromamba install xtensor-r==0.14.0 -c conda-forge;
25+
fi
26+
27+
- name: Build Xtensor.R package
28+
run: |
29+
R CMD build ${{ github.workspace }};
30+
31+
- name: Check R package
32+
run: |
33+
if [[ $NOVENDOR == 1 ]]; then
34+
echo "Running R CMD check with --novendor argument";
35+
echo "R CMD check --install-args=\"--configure-args='--novendor'\" ./xtensor_*.tar.gz"
36+
R CMD check --install-args="--configure-args='--novendor'" ./xtensor_*.tar.gz || (
37+
cat xtensor.Rcheck/00install.out &&
38+
cat xtensor.Rcheck/00check.log &&
39+
cat xtensor.Rcheck/Rdlatex.log
40+
);
41+
else
42+
echo "Running R CMD check with --as-cran argument.";
43+
echo "R CMD check --as-cran ./xtensor_*.tar.gz"
44+
R CMD check --as-cran ./xtensor_*.tar.gz || (
45+
cat xtensor.Rcheck/00install.out &&
46+
cat xtensor.Rcheck/00check.log &&
47+
cat xtensor.Rcheck/Rdlatex.log
48+
);
49+
fi

azure-pipelines.yml

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

0 commit comments

Comments
 (0)