Update RDME #26
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
name: PR Checks | |
on: | |
pull_request: | |
branches: | |
- 'release-*' | |
- 'dev-*' | |
paths-ignore: # and possibly more to ignore (eg. README), check what happens if there is a change to more than just these ignored files | |
- 'VERSION' | |
- 'CHECKSUM' | |
jobs: | |
repro-ci: | |
# run the given config and upload the checksums | |
uses: codegat-test-org/actions/.github/workflows/checks.yml@main | |
with: | |
model-name: access-om2 | |
environment-name: test | |
config-tag: ${{ github.ref_name }} | |
check-repro: | |
# compare the uploaded checksum with the ground truth | |
name: Check and Update Checksum | |
needs: | |
- repro-ci | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
CHECKSUM_LOCAL_LOCATION: /opt/checksums | |
outputs: | |
result: ${{ steps.check.outputs.result }} | |
ground-truth-version: ${{ steps.check.outputs.ground-truth-version }} | |
steps: | |
- name: Download Newly Created Checksum | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ needs.repro-ci.outputs.artifact-name }} | |
path: ${{ env.CHECKSUM_LOCAL_LOCATION }} | |
- name: Checkout Last Config at ${{ github.base_ref }} | |
# This is used to have a link to correct config branch to find | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Check Reproducibility | |
id: check | |
uses: codegat-test-org/actions/.github/actions/checksum-check@main | |
with: | |
checksum-location: ${{ env.CHECKSUM_LOCAL_LOCATION }} | |
- name: Move, Commit and Push Updated Checksum | |
if: steps.check.outputs.result == 'false' | |
env: | |
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
run: | | |
mv ${{ env.CHECKSUM_LOCAL_LOCATION }}/CHECKSUM CHECKSUM | |
git checkout ${{ github.head_ref }} | |
git status | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git commit -am "Updated Checksums as part of ${{ env.RUN_URL }}" | |
git log | |
git push | |
result: | |
name: Reproduction Result Notifier | |
needs: | |
- check-repro | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: test checking conditions | |
run: echo "result=${{ needs.check-repro.outputs.result }} at ${{ needs.check-repro.outputs.ground-truth-version }}, ref_name=${{ github.ref_name }}" | |
- name: Successful Release Comment | |
if: needs.check-repro.outputs.result == 'true' && startsWith(github.base_ref, 'release-') | |
uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308 #v2.4.3 | |
with: | |
message: | | |
:white_check_mark: The Bitwise Reproducibility check succeeded when comparing against ${{ needs.check-repro.outputs.ground-truth-version }} for this Release config. :white_check_mark: | |
Consider bumping the minor version of access-om2. | |
To bump the version, comment `!bump minor`. | |
- name: Successful Dev Comment | |
if: needs.check-repro.outputs.result == 'true' && startsWith(github.base_ref, 'dev-') | |
uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308 #v2.4.3 | |
with: | |
message: | | |
:white_check_mark: The Bitwise Reproducibility check succeeded when comparing against ${{ needs.check-repro.outputs.ground-truth-version }} for this Dev config. :white_check_mark: | |
- name: Failed Release Comment | |
if: needs.check-repro.outputs.result == 'false' && startsWith(github.base_ref, 'release-') | |
uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308 #v2.4.3 | |
with: | |
message: | | |
:x: The Bitwise Reproducibility check failed when comparing against ${{ needs.check-repro.outputs.ground-truth-version }} for this Release config. :x: | |
Consider bumping the major version of access-om2 to account for this. | |
To bump the version, comment `!bump major`. | |
- name: Failed Dev Comment | |
if: needs.check-repro.outputs.result == 'failed' && startsWith(github.base_ref, 'dev-') | |
uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308 #v2.4.3 | |
with: | |
message: | | |
:warning: The Bitwise Reproducibility check failed when comparing against ${{ needs.check-repro.outputs.ground-truth-version }} for this Dev config. :warning: |