-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from climbfuji/travis-encoding-check_and_satu…
…ration-adjustment-check Configure travis for basic encoding checks, and saturation adjustment check for number of water species
- Loading branch information
Showing
9 changed files
with
78 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Basic checks for CCPP physics schemes | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Init submodules | ||
run: git submodule update --init --recursive | ||
#- name: Update packages | ||
# run: | | ||
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
# #brew install autoconf automake coreutils gcc@9 libtool mpich gnu-sed wget | ||
# brew install automake coreutils mpich gnu-sed | ||
- name: Check for ASCII encoding | ||
run: ./tools/check_encoding.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python | ||
|
||
#import chardet | ||
import os | ||
import sys | ||
|
||
|
||
SUFFICES = [ '.f', '.F', '.f90', '.F90', '.meta' ] | ||
|
||
for root, dirs, files in os.walk(os.getcwd()): | ||
#print root, dirs, files | ||
for file in files: | ||
suffix = os.path.splitext(file)[1] | ||
#print file, suffix | ||
if suffix in SUFFICES: | ||
with open(os.path.join(root, file)) as f: | ||
contents = f.read() | ||
try: | ||
contents.decode('ascii') | ||
except UnicodeDecodeError: | ||
for line in contents.split('\n'): | ||
try: | ||
line.decode('ascii') | ||
except UnicodeDecodeError: | ||
raise Exception('Detected non-ascii characters in file {}, line: "{}"'.format(os.path.join(root, file), line)) |