forked from ufs-community/ufs-srweather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ufs-community:develop' into develop_DTC
- Loading branch information
Showing
434 changed files
with
17,545 additions
and
16,009 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,48 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Output a CSV report of disk usage on subdirs of some path | ||
# Usage: | ||
# [JOB_NAME=<ci_job>] [BUILD_NUMBER=<n>] [SRW_COMPILER=<intel>] [SRW_PLATFORM=<machine>] disk_usage path depth size outfile.csv | ||
# | ||
# args: | ||
# directory=$1 | ||
# depth=$2 | ||
# size=$3 | ||
# outfile=$4 | ||
|
||
[[ -n ${WORKSPACE} ]] || WORKSPACE=$(pwd) | ||
[[ -n ${SRW_PLATFORM} ]] || SRW_PLATFORM=$(hostname -s 2>/dev/null) || SRW_PLATFORM=$(hostname 2>/dev/null) | ||
[[ -n ${SRW_COMPILER} ]] || SRW_COMPILER=compiler | ||
|
||
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" | ||
|
||
# Get repository root from Jenkins WORKSPACE variable if set, otherwise, set | ||
# relative to script directory. | ||
declare workspace | ||
if [[ -n "${WORKSPACE}/${SRW_PLATFORM}" ]]; then | ||
workspace="${WORKSPACE}/${SRW_PLATFORM}" | ||
else | ||
workspace="$(cd -- "${script_dir}/../.." && pwd)" | ||
fi | ||
|
||
echo "STAGE_NAME=${STAGE_NAME}" # from pipeline | ||
outfile="${4:-${workspace}-${SRW_COMPILER}-disk-usage${STAGE_NAME}.csv}" | ||
|
||
function disk_usage() { | ||
local directory=${1:-${PWD}} | ||
local depth=${2:-1} | ||
local size=${3:-k} | ||
echo "Disk usage: ${JOB_NAME:-ci}/${SRW_PLATFORM}/$(basename $directory)" | ||
( | ||
cd $directory || exit 1 | ||
echo "Platform,Build,Owner,Group,Inodes,${size:-k}bytes,Access Time,Filename" | ||
du -Px -d ${depth:-1} --inode --exclude='./workspace' | \ | ||
while read line ; do | ||
arr=($line); inode=${arr[0]}; filename=${arr[1]}; | ||
echo "${SRW_PLATFORM}-${SRW_COMPILER:-compiler},${JOB_NAME:-ci}/${BUILD_NUMBER:-0},$(stat -c '%U,%G' $filename),${inode:-0},$(du -Px -s -${size:-k} --time $filename)" | tr '\t' ',' ; | ||
done | sort -t, -k5 -n #-r | ||
) | ||
echo "" | ||
} | ||
|
||
disk_usage $1 $2 $3 | tee ${outfile} |
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,38 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# A unified init script for the SRW application. This script is expected to | ||
# fetch initial source for the SRW application for all supported platforms. | ||
# | ||
set -e -u -x | ||
|
||
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" | ||
|
||
# Get repository root from Jenkins WORKSPACE variable if set, otherwise, set | ||
# relative to script directory. | ||
declare workspace | ||
if [[ -n "${WORKSPACE}/${SRW_PLATFORM}" ]]; then | ||
workspace="${WORKSPACE}/${SRW_PLATFORM}" | ||
else | ||
workspace="$(cd -- "${script_dir}/../.." && pwd)" | ||
fi | ||
|
||
# Normalize Parallel Works cluster platform value. | ||
declare platform | ||
if [[ "${SRW_PLATFORM}" =~ ^(az|g|p)clusternoaa ]]; then | ||
platform='noaacloud' | ||
else | ||
platform="${SRW_PLATFORM}" | ||
fi | ||
|
||
# Build and install | ||
cd ${workspace} | ||
set +e | ||
/usr/bin/time -p -f '{\n "cpu": "%P"\n, "memMax": "%M"\n, "mem": {"text": "%X", "data": "%D", "swaps": "%W", "context": "%c", "waits": "%w"}\n, "pagefaults": {"major": "%F", "minor": "%R"}\n, "filesystem": {"inputs": "%I", "outputs": "%O"}\n, "time": {"real": "%e", "user": "%U", "sys": "%S"}\n}' -o ${WORKSPACE}/${SRW_PLATFORM}-${SRW_COMPILER}-time-srw_init.json \ | ||
./manage_externals/checkout_externals | ||
init_exit=$? | ||
echo "STAGE_NAME=${STAGE_NAME}" | ||
env | grep = | sort > ${WORKSPACE}/${SRW_PLATFORM}-${SRW_COMPILER}-env.txt | ||
set -e | ||
cd - | ||
|
||
exit $init_exit |
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
Validating CODEOWNERS rules …
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,28 @@ | ||
#!/bin/bash | ||
# This script recreates technical documentation for the ush and tests/WE2E Python scripts | ||
# If the tech docs produced here do not match the branch's contents, the script will fail | ||
|
||
set -eo pipefail | ||
|
||
# Install prerequisites | ||
pip install sphinx | ||
pip install sphinx-rtd-theme | ||
pip install sphinxcontrib-bibtex | ||
|
||
# Regenerate tech docs in ush and tests/WE2E based on current state of scripts in those directories. | ||
cd doc/TechDocs | ||
sphinx-apidoc -fM --remove-old -o ./ush ../../ush | ||
sphinx-apidoc -fM --remove-old -o ./tests/WE2E ../../tests/WE2E | ||
|
||
# Check for mismatch between what comes out of this action and what is in the PR. | ||
status=`git status -s` | ||
|
||
if [ -n "${status}" ]; then | ||
echo ${status} | ||
echo "" | ||
echo "Please update your Technical Documentation RST files." | ||
exit 1 | ||
else | ||
echo "Technical documentation is up-to-date." | ||
exit 0 | ||
fi |
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 @@ | ||
name: Doc Tests | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- develop | ||
- 'release/*' | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash -leo pipefail {0} | ||
|
||
jobs: | ||
doc_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Check tech docs | ||
run: .github/scripts/check_tech_doc.sh | ||
- name: Build documentation | ||
run: | | ||
cd doc | ||
make doc |
Oops, something went wrong.