Skip to content

Commit

Permalink
Merge pull request #378 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
GitFlow: Merge develop into main for release
  • Loading branch information
mathomp4 authored May 16, 2024
2 parents b7be0ee + 0b3c3d6 commit 0f40e43
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/validate_yaml_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

# Based on code from https://github.com/marketplace/actions/yaml-lint

name: Yaml Lint

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

# This validation is equivalent to running on the command line:
# yamllint -d relaxed --no-warnings
# and is controlled by the .yamllint.yml file
jobs:
validate-YAML:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: yaml-lint
name: yaml-lint
uses: ibiqlik/action-yamllint@v3
with:
no_warnings: true
format: colored
config_file: .yamllint.yml

- uses: actions/upload-artifact@v4
if: always()
with:
name: yamllint-logfile
path: ${{ steps.yaml-lint.outputs.logfile }}
29 changes: 29 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---

extends: default

rules:
braces:
level: warning
max-spaces-inside: 1
brackets:
level: warning
max-spaces-inside: 1
colons:
level: warning
commas:
level: warning
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
level: warning
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length:
level: warning
allow-non-breakable-inline-mappings: true
truthy: disable
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [3.45.2] - 2024-05-16

### Fixed

- Fix issue with `ld_classic` detection on macOS. Not all XCode versions need this

### Added

- Added YAML linter

## [3.45.1] - 2024-05-03

### Fixed
Expand Down
14 changes: 11 additions & 3 deletions compiler/flags/GNU_Fortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,17 @@ else ()
endif ()

if (APPLE)
# We seem to now require (sometimes?) the use of ld_classic if on Apple
add_link_options(-Wl,-ld_classic)

# Determine whether we need to add link options for version 15+ of the Apple command line utilities
execute_process(COMMAND "pkgutil"
"--pkg-info=com.apple.pkg.CLTools_Executables"
OUTPUT_VARIABLE TEST)
string(REGEX REPLACE ".*version: ([0-9]+).*" "\\1" CMDLINE_UTILS_VERSION ${TEST})
message(STATUS "Apple command line utils major version is '${CMDLINE_UTILS_VERSION}'")
if (${CMDLINE_UTILS_VERSION} VERSION_GREATER 14)
message(STATUS "Adding link options '-Wl,-ld_classic'")
add_link_options(-Wl,-ld_classic)
endif ()
#
# Also, if our C compiler is Apple Clang, we need to pass -Wno-implicit-int to our C flags
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-implicit-int")
Expand Down
11 changes: 10 additions & 1 deletion compiler/flags/Intel_Fortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,16 @@ elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
# Once you are in here, you are probably on Rosetta, but not required.
# Still, on Apple Rosetta we also now need to use the ld_classic as the linker
if (APPLE)
add_link_options("-Wl,-ld_classic")
# Determine whether we need to add link options for version 15+ of the Apple command line utilities
execute_process(COMMAND "pkgutil"
"--pkg-info=com.apple.pkg.CLTools_Executables"
OUTPUT_VARIABLE TEST)
string(REGEX REPLACE ".*version: ([0-9]+).*" "\\1" CMDLINE_UTILS_VERSION ${TEST})
message(STATUS "Apple command line utils major version is '${CMDLINE_UTILS_VERSION}'")
if (${CMDLINE_UTILS_VERSION} VERSION_GREATER 14)
message(STATUS "Adding link options '-Wl,-ld_classic'")
add_link_options(-Wl,-ld_classic)
endif ()
endif ()
else ()
message(FATAL_ERROR "Unknown processor. Please file an issue at https://github.com/GEOS-ESM/ESMA_cmake")
Expand Down

0 comments on commit 0f40e43

Please sign in to comment.