Skip to content

Commit 1d24666

Browse files
authored
Merge pull request #141 from JohanMabille/gha_osx
Added OSX workflow
2 parents 491dbb9 + 31c6984 commit 1d24666

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/osx.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
- 11
22+
- 12
23+
24+
steps:
25+
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
29+
- name: Set conda environment
30+
uses: mamba-org/setup-micromamba@v1
31+
with:
32+
environment-file: environment-dev.yml
33+
cache-environment: true
34+
35+
- 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)
37+
38+
- name: Install
39+
working-directory: build
40+
run: cmake --install .
41+
42+
- name: Build
43+
working-directory: build
44+
run: cmake --build . --target test_xtensor_r --parallel 8
45+
46+
- name: Install R package
47+
working-directory: build
48+
env:
49+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
50+
run: |
51+
echo "which tar"
52+
which tar
53+
export TAR="/usr/bin/tar"
54+
R -e "library(devtools); install_github('xtensor-stack/Xtensor.R', configure.args = '--novendor')"
55+
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
62+
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+

0 commit comments

Comments
 (0)