-
Notifications
You must be signed in to change notification settings - Fork 61
73 lines (65 loc) · 2.06 KB
/
Copy pathtest_si.yaml
File metadata and controls
73 lines (65 loc) · 2.06 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
71
72
73
name: Test Si example
on:
push:
branches:
- 2.0dev
# paths:
# - '**.cpp'
# - '**.h'
# - '**.py'
# - '**.c'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
# os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ['3.10']
name: OS ${{ matrix.os }} Python ${{ matrix.python-version }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: alamode
python-version: ${{ matrix.python-version }}
- name: Get Date
id: get-date
run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
shell: bash
- name: Cache Conda env
uses: actions/cache@v4
env:
# Increase this value to reset cache if etc/alm-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('etc/alamode-environment.yml') }}-${{ env.CACHE_NUMBER }}
id: cache
- name: Update environment
run: conda env update -n anaconda-client-env -f etc/alamode-environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Install conda libraries
run: conda install numpy scipy h5py compilers spglib boost eigen cmake openmpi fftw
- run: echo ${CC} ${CXX}
- name: Build alm and anphon with cmake
run: |
mkdir -p _build
cd _build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j
cd ..
- name: Run test Si
working-directory: ./test
run: python test_si.py