Skip to content

Commit

Permalink
Merge pull request #136 from Goddard-Fortran-Ecosystem/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tclune authored Mar 4, 2024
2 parents 82442c7 + 5c6b4f8 commit 43deed7
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 41 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/changelog-enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Enforce Changelog"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'ChangeLog.md'
skipLabels: 'Skip Changelog'
missingUpdateErrorMessage: >
No update to ChangeLog.md found! Please add a changelog
entry to it describing your change. Please note that the
keepachangelog (https://keepachangelog.com) format is
used. If your change is very trivial not applicable for a
changelog entry, add a 'Skip Changelog' label to the pull
request to skip the changelog enforcer.
144 changes: 110 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12]
compiler: [gfortran-9, gfortran-10, gfortran-11, gfortran-12]
os: [ubuntu-22.04, macos-11, macos-12]
compiler: [gfortran-10, gfortran-11, gfortran-12, gfortran-13]
exclude:
- os: ubuntu-20.04
compiler: gfortran-11
- os: ubuntu-20.04
compiler: gfortran-12
- os: ubuntu-22.04
compiler: gfortran-9
- os: macos-11
compiler: gfortran-12
- os: macos-12
compiler: gfortran-9
compiler: gfortran-13
- os: macos-12
compiler: gfortran-10
- os: macos-12
compiler: gfortran-12

# fail-fast if set to 'true' here is good for production, but when
# debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails
Expand All @@ -52,38 +42,43 @@ jobs:

name: ${{ matrix.os }} / ${{ matrix.compiler }}
steps:
- name: Install GCC 12 on Ubuntu 22.04
if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'gfortran-12'
run: |
sudo apt-get install gfortran-12 -y
- name: Versions
- name: Compiler Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Build GFE Prereqs
run: |
bash ./tools/travis-install-gfe.bash
bash ./tools/ci-install-gfe.bash
- name: Build fArgParse
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/fArgParse -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j$(nproc)
- name: Build Tests
run: |
cd build
make -j$(nproc) tests
- name: Run Tests Again if failure
if: failure()
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
Expand All @@ -94,50 +89,131 @@ jobs:
runs-on: ubuntu-20.04

env:
FC: ifort
CC: icc
FC: ifx
CC: icx

name: Intel Fortran
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Intel compilers
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Setup Intel oneAPI repository
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt install --no-install-recommends intel-oneapi-compiler-fortran intel-oneapi-mpi \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi-devel
sudo apt-get update
- name: Install Intel oneAPI compilers
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp

# optional
- name: Install Intel MPI
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel

- name: Setup Intel oneAPI environment
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
printenv | grep intel
- name: Versions
run: |
${FC} --version
${CC} --version
mpirun --version
cmake --version
- name: Build GFE Prereqs
run: |
bash ./tools/travis-install-gfe.bash
bash ./tools/ci-install-gfe.bash
- name: Build fArgParse
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/fArgParse -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j$(nproc)
- name: Build Tests
run: |
cd build
make -j$(nproc) tests
- name: Run Tests Again if failure
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
Nvidia:
runs-on: ubuntu-20.04
container: nvcr.io/nvidia/nvhpc:24.1-devel-cuda12.3-ubuntu22.04
env:
FC: nvfortran

name: Nvidia HPC
steps:
- name: Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Add python-is-python3 package
run: |
apt-get update
apt-get install -y python-is-python3
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build fArgParse
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/fArgParse -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j$(nproc)
- name: Build Tests
run: |
cd build
make -j$(nproc) tests
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
cmake_minimum_required(VERSION 3.12)

project (FARGPARSE

VERSION 1.6.0
VERSION 1.7.0
LANGUAGES Fortran)

# Most users of this software do not (should not?) have permissions to
Expand Down
8 changes: 4 additions & 4 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2017 United States Government as represented by the
Administrator of the National Aeronautics and Space Administration. No
copyright is claimed in the United States under Title 17,
U.S. Code. All Other Rights Reserved.
Copyright © 2021 United States Government as represented by the
Administrator of the National Aeronautics and Space
Administration. All Rights Reserved.

16 changes: 15 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [1.6.0]
## [1.7.0] - 2024-03-04

### Added

- Add Apache 2.0 license (huzzah!)
- Fujitsu compiler support

### Changed

- Updated CI
- Fix NVIDIA CI
- Add Intel
- Remove gcc 9 from macos

## [1.6.0] - 2023-11-29

### Fixed

Expand Down
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
NASA Docket No. GSC-18,866-1, and identified as " Continuous Integration and CMake Packaging extensions for fArgParse

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
File renamed without changes.
14 changes: 14 additions & 0 deletions cmake/Fujitsu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
if (CMAKE_Fortran_COMPILER_ID MATCHES Fujitsu)
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.10.0)
message(FATAL_ERROR "${CMAKE_Fortran_COMPILER_ID} version must be at least 4.10.0!")
endif ()
endif ()

# Compiler specific flags for Fujitsu Fortran compiler

set(check_all "-Nquickdbg")
set(cpp "-Cfpp")

set(CMAKE_Fortran_FLAGS_DEBUG "-O0 ${check_all}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS "-g ${cpp} -Nalloc_assign -Free")
File renamed without changes.
File renamed without changes.

0 comments on commit 43deed7

Please sign in to comment.