diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 701ce5a7dd9..e3fcd7dd85b 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -344,21 +344,23 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + # one at a time + head="compat" + id=$(gh pr list -H $head -s open --json id -q ".[0].id") + [[ -n "${id// /}" ]] && (echo "PR already open"; exit 0) || (echo "opening PR") + # setup bot user git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" # create new branch - now=$(date +'%Y-%m-%dT%H-%M-%S') - updated_branch="compat_$now" - default_branch="${{ github.event.repository.default_branch }}" - git switch -c "$updated_branch" + git switch -c "$head" - # commit wide CSVs and Markdown tables and push branch + # commit and push git add DEVELOPER.md .github/compat/comp.csv .github/compat/test.csv git commit -m "Update compatibility tables" - git push -u origin "$updated_branch" + git push -u origin "$head" # open PR cat <(echo '### Compile') <(echo) .github/compat/comp.md <(echo) <(echo '### Test') <(echo) .github/compat/test.md > compat.md - gh pr create -B "$default_branch" -H "$updated_branch" --title "Update compile/test compatibility tables" --body-file compat.md \ No newline at end of file + gh pr create -B "${{ github.event.repository.default_branch }}" -H "$head" --title "Update compile/test compatibility tables" --body-file compat.md \ No newline at end of file diff --git a/distribution/build_dist.py b/distribution/build_dist.py index 68c454ec650..3c9e490b7f4 100644 --- a/distribution/build_dist.py +++ b/distribution/build_dist.py @@ -304,29 +304,29 @@ def build_distribution( shutil.copy(_project_root_path / "code.json", output_path) # full releases include examples, source code, makefiles and docs - if full: - # examples - setup_examples( - bin_path=output_path / "bin", - examples_path=output_path / "examples", - overwrite=overwrite, - ) + if not full: + return + + # examples + setup_examples( + bin_path=output_path / "bin", + examples_path=output_path / "examples", + overwrite=overwrite, + ) - # copy source code files - copy_sources(output_path=output_path) + # copy source code files + copy_sources(output_path=output_path) - # build and copy makefiles - build_makefiles(output_path=output_path) + # build and copy makefiles + build_makefiles(output_path=output_path) - # docs - build_documentation( - bin_path=output_path / "bin", - output_path=output_path / "doc", - examples_repo_path=examples_repo_path, - # benchmarks_path=_benchmarks_path / "run-time-comparison.md", - full=full, - overwrite=overwrite, - ) + # docs + build_documentation( + bin_path=output_path / "bin", + full=full, + output_path=output_path / "doc", + overwrite=overwrite, + ) @requires_exe("pdflatex") diff --git a/distribution/check_dist.py b/distribution/check_dist.py index 6248204c306..87c545469d5 100644 --- a/distribution/check_dist.py +++ b/distribution/check_dist.py @@ -75,19 +75,18 @@ def test_sources(dist_dir_path, releasemode, full): if not full: pytest.skip(reason="sources not included in minimal distribution") + assert (dist_dir_path / "meson.build").is_file() + assert (dist_dir_path / "meson.options").is_file() assert (dist_dir_path / "src").is_dir() assert (dist_dir_path / "src" / "mf6.f90").is_file() - version_file_path = dist_dir_path / "src" / "Utilities" / "version.f90" assert version_file_path.is_file() - # find IDEVELOPMODE line + # check IDEVELOPMODE lines = open(version_file_path, "r").read().splitlines() pattern = ":: IDEVELOPMODE =" line = next(iter([l for l in lines if pattern in l]), None) assert line - - # make sure IDEVELOPMODE was set correctly idevelopmode = 0 if releasemode else 1 assert f"IDEVELOPMODE = {idevelopmode}" in line