Skip to content

Commit a9e77fa

Browse files
committed
Update codee to 2025.4.8 and simplify .github/workflows/fortran-formatting.yaml
1 parent 900069b commit a9e77fa

1 file changed

Lines changed: 24 additions & 18 deletions

File tree

.github/workflows/fortran-formatting.yaml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
types: [opened, synchronize, labeled, unlabeled]
77

88
env:
9-
CODEE_VERSION: 2025.4.5
9+
CODEE_VERSION: 2025.4.8
1010

1111
# Only needed when fixing formatting automatically, but this only
1212
# works for pull requests from the same repo, not from a fork
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
format:
19-
name: Check and fix Fortran formatting
19+
name: Check Fortran formatting
2020
runs-on: ubuntu-22.04
2121

2222
steps:
@@ -25,32 +25,38 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28-
- name: Get modified Fortran files
28+
#- name: Get modified Fortran files
29+
- name: Check formatting of modified Fortran files
2930
run: |
3031
git remote -v show
3132
git fetch origin ${{ github.base_ref }}
3233
MODIFIED_FILES=$(git diff --name-only --diff-filter=d origin/${{ github.base_ref }}...HEAD -- '*.f90' '*.F90' '*.f' '*.F')
33-
echo "MODIFIED_FILES=${MODIFIED_FILES}" >> ${GITHUB_ENV}
34-
35-
- name: Install Codee
36-
if: env.MODIFIED_FILES != ''
37-
run: |
34+
if [[ "${MODIFIED_FILES}" == "" ]]; then
35+
exit 0
36+
fi
37+
# echo "MODIFIED_FILES=${MODIFIED_FILES}" >> ${GITHUB_ENV}
38+
#
39+
# - name: Install Codee
40+
# if: env.MODIFIED_FILES != ''
41+
# run: |
3842
echo "Installing Codee ${CODEE_VERSION} ..."
3943
wget https://codee.com/release/codee-${CODEE_VERSION}-linux-x86_64.tar.gz
4044
tar -xf codee-${CODEE_VERSION}-linux-x86_64.tar.gz
41-
42-
- name: Run `codee format` on modified files
43-
if: env.MODIFIED_FILES != ''
44-
run: |
45+
#
46+
# - name: Run `codee format` on modified files
47+
# if: env.MODIFIED_FILES != ''
48+
# run: |
4549
export PATH="${PWD}/codee-${CODEE_VERSION}-linux-x86_64/bin:${PATH}"
4650
codee format --accept-eula --verbose ${MODIFIED_FILES}
4751
REFORMATTED_FILES=$(git diff --name-only --diff-filter=d)
48-
echo "REFORMATTED_FILES=${REFORMATTED_FILES}" >> ${GITHUB_ENV}
49-
50-
- name: Fail if there are uncommitted changes
51-
if: ${{ env.REFORMATTED_FILES != '' }}
52-
run: |
52+
# echo "REFORMATTED_FILES=${REFORMATTED_FILES}" >> ${GITHUB_ENV}
53+
#
54+
# - name: Fail if there are uncommitted changes
55+
# if: ${{ env.REFORMATTED_FILES != '' }}
56+
# run: |
57+
if [[ "${REFORMATTED_FILES}" == "" ]]; then
58+
exit 0
59+
fi
5360
echo "Formatting issues detected. Run 'codee format' locally or apply the following diff manually:"
5461
git diff
5562
exit 1
56-

0 commit comments

Comments
 (0)