-
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 pull request #11 from jmurphy6895/chore-update-CI
Chore update ci
- Loading branch information
Showing
29 changed files
with
1,441 additions
and
458 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,10 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
ignore: | ||
- dependency-name: "crate-ci/typos" | ||
update-types: ["version-update:semver-patch", "version-update:semver-minor"] |
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,54 @@ | ||
name: performance tracking | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
performance-tracking: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# setup | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: 'nightly' | ||
- uses: julia-actions/julia-buildpkg@latest | ||
- name: install dependencies | ||
run: julia -e 'using Pkg; pkg"add PkgBenchmark [email protected]"' | ||
|
||
# run the benchmark suite | ||
- name: run benchmarks | ||
run: | | ||
julia -e ' | ||
using BenchmarkCI | ||
BenchmarkCI.judge() | ||
BenchmarkCI.displayjudgement() | ||
' | ||
# generate and record the benchmark result as markdown | ||
- name: generate benchmark result | ||
run: | | ||
body=$(julia -e ' | ||
using BenchmarkCI | ||
let | ||
judgement = BenchmarkCI._loadjudge(BenchmarkCI.DEFAULT_WORKSPACE) | ||
title = "AstroForceModel Benchmark Result" | ||
ciresult = BenchmarkCI.CIResult(; judgement, title) | ||
BenchmarkCI.printcommentmd(stdout::IO, ciresult) | ||
end | ||
') | ||
body="${body//'%'/'%25'}" | ||
body="${body//$'\n'/'%0A'}" | ||
body="${body//$'\r'/'%0D'}" | ||
echo $body > ./benchmark-result.artifact | ||
# record the pull request number | ||
- name: record pull request number | ||
run: echo ${{ github.event.pull_request.number }} > ./pull-request-number.artifact | ||
|
||
# save as artifacts (performance tracking (comment) workflow will use it) | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: perforamance-tracking | ||
path: ./*.artifact |
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,63 @@ | ||
# To workaroud https://github.com/actions/first-interaction/issues/10 in a secure way, | ||
# we take the following steps to generate and comment a performance benchmark result: | ||
# 1. first "performance tracking" workflow will generate the benchmark results in an unprivileged environment triggered on `pull_request` event | ||
# 2. then this "performance tracking (comment)" workflow will show the result to us as a PR comment in a privileged environment | ||
# Note that this workflow can only be modifed by getting checked-in to the default branch | ||
# and thus is secure even though this workflow is granted with write permissions, etc. | ||
# xref: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
|
||
name: performance tracking (comment) | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- performance tracking | ||
types: | ||
- completed | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
if: > | ||
${{ github.event.workflow_run.event == 'pull_request' && | ||
github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# restore records from the artifacts | ||
- uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: benchmark.yml | ||
name: perforamance-tracking | ||
workflow_conclusion: success | ||
- name: output benchmark result | ||
id: output-result-markdown | ||
run: | | ||
echo ::set-output name=body::$(cat ./benchmark-result.artifact) | ||
- name: output pull request number | ||
id: output-pull-request-number | ||
run: | | ||
echo ::set-output name=body::$(cat ./pull-request-number.artifact) | ||
# check if the previous comment exists | ||
- name: find comment | ||
uses: peter-evans/find-comment@v3 | ||
id: fc | ||
with: | ||
issue-number: ${{ steps.output-pull-request-number.outputs.body }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: AstroForceModel Benchmark Result | ||
|
||
# create/update comment | ||
- name: create comment | ||
if: ${{ steps.fc.outputs.comment-id == 0 }} | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
issue-number: ${{ steps.output-pull-request-number.outputs.body }} | ||
body: ${{ steps.output-result-markdown.outputs.body }} | ||
- name: update comment | ||
if: ${{ steps.fc.outputs.comment-id != 0 }} | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
body: ${{ steps.output-result-markdown.outputs.body }} |
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 |
---|---|---|
|
@@ -18,7 +18,6 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
version: | ||
- '1.9' | ||
- '1.10' | ||
- 'nightly' | ||
os: | ||
|
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,40 @@ | ||
name: Invalidations | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: always. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
evaluate: | ||
# Only run on PRs to the default branch. | ||
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch | ||
if: github.base_ref == github.event.repository.default_branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: '1' | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-invalidations@v1 | ||
id: invs_pr | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.repository.default_branch }} | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-invalidations@v1 | ||
id: invs_default | ||
|
||
- name: Report invalidation counts | ||
run: | | ||
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY | ||
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY | ||
- name: Check if the PR does increase number of invalidations | ||
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total | ||
run: exit 1 |
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,13 @@ | ||
name: Spell Check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
typos-check: | ||
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
- name: Check spelling | ||
uses: crate-ci/[email protected] |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
/Manifest.toml | ||
/docs/Manifest.toml | ||
/.vscode/* |
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 |
---|---|---|
@@ -1,35 +1,38 @@ | ||
name = "HAMMERHEAD" | ||
name = "AstroPropagators" | ||
uuid = "7f2154ff-9684-4686-a457-9182f50d0f5b" | ||
authors = ["Jordan Murphy"] | ||
version = "1.0.0-DEV" | ||
version = "0.1.0" | ||
|
||
[deps] | ||
AngleBetweenVectors = "ec570357-d46e-52ed-9726-18773498274d" | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" | ||
AstroForceModels = "077569d7-e100-45f3-83e3-c646e23345bd" | ||
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
SatelliteToolboxAtmosphericModels = "5718ef0a-a30f-426d-bcd9-4cf31dd12909" | ||
SatelliteToolboxBase = "9e17983a-0463-41a7-9a16-1682db6d8b66" | ||
SatelliteToolboxGravityModels = "bd9e9728-6f7b-4d28-9e50-c765cb1b7c8c" | ||
SatelliteToolboxTransformations = "6b019ec1-7a1e-4f04-96c7-a9db1ca5514d" | ||
SpaceIndices = "5a540a4e-639f-452a-b107-23ea09ed4d36" | ||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
ValSplit = "0625e100-946b-11ec-09cd-6328dd093154" | ||
Reexport = "189a3867-3050-52da-a836-e630ba90ab69" | ||
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" | ||
|
||
[compat] | ||
AngleBetweenVectors = "0.3" | ||
ForwardDiff = "0.10" | ||
SatelliteToolboxAtmosphericModels = "0.1" | ||
SatelliteToolboxBase = "0.3" | ||
AstroForceModels = "0.3.3" | ||
Aqua = "0.8" | ||
ComponentArrays = "0.15" | ||
LinearAlgebra = "1" | ||
OrdinaryDiffEqAdamsBashforthMoulton = "1.1" | ||
OrdinaryDiffEqCore = "1.6" | ||
Reexport = "1.2" | ||
SatelliteToolboxGravityModels = "0.1" | ||
SatelliteToolboxTransformations = "0.1" | ||
SpaceIndices = "1" | ||
StaticArrays = "1" | ||
ValSplit = "0.1" | ||
julia = "1.9" | ||
StaticArraysCore = "1" | ||
Test = "1" | ||
julia = "1.10" | ||
|
||
[extras] | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
OrdinaryDiffEqAdamsBashforthMoulton = "89bda076-bce5-4f1c-845f-551c83cdda9a" | ||
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" | ||
SatelliteToolboxGravityModels = "bd9e9728-6f7b-4d28-9e50-c765cb1b7c8c" | ||
SatelliteToolboxTransformations = "6b019ec1-7a1e-4f04-96c7-a9db1ca5514d" | ||
SpaceIndices = "5a540a4e-639f-452a-b107-23ea09ed4d36" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test"] | ||
test = ["Aqua", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqCore", "SatelliteToolboxGravityModels", "SatelliteToolboxTransformations", "SpaceIndices", "Test"] |
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.
51301f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register()
51301f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/115515
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: