Skip to content

Commit

Permalink
Merge branch 'main' into try-codespace-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
e-perl-NOAA committed Nov 6, 2024
2 parents 95be4a1 + 2fbbf24 commit cc6d593
Show file tree
Hide file tree
Showing 27 changed files with 565 additions and 463 deletions.
37 changes: 21 additions & 16 deletions .github/ISSUE_TEMPLATE/ss3-release-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,41 @@ assignees:
- chantelwetzel-noaa
- iantaylor-NOAA
- kellijohnson-NOAA
- e-gugliotti-NOAA
- shcaba
- e-perl-NOAA
---

# Release checklist

<!---Note all instances of xx should be replaced with the version number (e.g., the release for v3.30.20 would replace xx with 20)-->

## Checklist for before prerelease
- [ ] SS3 testing and debugging completed (RM and IT)
- [ ] Check artifact from the `call-build-ss3-warnings` GitHub action for useful warnings (RM and IT)
- [ ] r4ss updated (IT)
## General checklist before pre-release and release
- [ ] SS3 testing and debugging completed (RM/IT)
- [ ] Check artifact from the `call-build-ss3-warnings` GitHub action for useful warnings (RM/IT/EP)
- [ ] r4ss updated (IT/EP)

<!---## Checklist for before pre-release (if pre-release is being done)
- [ ] Put together pre-release announcement (RM)
- [ ] code committed and tagged in repo as `v3.30.xx-prerel` (RM)
- [ ] All exes added to GitHub releases as `v3.30.xx-prerel` (RM)
- [ ] Announce prerelease (RM)
- [ ] Announce prerelease (RM)-->

