| 1 |
|
| 2 |
|
| 3 |
name: CIFSyntaxandStyleCheck |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
on: |
| 8 |
push: |
| 9 |
branches: [ master ] |
| 10 |
paths-ignore: |
| 11 |
- '.github/**' |
| 12 |
|
| 13 |
pull_request: |
| 14 |
branches: [ master ] |
| 15 |
paths-ignore: |
| 16 |
- '.github/**' |
| 17 |
workflow_dispatch: |
| 18 |
|
| 19 |
|
| 20 |
jobs: |
| 21 |
syntax: |
| 22 |
|
| 23 |
runs-on: ubuntu-latest |
| 24 |
|
| 25 |
|
| 26 |
steps: |
| 27 |
|
| 28 |
- name: checkout |
| 29 |
uses: actions/checkout@v4 |
| 30 |
|
| 31 |
|
| 32 |
- name: check_syntax |
| 33 |
uses: COMCIFS/cif_syntax_check_action@master |
| 34 |
id: cif_syntax_check |
| 35 |
ddlm: |
| 36 |
runs-on: ubuntu-latest |
| 37 |
needs: syntax |
| 38 |
steps: |
| 39 |
- name: checkout |
| 40 |
uses: actions/checkout@v4 |
| 41 |
|
| 42 |
- name: check_ddlm |
| 43 |
uses: COMCIFS/dictionary_check_action@main |
| 44 |
id: ddlm_check |
| 45 |
layout: |
| 46 |
runs-on: ubuntu-latest |
| 47 |
needs: syntax |
| 48 |
|
| 49 |
steps: |
| 50 |
- name: Get the cache |
| 51 |
uses: actions/cache@v4 |
| 52 |
id: cache |
| 53 |
with: |
| 54 |
path: ~/.julia |
| 55 |
key: ${{ runner.os }}-julia-v2 |
| 56 |
|
| 57 |
- name: Install Julia |
| 58 |
uses: julia-actions/setup-julia@v1 |
| 59 |
with: |
| 60 |
version: '1.6' |
| 61 |
|
| 62 |
- name: Install Julia packages |
| 63 |
if: steps.cache.outputs.cache-hit != 'true' |
| 64 |
run: | |
| 65 |
julia -e 'import Pkg;Pkg.add("CrystalInfoFramework");Pkg.add("Lerche");Pkg.add("FilePaths");Pkg.add("ArgParse")' |
| 66 |
|
| 67 |
- name: checkout |
| 68 |
uses: actions/checkout@v4 |
| 69 |
with: |
| 70 |
path: main |
| 71 |
- name: checkout julia tools |
| 72 |
uses: actions/checkout@v4 |
| 73 |
with: |
| 74 |
repository: jamesrhester/julia_cif_tools |
| 75 |
path: julia_cif_tools |
| 76 |
|
| 77 |
- name: Checkout CIF master files |
| 78 |
uses: actions/checkout@v4 |
| 79 |
with: |
| 80 |
repository: COMCIFS/cif_core |
| 81 |
path: cif_core |
| 82 |
- name: Diagnostics |
| 83 |
run: | |
| 84 |
ls -a |
| 85 |
pwd |
| 86 |
which julia |
| 87 |
|
| 88 |
- name: one_dict_layout |
| 89 |
run: | |
| 90 |
julia -e 'using Pkg; Pkg.status()' |
| 91 |
for file in main/*.dic |
| 92 |
do |
| 93 |
echo "Checking $file" |
| 94 |
julia -O0 ./julia_cif_tools/linter.jl -i $PWD/cif_core $file cif_core/ddl.dic |
| 95 |
if [ $? != 0 ] |
| 96 |
then |
| 97 |
exit 1 ; |
| 98 |
fi |
| 99 |
done |