Compare commits

..

31 Commits

Author SHA1 Message Date
dependabot[bot]
155ad93768 Bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 04:11:25 +00:00
Curtis Vogt
8e4b7ee508 Update README example to use actions/checkout@v5 (#62) 2025-08-15 18:25:17 +01:00
dependabot[bot]
a2be14d86d Bump actions/checkout from 4 to 5 (#61)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 15:15:03 +02:00
dependabot[bot]
4ac6b31e10 Bump codecov/codecov-action from 3 to 5 (#57)
* Bump codecov/codecov-action from 3 to 5

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply suggestions from code review

Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
2025-01-10 08:58:09 -06:00
Max Horn
fdc6cd6ae7 README.md: update actions being used (#58) 2024-11-22 06:41:29 -05:00
Venkateshprasad
e3eb439fad fix: install the default registries for version > 1.8 (#55) 2024-11-04 07:17:59 -05:00
dependabot[bot]
d36834d834 Bump julia-actions/setup-julia from 1 to 2 (#53)
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2.
- [Release notes](https://github.com/julia-actions/setup-julia/releases)
- [Commits](https://github.com/julia-actions/setup-julia/compare/v1...v2)

---
updated-dependencies:
- dependency-name: julia-actions/setup-julia
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 00:29:53 -04:00
inky
98b1bc2639 Remove link trailing dot (#51) 2024-01-19 20:59:06 -05:00
dependabot[bot]
cec9c38577 Bump actions/cache from 3 to 4 (#50)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-18 11:23:02 -05:00
Ian Butterworth
90dd6f23eb add suggestion to use cache action if no depot is detected (#41) 2024-01-05 14:39:52 -05:00
dependabot[bot]
d4b940ea5e Bump actions/setup-python from 4 to 5 (#47)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 08:03:57 -05:00
dependabot[bot]
7c82bcb737 Bump actions/checkout from 2 to 4 (#46)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 22:16:39 -05:00
dependabot[bot]
015ebdb7f3 Bump actions/setup-python from 2 to 4 (#43)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 22:08:30 -05:00
dependabot[bot]
b949419b86 Bump actions/cache from 1 to 3 (#44)
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 22:06:30 -05:00
dependabot[bot]
c00cff0b17 Bump codecov/codecov-action from 1 to 3 (#45)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 22:05:40 -05:00
Ian Butterworth
3d96aa283a Create dependabot.yml (#42) 2023-11-21 21:47:00 -05:00
Lukas Grunwald
5484b0e27f Add localregistry input option (#38)
* Add localregistry input option

Option to add local registries to build process by specifying their url (https). Authentication to the repos  via user GitHub token.

* Backward compatible keyword syntax and Wrap new code in VERSION > 1.5

* Update Interface&README, add git_cli amd remove token flag

Provide multiple remotes separated with |
Add example to ReadMe
Support for private repos/packages with SSH protocol

* Update README.md

Co-authored-by: Sascha Mann <git@mail.saschamann.eu>

* Update action.yml

Co-authored-by: Sascha Mann <git@mail.saschamann.eu>

* Print warn mesasge if git_cli = true with Julia<1.7.

* Add `::notice::` formatting

---------

Co-authored-by: Sascha Mann <git@mail.saschamann.eu>
2023-11-08 09:56:55 +01:00
Octogonapus
00f9fd6b26 Add a retry around Pkg.build (#23)
* Add a retry around Pkg.build

* Update action.yml
2023-09-22 11:41:04 +02:00
Fredrik Ekre
72ddd0fcdc Export the JULIA_PKG_SERVER_REGISTRY_PREFERENCE variable for subsequent steps. (#33) 2023-03-13 18:32:34 +01:00
Fredrik Ekre
7c59a056df Revert shortcut for missing deps/build.jl file. (#32) 2023-03-13 13:09:48 +01:00
Fredrik Ekre
fcafde1b68 Use eager Pkg server registry instead of git cloning (#31)
* Use eager Pkg server registry instead of git cloning

This patch removes the git cloning of General and instead uses the eager
registry flavor. In addition, the action exits early if no deps/build.jl
file exist.

* Use env: key instead.
2023-03-13 12:20:47 +01:00
Ian Butterworth
252d4686a5 Fix add_general_registry (#28) 2022-12-20 11:52:13 +01:00
Ian Butterworth
f813042500 Detect if the registry is already installed via tarball (#25) 2022-12-19 01:16:36 +01:00
Ian Butterworth
139ec78da3 Disable autoprecompile by default (#26) 2022-12-17 18:35:44 +01:00
Rik Huijzer
6d50efe063 Suggest using releases instead of master (#18) 2022-02-11 14:40:27 +01:00
Curtis Vogt
f995fa4149 Support setting the Julia project (#15) 2021-07-08 13:01:30 +02:00
Dilum Aluthge
1b0a69ab74 Put the General registry clone inside a bounded retry loop (#13)
Co-authored-by: Sascha Mann <git@mail.saschamann.eu>
2021-01-04 11:30:54 +01:00
Sascha Mann
69b7cba4e2 Add automated backup workflow (#11) 2020-12-19 13:29:12 +01:00
Sascha Mann
3240c50307 [CI] Don't trigger builds on doc changes (#9) 2020-12-15 19:55:59 +01:00
Dilum Aluthge
1b7e283276 Make the @julia-actions/reviewers the global code owners for this repo (#10) 2020-12-14 14:31:09 +01:00
Sascha Mann
fb1158438d Add basic end-to-end test (#8)
(fixes https://github.com/julia-actions/julia-runtest/issues/25)
2020-12-09 00:56:13 +01:00
6 changed files with 221 additions and 21 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @julia-actions/reviewers

12
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Keep dependencies for GitHub Actions up-to-date
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'

33
.github/workflows/backup.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Backup
on:
schedule:
- cron: '5 4 * * 0'
workflow_dispatch:
jobs:
backup:
runs-on: ubuntu-20.04
steps:
- name: Configure cache
uses: actions/cache@v4
with:
path: |
${{ env.GITHUB_WORKSPACE }}
~/.cache/restic
key: ${{ runner.os }}
- name: Install the correct Python version
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Run backup action
uses: julia-actions/restic-action@main
env: # Options: https://restic.readthedocs.io/en/latest/040_backup.html#environment-variables
RESTIC_REPOSITORY: b2:${{ secrets.B2_BUCKET }}:${{ github.repository }}
RESTIC_PASSWORD: ${{ secrets.RESTIC_PASSWORD }}
B2_ACCOUNT_ID: ${{ secrets.B2_ACCOUNT_ID }}
B2_ACCOUNT_KEY: ${{ secrets.B2_ACCOUNT_KEY }}

77
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
name: CI
on:
push:
branches:
- "main"
- "master"
paths-ignore:
- "README.md"
- "LICENSE"
pull_request:
paths-ignore:
- "README.md"
- "LICENSE"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.0"
- "1" # automatically expands to the latest stable 1.x release of Julia
- nightly
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
- x86
pkg-server:
- ""
- "pkg.julialang.org"
# 32-bit Julia binaries are not available on macOS
exclude:
- os: macOS-latest
arch: x86
steps:
- name: Checkout Example.jl
uses: actions/checkout@v5
with:
repository: julia-actions/Example.jl
- name: Verify that test output file does not exist yet
run: test ! -f "$HOME/julia-buildpkg"
shell: bash
- name: Checkout julia-buildpkg
uses: actions/checkout@v5
with:
path: ./.github/actions/julia-buildpkg
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: ./.github/actions/julia-buildpkg
with:
ignore-no-cache: true
env:
JULIA_PKG_SERVER: ${{ matrix.pkg-server }}
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
- name: Verify that test output file exists
run: test -f "$HOME/julia-buildpkg"
shell: bash

View File

@@ -8,7 +8,7 @@ Julia needs to be installed before this action can run. This can easily be achie
And example workflow that uses this action might look like this: And example workflow that uses this action might look like this:
``` ```yaml
name: Run tests name: Run tests
on: [push, pull_request] on: [push, pull_request]
@@ -26,10 +26,46 @@ jobs:
julia-arch: x86 julia-arch: x86
steps: steps:
- uses: actions/checkout@v1.0.0 - uses: actions/checkout@v5
- uses: julia-actions/setup-julia@latest - uses: julia-actions/setup-julia@v2
with: with:
version: ${{ matrix.julia-version }} version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-buildpkg@master - uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@master - uses: julia-actions/julia-runtest@v1
``` ```
### Registry flavor preference
This actions defines (and exports for subsequent steps of the workflow) the
environmental variable `JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager` unless it
is already set. If you want another registry flavor (i.e. `conservative`) this
should be defined in the `env:` section of the relevant workflow or step. See
[Registry flavors](https://pkgdocs.julialang.org/dev/registries/#Registry-flavors)
for more information.
### Adding Local Registries
Personal registries, e.g. created with [LocalRegistry.jl](https://github.com/GunnarFarneback/LocalRegistry.jl), can be added to the CI using the `localregistry` input option. If the personal registry as well as packages needed in the current project are public, no additional setup is required if the registry url is specified in https-format.
If the registry contains private packages, or is itself private, the ssh protocol should to be used. The user has to provide the corresponding private SSH-keys to the `ssh-agent` to access packages and registry. This can be conveniently done using the [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) action. A snippet illustrating the usage of (private) personal registries is shown below
```yaml
...
# Adding private SSH keys (only necessary for accessing private packages and/or
# when providing Registry-link in ssh format)
- uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: |
${{ secrets.PRIVATE_DEPLOY_KEY }}
${{ secrets.PRIVATE_DEPLOY_KEY2 }}
- uses: julia-actions/julia-buildpkg@v1
with:
localregistry: |
https://github.com/username/PersonalRegistry.git
git@github.com:username2/PersonalRegistry2.git
git_cli: false # = JULIA_PKG_USE_CLI_GIT. Options: true | false (default)
...
```
For Julia 1.7 and above, the `git_cli` option can be used to set the `JULIA_PKG_USE_CLI_GIT` [environment flag](https://docs.julialang.org/en/v1/manual/environment-variables/), for additional control of the SSH configuration used by `Pkg` to add/dev packages.

View File

@@ -6,24 +6,65 @@ branding:
icon: 'box' icon: 'box'
color: 'gray-dark' color: 'gray-dark'
inputs:
project:
description: 'Value passed to the --project flag. The default value is the repository root: "@."'
default: '@.'
precompile:
description: 'Whether to allow auto-precompilation (via the `JULIA_PKG_PRECOMPILE_AUTO` env var). Options: yes | no. Default value: no.'
default: 'no'
localregistry:
description: 'Add local registries hosted on GitHub. Specified by providing the url (https/ssh) to the repositories as a newline (\n) seperated list.
User is responsible for setting up the necessary SSH-Keys to access the repositories if necessary.'
default: ''
git_cli:
description: 'Determine if Pkg uses the cli git executable (Julia >= 1.7). Might be necessary for more complicated SSH setups.
Options: true | false. Default : false'
default: 'false'
ignore-no-cache:
description: 'Whether to ignore if there appears to be no depot caching. Silences an action notice recommending `julia-actions/cache`.'
default: 'false'
runs: runs:
using: 'composite' using: 'composite'
steps: steps:
# Occasionally, there are rather large delays (> a few hours) - name: Set and export registry flavor preference
# between the time a package is registered in General and run: echo "JULIA_PKG_SERVER_REGISTRY_PREFERENCE=${JULIA_PKG_SERVER_REGISTRY_PREFERENCE:-eager}" >> ${GITHUB_ENV}
# propagated to pkg.julialang.org. We can avoid this by manually
# cloning ~/.julia/registries/General/ in Julia 1.5 and later.
# See:
# * https://github.com/JuliaLang/Pkg.jl/issues/2011
# * https://github.com/JuliaRegistries/General/issues/16777
# * https://github.com/JuliaPackaging/PkgServer.jl/issues/60
- run: julia --color=yes -e 'using Pkg; VERSION >= v"1.5-" && !isdir(joinpath(DEPOT_PATH[1], "registries", "General")) && Pkg.Registry.add("General")'
shell: bash shell: bash
- run: |
if "${{ inputs.ignore-no-cache }}" == "false" && !isdir(DEPOT_PATH[1])
println("::notice title=[julia-buildpkg] Caching of the julia depot was not detected ::Consider using `julia-actions/cache` to speed up runs https://github.com/julia-actions/cache To ignore, set input `ignore-no-cache: true` ")
end
import Pkg
# Determine if Pkg uses git-cli executable instead of LibGit2
VERSION >= v"1.7-" && (ENV["JULIA_PKG_USE_CLI_GIT"] = ${{ inputs.git_cli }})
if VERSION < v"1.7-" && ${{ inputs.git_cli }} == true
printstyled("::notice::JULIA_PKG_USE_CLI_GIT requires Julia >= 1.7. Using default LibGit2 git-interface instead! \n"; color = :yellow)
end
if VERSION >= v"1.5-"
if VERSION >= v"1.8-"
# Install the default registries
Pkg.Registry.add()
else
Pkg.Registry.add("General")
end
# If provided add local registries
if !isempty("${{ inputs.localregistry }}")
local_repos = split("${{ inputs.localregistry }}", "\n") .|> string
for repo_url in local_repos
isempty(repo_url) && continue
Pkg.Registry.add(Pkg.RegistrySpec(; url = repo_url))
end
end
end
VERSION >= v"1.1.0-rc1" ? retry(Pkg.build)(verbose=true) : retry(Pkg.build)()
shell: julia --color=yes --project=${{ inputs.project }} {0}
env: env:
# We set `JULIA_PKG_SERVER` only for this step to enforce JULIA_PKG_PRECOMPILE_AUTO: "${{ inputs.precompile }}"
# `Pkg.Registry.add` to use Git. This way, Pkg.jl can send GITHUB_TOKEN: ${{ github.token }}
# the request metadata to pkg.julialang.org when installing
# packages via `Pkg.test`.
JULIA_PKG_SERVER: ""
- run: julia --color=yes --project -e 'using Pkg; if VERSION >= v"1.1.0-rc1"; Pkg.build(verbose=true); else Pkg.build(); end'
shell: bash