-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (63 loc) · 2.18 KB
/
build_and_test_mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build And Run Test on Mac
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
Build_and_Run_GTest:
name: Build and Run GoogleTest
runs-on: macos-11
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: anaconda-client-env
python-version: 3.8
channels: conda-forge
auto-activate-base: false
- name: Install Conda Dependencies
run: |
conda install mamba
mamba install compilers --file ${{github.workspace}}/ci-utils/envs/conda_cpp.txt
- name: Configure CMake
run: cmake -B ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_CLI=ON -DRUN_GTEST=ON -DALLEXTRAS=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
- name: Build
run: cmake --build ${{github.workspace}} --config ${{env.BUILD_TYPE}} --parallel 2
- name: Run GTest Suite
working-directory: ${{github.workspace}}
# Execute tests.
run: ./tests/runAllTests -C ${{env.BUILD_TYPE}}
Build_and_Run_PyTest:
name: Build and Run PyTest
runs-on: macos-11
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: anaconda-client-env
python-version: 3.8
channels: conda-forge
auto-activate-base: false
- name: Install Conda Dependencies
run: |
conda install mamba
mamba install compilers pytest requests --file ${{github.workspace}}/ci-utils/envs/conda_cpp.txt --file ${{github.workspace}}/ci-utils/envs/conda_py.txt
- name: Install Nyxus
working-directory: ${{github.workspace}}
run: CMAKE_ARGS="-DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DALLEXTRAS=ON" python -m pip install . -vv
- name: Run PyTest
working-directory: ${{github.workspace}}
run: python -m pytest tests/python/ -vv