From 2535bc7be759028adc100600ea0c0943a10be3c0 Mon Sep 17 00:00:00 2001 From: Alexius Wadell Date: Mon, 22 Aug 2022 17:54:47 -0400 Subject: [PATCH 1/4] Fix GitHub Action recipe Need to tag latest version, plus fix typo in github action recipe --- .github/workflows/CI.yml | 5 ++--- .github/workflows/TagBot.yml | 2 ++ .github/workflows/tag-latest.yml | 14 ++++++++++++++ docs/src/ci.md | 8 ++++---- 4 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/tag-latest.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6fad861..151b9df 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,9 +10,8 @@ jobs: fail-fast: false matrix: version: - - '1' # Latest v1 release - - '1.6' # Current LTS version - - nightly + - '*' # Latest Release + - '~1.6' # Current LTS os: - ubuntu-latest - windows-latest diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..efaa0a7 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,8 @@ on: types: - created workflow_dispatch: +permissions: + contents: write jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' diff --git a/.github/workflows/tag-latest.yml b/.github/workflows/tag-latest.yml new file mode 100644 index 0000000..16714ed --- /dev/null +++ b/.github/workflows/tag-latest.yml @@ -0,0 +1,14 @@ +name: Add latest tag to new release +on: + release: + types: [published] + +jobs: + run: + name: Run local action + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Run latest-tag + uses: EndBug/latest-tag@8b12061830221b438839f7048d1320ac353926aa diff --git a/docs/src/ci.md b/docs/src/ci.md index 217dd8c..c08edc7 100644 --- a/docs/src/ci.md +++ b/docs/src/ci.md @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@latest - - uses: awadell1/PkgJogger + - uses: awadell1/PkgJogger.jl@latest - uses: actions/upload-artifact@v2 with: name: benchmarks @@ -37,9 +37,9 @@ jobs: PkgJogger will create a temporary environment with the following: 1) Activate a temporary Julia environment for benchmarking. - - If a Julia project file exists in `benchmark/`, it will be copied to the - temporary environment. Manifest files are currently ignored. - - Otherwise, an empty environment is created. + - If a Julia project file exists in `benchmark/`, it will be copied to the + temporary environment. Manifest files are currently ignored. + - Otherwise, an empty environment is created. 2) Add the current project (via `Pkg.develop`) to the benchmarking environment and resolve dependencies using [`PRESEVE_NONE`](https://pkgdocs.julialang.org/v1/api/#Pkg.add). From a08c1c2f3a75e101f1f5410c66b23d38876625e9 Mon Sep 17 00:00:00 2001 From: Alexius Wadell Date: Tue, 23 Aug 2022 10:53:04 -0400 Subject: [PATCH 2/4] Install PkgJogger in a temporary environment For self-hosted runners, not doing this results in PkgJogger being installed in the user's global environment --- action.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index cf65b0d..9ff7c2b 100644 --- a/action.yml +++ b/action.yml @@ -19,12 +19,23 @@ inputs: runs: using: composite steps: - - id: install_pkgjogger - run: julia --color=yes --eval + - name: ๐Ÿƒ Install PkgJogger + id: install_pkgjogger + run: > + PKG_JOGGER_ENV=$(mktemp --directory); + echo "::set-output name=env::$(echo $PKG_JOGGER_ENV)"; + julia --color=yes --project="$PKG_JOGGER_ENV" --eval 'using Pkg; Pkg.develop(name="PkgJogger", path="${{ github.action_path }}")' shell: bash - - id: run_benchmarks - run: ${{ inputs.prefix }} julia --color=yes ${{ inputs.options }} --eval - 'using Pkg, PkgJogger; PkgJogger.ci()' + - name: โฑ Run Benchmarks + id: run_benchmarks + run: > + ${{ inputs.prefix }} julia --project="${{ steps.install_pkgjogger.outputs.env }}" --color=yes + ${{ inputs.options }} --eval 'using PkgJogger; PkgJogger.ci()' + shell: bash + + - name: ๐Ÿงน Cleanup PkgJogger + id: Cleanup + run: rm -rf "${{ steps.install_pkgjogger.outputs.env }}" shell: bash From bf048b37c1de0876a8e9adb992ca80b06b541e14 Mon Sep 17 00:00:00 2001 From: Alexius Wadell Date: Wed, 24 Aug 2022 09:59:27 -0400 Subject: [PATCH 3/4] Add this instance of PkgJogger to the sandbox Presently will install the latest version of PkgJogger, not this instance of the package. --- src/ci.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ci.jl b/src/ci.jl index bf08c10..3bdfb1d 100644 --- a/src/ci.jl +++ b/src/ci.jl @@ -53,6 +53,7 @@ function sandbox(f, pkg) self = PackageSpec( name = JOGGER_PKGS[1].name, uuid = JOGGER_PKGS[1].uuid, + path = Base.pkgdir(PkgJogger), ) # Locate benchmark project From 0aafbf4a140ab748ea142dabde8a862ddc32da3c Mon Sep 17 00:00:00 2001 From: Alexius Wadell Date: Wed, 24 Aug 2022 10:06:08 -0400 Subject: [PATCH 4/4] Bump patch number --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d2ece2e..58e73ea 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PkgJogger" uuid = "10150987-6cc1-4b76-abee-b1c1cbd91c01" authors = ["Alexius Wadell and contributors"] -version = "0.4.0" +version = "0.4.1" [deps] BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"