Skip to content

Commit 7216499

Browse files
authored
Merge pull request COMCIFS#79 from vaitkus/fix-github-actions
Fix GitHub actions
2 parents 0a1ab40 + 47f59b1 commit 7216499

File tree

2 files changed

+66
-14
lines changed

2 files changed

+66
-14
lines changed

.github/workflows/main.yml

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
name: CIFSyntaxandStyleCheck
44

55
# Controls when the action will run. Triggers the workflow on push or pull request
6-
# events but only for the master branch
6+
# events but only for the main branch
77
on:
88
push:
9-
branches: [ master ]
9+
branches: [ main ]
10+
paths-ignore:
11+
- '.github/**'
12+
1013
pull_request:
11-
branches: [ master ]
12-
workflow_dispatch:
14+
branches: [ main ]
15+
paths-ignore:
16+
- '.github/**'
17+
workflow_dispatch:
1318

1419
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1520
jobs:
@@ -21,8 +26,8 @@ jobs:
2126
steps:
2227
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2328
- name: checkout
24-
uses: actions/checkout@v2
25-
29+
uses: actions/checkout@v4
30+
2631
# Check syntax of all CIF files
2732
- name: check_syntax
2833
uses: COMCIFS/cif_syntax_check_action@master
@@ -32,18 +37,63 @@ jobs:
3237
needs: syntax
3338
steps:
3439
- name: checkout
35-
uses: actions/checkout@v2
40+
uses: actions/checkout@v4
3641

3742
- name: check_ddlm
3843
uses: COMCIFS/dictionary_check_action@main
3944
id: ddlm_check
4045
layout:
4146
runs-on: ubuntu-latest
42-
needs: ddlm
47+
needs: syntax
48+
4349
steps:
44-
- name: checkout
45-
uses: actions/checkout@v2
46-
47-
- name: check_layout
48-
uses: jamesrhester/cif_dic_layout_check_action@main
49-
id: layout_check
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

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![CIFSyntaxandStyleCheck](https://github.com/COMCIFS/TopoCif/actions/workflows/main.yml/badge.svg)](https://github.com/COMCIFS/TopoCif/actions)
2+
13
# Topology Dictionary
24

35
The topology CIF dictionary provides data names for describing some topological characteristics of different lattices and their relation to crystal structures.

0 commit comments

Comments
 (0)