-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
194 additions
and
102 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,81 @@ | ||
name: 'run all quickbuilds' | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: hkershaw/dart-dep-external:2.0 | ||
options: "--cap-add=SYS_PTRACE" | ||
outputs: | ||
matrix: ${{ steps.matrix.outputs.value }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: matrix | ||
run: | | ||
git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} | ||
DART=$(git rev-parse --show-toplevel) | ||
files_to_process=( $(find $DART -executable -type f -name quickbuild.sh | sed -E 's#(\./|quickbuild\.sh)##g') ) | ||
joined_items="" | ||
for item in "${files_to_process[@]}"; do | ||
if [[ $item == *"template"* ]]; then | ||
continue # template model not for compiling | ||
fi | ||
if [[ $item == *"/var/"* ]] || [[ $item == *"/gps/"* ]]; then | ||
# skipping these converters, out of the box quickbuild.sh fails | ||
# var needs wrf files | ||
# gps need prepbuffr bufrlib.a to be built | ||
continue | ||
fi | ||
# Append the quoted item and a comma to the string | ||
stripped_item=${item#/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/} # removes /__w/DART/DART | ||
echo $stripped_item | ||
joined_items+="\"$stripped_item\"," | ||
done | ||
# Remove the trailing comma from the last item | ||
joined_items="${joined_items%,}" | ||
echo "value=[ $joined_items ]" >> $GITHUB_OUTPUT | ||
shell: bash | ||
build: | ||
needs: [ setup ] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: hkershaw/dart-dep-external:2.0 | ||
options: "--cap-add=SYS_PTRACE" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
value: ${{fromJSON(needs.setup.outputs.matrix)}} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set checked out repo as a safe git directory | ||
run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} | ||
- name: Creating Makefile template | ||
run: | | ||
cd build_templates | ||
sed -i 's|exec '\''make'\'', '\''-f'\'', \$opt_m if \$opt_x;|exec '\''make'\'', '\''-j'\'', '\''4'\'', '\''-f'\'', \$opt_m if \$opt_x;|' mkmf | ||
case ${{ matrix.value }} in | ||
*quikscat* | *GSI2DART* ) | ||
cp /home/mkmf.template.quikscat.gfortran mkmf.template | ||
;; | ||
*AIRS*) | ||
cp /home/mkmf.template.AIRS.gfortran mkmf.template | ||
;; | ||
*GMI* | *GOES* | *forward_operators* | *NSIDC* ) | ||
cp /home/mkmf.template.rttov.gfortran mkmf.template | ||
;; | ||
*) | ||
cp mkmf.template.gfortran mkmf.template | ||
echo 'FFLAGS = -g -Wuninitialized -Wunused -ffree-line-length-none -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow $(INCS)' >> mkmf.template | ||
;; | ||
esac | ||
shell: bash | ||
- name: Run quickbuild.sh script | ||
run: | | ||
cd ${{ matrix.value }} | ||
./quickbuild.sh | ||
shell: bash |
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
Oops, something went wrong.