-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 1.93 KB
/
test.yml
File metadata and controls
70 lines (62 loc) · 1.93 KB
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
# Test that we can build on Linux and MacOS with the conda-forge toolchain
name: Test Compilation
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Compile on ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: Linux-x86_64
- os: macos-latest
arch: MacOSX-x86_64
- os: macos-latest
arch: MacOSX-arm64
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Conda Base
run: |
sudo rm -rf /usr/share/miniconda \
&& sudo rm -rf /usr/local/miniconda \
&& curl -SL -o miniforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-${{ matrix.arch }}.sh \
&& bash miniforge.sh -b -f -p ~/conda \
&& source ~/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& conda update -n base --yes conda
- name: Check Conda Config
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& conda info \
&& conda list \
&& conda config --show-sources \
&& conda config --show
- name: Install Dependencies
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda create --yes -n test cmake compilers
- name: Install and Test
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& mkdir -p build \
&& pushd build >/dev/null 2>&1 \
&& cmake -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} .. \
&& make -j 2 install \
&& make test