-
Notifications
You must be signed in to change notification settings - Fork 4
77 lines (64 loc) · 2.01 KB
/
test-linux.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
name: Testing on ubuntu-latest
on: [push, pull_request]
env:
SKBUILD_BUILD_OPTIONS: --verbose
jobs:
build-depends:
uses: ./.github/workflows/test-linux-dependencies.yml
build:
needs: build-depends
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Set up requirements & configuration variables
run: |
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel
echo "SKBUILD_BUILD_OPTIONS=${{ env.SKBUILD_BUILD_OPTIONS }}" >> "$GITHUB_ENV"
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3
### libcasm-xtal ###
- name: restore libcasm-xtal cache
id: cache-libcasm-xtal-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_crystallography/dist
key: ${{ runner.os }}-libcasm-xtal-v2-0a2
- name: Install CASM dependencies
run: |
pip install CASMcode_global/dist/*.whl
pip install CASMcode_crystallography/dist/*.whl
pip install -r build_requirements.txt
- name: make
shell: bash
run: |
pip install -v .
- name: make test
shell: bash
run: |
pip install -r test_requirements.txt
python -m pytest -rsap python/tests
- name: Set up doc requirements
run: |
pip install -r doc_requirements.txt
- name: build docs
shell: bash
run: |
cd python/doc
sphinx-build -b html . _build/html
- name: upload docs
if: always()
uses: actions/upload-artifact@v3
with:
name: libcasm-mapping-docs
path: python/doc/_build/html