Skip to content

Commit

Permalink
Merge pull request COMCIFS#79 from vaitkus/fix-github-actions
Browse files Browse the repository at this point in the history
Fix GitHub actions
  • Loading branch information
jamesrhester authored Feb 15, 2024
2 parents 0a1ab40 + 47f59b1 commit 7216499
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 14 deletions.
78 changes: 64 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
name: CIFSyntaxandStyleCheck

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# events but only for the main branch
on:
push:
branches: [ master ]
branches: [ main ]
paths-ignore:
- '.github/**'

pull_request:
branches: [ master ]
workflow_dispatch:
branches: [ main ]
paths-ignore:
- '.github/**'
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -21,8 +26,8 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

# Check syntax of all CIF files
- name: check_syntax
uses: COMCIFS/cif_syntax_check_action@master
Expand All @@ -32,18 +37,63 @@ jobs:
needs: syntax
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: check_ddlm
uses: COMCIFS/dictionary_check_action@main
id: ddlm_check
layout:
runs-on: ubuntu-latest
needs: ddlm
needs: syntax

steps:
- name: checkout
uses: actions/checkout@v2

- name: check_layout
uses: jamesrhester/cif_dic_layout_check_action@main
id: layout_check
- name: Get the cache
uses: actions/cache@v4
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@v4
with:
path: main
- name: checkout julia tools
uses: actions/checkout@v4
with:
repository: jamesrhester/julia_cif_tools
path: julia_cif_tools

- name: Checkout CIF master files
uses: actions/checkout@v4
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![CIFSyntaxandStyleCheck](https://github.com/COMCIFS/TopoCif/actions/workflows/main.yml/badge.svg)](https://github.com/COMCIFS/TopoCif/actions)

# Topology Dictionary

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

0 comments on commit 7216499

Please sign in to comment.