-
Notifications
You must be signed in to change notification settings - Fork 9
99 lines (86 loc) · 2.7 KB
/
main.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Check that syntax is correct
name: CIFSyntaxandStyleCheck
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
paths-ignore:
- '.github/**'
pull_request:
branches: [ master ]
paths-ignore:
- '.github/**'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
syntax:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@v2
# Check syntax of all CIF files
- name: check_syntax
uses: COMCIFS/cif_syntax_check_action@master
id: cif_syntax_check
ddlm:
runs-on: ubuntu-latest
needs: syntax
steps:
- name: checkout
uses: actions/checkout@v2
- name: check_ddlm
uses: COMCIFS/dictionary_check_action@main
id: ddlm_check
layout:
runs-on: ubuntu-latest
needs: syntax
steps:
- name: Get the cache
uses: actions/cache@v3
id: cache
with:
path: ~/.julia
key: ${{ runner.os }}-julia-v2
- name: Install Julia
uses: julia-actions/setup-julia@v1
with:
version: '1.6'
- name: Install Julia packages
if: steps.cache.outputs.cache-hit != 'true'
run: |
julia -e 'import Pkg;Pkg.add("CrystalInfoFramework");Pkg.add("Lerche");Pkg.add("FilePaths");Pkg.add("ArgParse")'
- name: checkout
uses: actions/checkout@v2
with:
path: main
- name: checkout julia tools
uses: actions/checkout@v2
with:
repository: jamesrhester/julia_cif_tools
path: julia_cif_tools
- name: Checkout CIF master files
uses: actions/checkout@v2
with:
repository: COMCIFS/cif_core
path: cif_core
- name: Diagnostics
run: |
ls -a
pwd
which julia
- name: one_dict_layout
run: |
julia -e 'using Pkg; Pkg.status()'
for file in main/*.dic
do
echo "Checking $file"
julia -O0 ./julia_cif_tools/linter.jl -i $PWD/cif_core $file cif_core/ddl.dic
if [ $? != 0 ]
then
exit 1 ;
fi
done