## Checklist for before release
- [ ] Manual updated and tagged in repo (EG) - address at least issues with the [`v3.30.xx` release label](add correct link to GitHub issues using filter: is:issue is:open label:"3.30.xx release" when available)
- [ ] Manual added to a GitHub release, include attaching a pdf version (EG)
- [ ] Manual release version on website updated once pdf and html built (EG) (update https://github.com/nmfs-ost/ss3-doc/blob/main/docs/SS330_User_Manual_release.html to the `v3.30.xx` version; update links to link to `v3.30.xx` in https://github.com/nmfs-ost/ss3-doc/blob/main/docs/index.md#links-to-documentation)
- [ ] The following steps should be encompassed in the new manual [release workflow](https://github.com/nmfs-ost/ss3-doc/actions/workflows/release.yml) and [bug fix release workflow](https://github.com/nmfs-ost/ss3-doc/actions/workflows/release_bug_fix.yml) and can be deleted at a future time once the new manual release workflows have been used for a couple releases (EP). **Note that the branch protection rules must be briefly turned off to allow this workflow to run**
- [ ] Manual updated and tagged in repo (EP) - address at least issues with the [`v3.30.xx` release label](add correct link to GitHub issues using filter: is:issue is:open label:"3.30.xx release" when available)
- [ ] Manual added to a GitHub release, include attaching a pdf version (EP)
- [ ] Manual release version on website updated once pdf and html built (EP) (update https://github.com/nmfs-ost/ss3-doc/blob/main/docs/SS330_User_Manual_release.html to the `v3.30.xx` version; update links to link to `v3.30.xx` in https://github.com/nmfs-ost/ss3-doc/blob/main/docs/index.md#links-to-documentation)
- [ ] Make changes to SS3 if any bugs caught in prerelease (RM)
- [ ] [Change log project board](https://github.com/orgs/nmfs-ost/projects/11) updated with any issues labelled "change log" (RM)
- [ ] Code committed and tagged in repo as `v3.30.xx`, which will trigger a GHA to build the release executables (EG) (Instructions on [how to push a a local tag to a remote](https://github.com/nmfs-ost/ss3-source-code/wiki/Stock-Synthesis:-practices-for-maintainers#how-to-push-a-local-tag-up-to-github))
- [ ] Exe and .tpl archived on [Google drive](https://drive.google.com/drive/folders/1Gh_dXi8v3rqawpwn2N6yaaEXZPq6G2io) (EG)
- [ ] All exes added to GitHub releases as `v3.30.xx` (EG) (get exes in the artifacts of the GHA that built the release exes)
- [ ] Send out release announcement msg (RM)
- [ ] Add to release discussion on GitHub repository (EG)
- [ ] Code committed and tagged in repo as `v3.30.xx`, which will trigger a GHA to build the release executables (EP) (Instructions on [how to push a a local tag to a remote](https://github.com/nmfs-ost/ss3-source-code/wiki/Stock-Synthesis:-practices-for-maintainers#how-to-push-a-local-tag-up-to-github))
- [ ] Exe and .tpl archived on [Google drive](https://drive.google.com/drive/folders/1Gh_dXi8v3rqawpwn2N6yaaEXZPq6G2io) (EP)
- [ ] All exes added to GitHub releases as `v3.30.xx` (EP) (get exes in the artifacts of the GHA that built the release exes)
- [ ] Send out release announcement message to the [SS3 forum](https://groups.google.com/g/ss3-forum) (RM)
- [ ] Add to release discussion on GitHub repository (EP)

## Checklist for after release
- [ ] Update user-example models using [this github action](https://github.com/nmfs-ost/ss3-user-examples/blob/main/R/update_examples.R) and tag with new release number after updating (EG)
- [ ] Update test models using [this github action](https://github.com/nmfs-ost/ss3-test-models/actions/workflows/update-ss3-models.yml) and tag with new release number after updating (EG)
- [ ] Update user-example models using [this github action](https://github.com/nmfs-ost/ss3-user-examples/blob/main/R/update_examples.R) and tag with new release number after updating (EP)
- [ ] Update test models using [this github action](https://github.com/nmfs-ost/ss3-test-models/actions/workflows/update-ss3-models.yml) and tag with new release number after updating (EP)
- [ ] Update executables in the [SAC tool](https://github.com/shcaba/SS-DL-tool) (also suggest updating the input files to the .ss_new files (EP/JC)
- [ ] Removed "resolved" tag and close all issues worked in the milestone for this release (RM)
- [ ] Move unworked issues for the release milestone to the next milestone (RM)
21 changes: 21 additions & 0 deletions .github/workflows/add-exe-build-artifacts-to-PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: add-exe-build-artifacts-to-PR
on:
workflow_run:
workflows: [build-ss3]
types: [completed]
workflow_dispatch:

jobs:
artifacts-url-comments:
name: add artifact links to pull request and related issues job
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success'}}
steps:
- name: add artifact links to PR and issues
uses: tonyhallett/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prefix: 'Here are the successful executable builds from your PR:'
format: name
addTo: pullandissues
73 changes: 37 additions & 36 deletions .github/workflows/build-admb-and-ss3-from-source.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Builds the stock synthesis executables for testing and distribution.
# for mac, linux, windows
# Runs on every push and PR (even draft PRs)
# Builds admb from source and then builds the stock synthesis executables from source for testing and distribution.
# for macOS 13 (couldn't get this to run on macOS 12), macOS latest (arm64 architecture), linux, Windows
# Runs on a scheduled basis weekly to ensure that this workflow will work IF the build-ss3.yml workflow stops
# working due to issues with the admb docker image.
name: build-admb-and-ss3-from-source

on:
Expand All @@ -16,7 +17,7 @@ jobs:
matrix:
config:
- {os: windows-latest}
- {os: macos-14}
- {os: macos-latest}
- {os: macos-13}
- {os: ubuntu-latest}
# Limit run time to 90 min to avoid wasting action minutes.
Expand All @@ -28,7 +29,7 @@ jobs:
- uses: actions/checkout@v4

# Set up R
- name: Set up R, specify rtools version and path for windows
- name: Set up R, specify rtools version and path for Windows
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
Expand All @@ -37,50 +38,50 @@ jobs:
update-rtools: TRUE

# Checkout ADMB repository
- name: checkout admb and build from source, windows
- name: Checkout admb
uses: actions/checkout@v4
with:
repository: admb-project/admb
path: admb
ref: admb-13.2

# Build ADMB for Windows
- name: build admb, windows using rtools 42
- name: Build admb for Windows using rtools 42
if: matrix.config.os == 'windows-latest'
run: |
cd admb
make -j 4
shell: cmd

- name: But admb in path
- name: Put admb in path, Windows
if: matrix.config.os == 'windows-latest'
run: |
echo "D:\a\ss3-source-code\ss3-source-code\admb\build\admb\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo $env:GITHUB_PATH
# Build ADMB for macOS
- name: clean, mac
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
- name: Clean, macOS
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
run: cd admb && make clean

- name: see where admb is, mac
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
- name: See where admb is, macOS
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
run: |
ls
cd admb && ls
- name: compile admb, mac
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
- name: Compile admb, macOS
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
run: |
cd admb && make -j 4
- name: see where admb is, mac
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
run: |
cd admb && ls -l
# - name: See where admb is, mac
# if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
# run: |
# cd admb && ls -l

- name: put admb in path, mac
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
- name: Change permissions of admb and put in path, macOS
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
run: |
sudo mv admb /usr/local/bin
sudo chmod 755 /usr/local/bin/admb
Expand All @@ -91,7 +92,7 @@ jobs:
if: matrix.config.os == 'ubuntu-latest'
run: sudo apt-get update

- name: Get admb and put in path, linux
- name: Change permissions of admb and put in path, linux
if: matrix.config.os == 'ubuntu-latest'
run: |
cd admb && make clean
Expand All @@ -104,12 +105,12 @@ jobs:
echo "/usr/local/bin/admb" >> $GITHUB_PATH
# Fetch Tags
- name: Fetch tags
- name: Fetch git tags
run: |
git fetch --tags
git fetch --prune --unshallow || true
- name: Get the last tag on windows
- name: Get the last tag on Windows
id: get-latest-tag-win
if: matrix.config.os == 'windows-latest'
run: |
Expand All @@ -121,17 +122,17 @@ jobs:
echo "tag_commit=${latest_tag_commit}" >> $env:GITHUB_OUTPUT
echo "commit=${latest_commit}" >> $env:GITHUB_OUTPUT
- name: pull the last tag value to use in the Rscript on windows
- name: Pull the last tag value to use in the Rscript on Windows
id: get-version-win
if: matrix.config.os == 'windows-latest'
run: |
Out-File -InputObject ${{ steps.get-latest-tag-win.outputs.tag }} -FilePath .github/last_tag.txt
Out-File -InputObject ${{ steps.get-latest-tag-win.outputs.tag_commit }} -FilePath .github/last_tag_commit.txt
Out-File -InputObject ${{ steps.get-latest-tag-win.outputs.commit}} -FilePath .github/last_commit.txt
- name: Get the last tag on unix
- name: Get the last tag on unix (macOS and linux)
id: get-latest-tag-unix
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13' || matrix.config.os == 'ubuntu-latest'
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13' || matrix.config.os == 'ubuntu-latest'
run: |
git tag
latest_tag=$(git describe --abbrev=0 --tags)
Expand All @@ -141,9 +142,9 @@ jobs:
echo "tag_commit=${latest_tag_commit}" >> $GITHUB_OUTPUT
echo "commit=${latest_commit}" >> $GITHUB_OUTPUT
- name: pull the last tag value to use in the Rscript on unix
- name: Pull the last tag value to use in the Rscript on unix (macOS and linux)
id: get-version-unix
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13' || matrix.config.os == 'ubuntu-latest'
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13' || matrix.config.os == 'ubuntu-latest'
run: |
echo "${{ steps.get-latest-tag-unix.outputs.tag }}" > .github/last_tag.txt
echo "${{ steps.get-latest-tag-unix.outputs.tag_commit }}" > .github/last_tag_commit.txt
Expand Down Expand Up @@ -215,7 +216,7 @@ jobs:
shell: Rscript {0}

# Build SS3 for Windows
- name: Build stock synthesis for windows with admb docker image
- name: Build stock synthesis for Windows
if: matrix.config.os == 'windows-latest'
run: |
cd Compile
Expand All @@ -234,8 +235,8 @@ jobs:
mv SS330/ss3_opt.exe SS330/ss3_opt_win.exe
# Build SS3 for macOS
- name: Build stock synthesis for mac with admb docker image
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
- name: Build stock synthesis for macOS
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
run: |
rm -rf SS330
rm -rf ss3_osx.tar
Expand All @@ -244,22 +245,22 @@ jobs:
/bin/bash ./Make_SS_330_new.sh -b SS330
/bin/bash ./Make_SS_330_new.sh -b SS330 -o
- name: Verify binary on mac
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
- name: Verify binary on macOS
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
run: |
shasum -a 256 SS330/ss3
shasum -a 256 SS330/ss3_opt
- name: Delete unneeded files and change exe names on mac
if: matrix.config.os == 'macos-14' || matrix.config.os == 'macos-13'
- name: Delete unnecessary files and change exe names on macOS
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13'
run: |
cd SS330
rm *.obj *.htp *.cpp ss3_opt.tpl
mv ss3 ss3_osx
mv ss3_opt ss3_opt_osx
# Build SS3 for Linux
- name: Build stock synthesis for linux with p flag and admb docker image
- name: Build stock synthesis for linux with p flag
if: matrix.config.os == 'ubuntu-latest'
run: |
rm -rf SS330
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/build-ss3-warnings.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Build stock synthesis with all c++ compiler warnings, and fail job if the
# number of warnings has increased.
# Build stock synthesis on linux with all c++ compiler warnings, and fail job if the
# number of warnings has increased using the warnings_ss_ref.txt file under
# workflows > reference_files.
# Only runs on a pull request and a push to main if the tpl files have changed
name: build-ss3-warnings

# Controls when the action will run.
Expand Down Expand Up @@ -32,7 +34,7 @@ jobs:
- name: Update Ubuntu packages
run: sudo apt-get update

- name: setup R
- name: Setup R
uses: r-lib/actions/setup-r@v2

# - name: Get admb and put in path, linux
Expand All @@ -42,15 +44,15 @@ jobs:
# sudo chmod 755 /usr/local/bin/admb-13.1/bin/admb
# echo "/usr/local/bin/admb-13.1/bin" >> $GITHUB_PATH

- name: Build stock synthesis with warnings displayed in console using admb docker image
- name: Build stock synthesis with warnings using admb docker image and display in console
run: |
rm -rf SS330
rm -rf ss3_osx.tar
mkdir SS330
chmod 777 SS330
/bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 -w
- name: Build stock synthesis with warnings again to save to file
- name: Build stock synthesis with warnings using admb docker image again to save to file
run: |
rm -rf SS330
rm -rf ss3_osx.tar
Expand All @@ -77,10 +79,10 @@ jobs:
# txt <- txt[(warn_line+1):length(txt)]
shell: Rscript {0}

- name: Print warnings
- name: Print warnings
run: cat warnings_ss.txt

- name: determine if fails/passes
- name: Determine if fails/passes based on the number of warnings
run: |
ref <- readLines(".github/workflows/reference_files/warnings_ss_ref.txt")
n_warn <- read.table("n_warn.txt")
Expand Down
Loading

0 comments on commit cc6d593

Please sign in to comment.