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/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" 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 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). 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