Upgraded compilers and CMake minimal versions #26
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: 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: Configure using CMake | |
| 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 | |
| run: cmake --install . | |
| - name: Build | |
| working-directory: build | |
| run: cmake --build . --target test_xtensor_r --parallel 8 | |
| - name: Install R package | |
| working-directory: build | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "which tar" | |
| which tar | |
| 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: | | |
| export R_HOME=$CONDA_PREFIX/lib/R | |
| ./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 | |