{"id":14551094,"url":"https://github.com/julia-actions/setup-julia","last_synced_at":"2025-05-15T09:03:08.991Z","repository":{"id":37248469,"uuid":"202020219","full_name":"julia-actions/setup-julia","owner":"julia-actions","description":"This action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.","archived":false,"fork":false,"pushed_at":"2025-05-01T21:04:20.000Z","size":4768,"stargazers_count":97,"open_issues_count":14,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-01T22:20:35.467Z","etag":null,"topics":["actions","continuous-integration","github-action","github-actions","hacktoberfest","julia","julialang"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julia-actions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-12T22:46:13.000Z","updated_at":"2025-05-01T21:03:06.000Z","dependencies_parsed_at":"2024-06-18T12:31:27.888Z","dependency_job_id":"3f75c632-1cf6-4d4d-9c64-0d1761ee3330","html_url":"https://github.com/julia-actions/setup-julia","commit_stats":{"total_commits":295,"total_committers":17,"mean_commits":"17.352941176470587","dds":"0.49830508474576274","last_synced_commit":"887a1b8574e812c7ad0d0f6d38f3e07a96253971"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julia-actions%2Fsetup-julia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julia-actions%2Fsetup-julia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julia-actions%2Fsetup-julia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julia-actions%2Fsetup-julia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julia-actions","download_url":"https://codeload.github.com/julia-actions/setup-julia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310513,"owners_count":22049468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","continuous-integration","github-action","github-actions","hacktoberfest","julia","julialang"],"created_at":"2024-09-06T14:00:26.626Z","updated_at":"2025-05-15T09:03:08.974Z","avatar_url":"https://github.com/julia-actions.png","language":"TypeScript","readme":"# setup-julia Action\n\n[![CodeQL](https://github.com/julia-actions/setup-julia/workflows/CodeQL/badge.svg)](https://securitylab.github.com/tools/codeql)\n\nThis action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.\n\n## Table of Contents\n- [setup-julia Action](#setup-julia-action)\n  - [Table of Contents](#table-of-contents)\n  - [Usage](#usage)\n    - [Inputs](#inputs)\n    - [Outputs](#outputs)\n    - [Basic](#basic)\n    - [Julia Versions](#julia-versions)\n      - [Examples](#examples)\n      - [Prereleases](#prereleases)\n      - [Recently released versions](#recently-released-versions)\n    - [Matrix Testing](#matrix-testing)\n      - [64-bit Julia only](#64-bit-julia-only)\n      - [32-bit Julia](#32-bit-julia)\n    - [versioninfo](#versioninfo)\n  - [Versioning](#versioning)\n  - [Using Dependabot version updates to keep your GitHub Actions up to date](#using-dependabot-version-updates-to-keep-your-github-actions-up-to-date)\n  - [Debug logs](#debug-logs)\n  - [Third party information](#third-party-information)\n  - [Contributing to this repo](#contributing-to-this-repo)\n\n## Usage\n\n### Inputs\n\n```yaml\n- uses: julia-actions/setup-julia@v2\n  with:\n    # The Julia version that will be installed and added as `julia` to the PATH.\n    # See \"Julia Versions\" below for a list of valid values.\n    #\n    # Warning: It is strongly recommended to wrap this value in quotes.\n    #          Otherwise, the YAML parser used by GitHub Actions parses certain\n    #          versions as numbers which causes the wrong version to be selected.\n    #          For example, `1.10` may be parsed as `1.1`.\n    #\n    # Default: '1'\n    version: '1'\n\n    # The architecture of the Julia binaries.\n    #\n    # Please note that installing aarch64 binaries only makes sense on self-hosted aarch64 runners.\n    # We currently don't run test builds on that architecture, so we cannot guarantee that the input won't break randomly,\n    # although there is no reason why it would.\n    #\n    # Supported values: x64 | x86 | aarch64 (untested)\n    #\n    # Note: you can use X64, X86, and ARM64 as synonyms for x64, x86, and aarch64, respectively.\n    #\n    # Specifying 'default' uses the architecture of the runner executing the job.\n    arch: 'default'\n\n    # Set the display setting for printing InteractiveUtils.versioninfo() after installing.\n    #\n    # Starting Julia and running InteractiveUtils.versioninfo() takes a significant amount of time (1s or ~10% of the total build time in testing),\n    # so you may not want to run it in every build, in particular on paid runners, as this cost will add up quickly.\n    #\n    # See \"versioninfo\" below for example usage and further explanations.\n    #\n    # Supported values: true | false | never\n    #\n    # true: Always print versioninfo\n    # false: Only print versioninfo for nightly Julia\n    # never: Never print versioninfo\n    #\n    # Default: false\n    show-versioninfo: 'false'\n\n    # Set the path to the project directory or file to use when resolving some versions (e.g. `min`).\n    #\n    # Defaults to using JULIA_PROJECT if defined, otherwise '.'\n    project: ${{ env.JULIA_PROJECT }} or '.' (if JULIA_PROJECT is unset)\n```\n\n### Outputs\n\n```yaml\noutputs:\n  # The installed Julia version.\n  # May vary from the version input if a version range was given as input.\n  #\n  # Example output: '1.5.3'\n\n  julia-version: ''\n  # Path to the directory containing the Julia executable.\n  # Equivalent to JULIA_BINDIR: https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_BINDIR\n  #\n  # Example output: '/opt/hostedtoolcache/julia/1.5.3/x64/bin'\n  julia-bindir: ''\n```\n\n### Basic\n\n```yaml\nsteps:\n- uses: actions/checkout@v4\n- uses: julia-actions/setup-julia@v2\n  with:\n    version: '1.10'\n- run: julia -e 'println(\"Hello, World!\")'\n```\n\n### Julia Versions\n\nYou can either specify specific Julia versions or version ranges. If you specify a version range, the **highest** available Julia version that matches the range will be selected.\n\n\u003e **Warning**\n\u003e\n\u003e It is strongly recommended to wrap versions in quotes. Otherwise, the YAML parser used by GitHub Actions parses certain versions as numbers which causes the wrong version to be selected. For example, `1.0` may be parsed as `1`.\n\n#### Examples\n\n- `'1.2.0'` is a valid semver version. The action will try to download exactly this version. If it's not available, the build step will fail.\n- `'1.0'` is a version range that will match the highest available Julia version that starts with `1.0`, e.g. `1.0.5`, excluding pre-releases.\n- `'^1.3.0-rc1'` is a **caret** version range that includes pre-releases of `1.3.0` starting at `rc1`. It matches all versions `≥ 1.3.0-rc1` and `\u003c 2.0.0`.\n- `'~1.3.0-rc1'` is a **tilde** version range that includes pre-releases of `1.3.0` starting at `rc1`. It matches all versions `≥ 1.3.0-rc1` and `\u003c 1.4.0`.\n- `'^1.3.0-0'` is a **caret** version range that includes _all_ pre-releases of `1.3.0`. It matches all versions `≥ 1.3.0-` and `\u003c 2.0.0`.\n- `'~1.3.0-0'` is a **tilde** version range that includes _all_ pre-releases of `1.3.0`. It matches all versions `≥ 1.3.0-` and `\u003c 1.4.0`.\n- `'1'` will install the latest v1 version of Julia.\n- `'lts'` will install the latest LTS build.\n- `'pre'` will install the latest prerelease build (RCs, betas, and alphas).\n- `'nightly'` will install the latest nightly build.\n- `'1.7-nightly'` will install the latest nightly build for the upcoming 1.7 release. This version will only be available during certain phases of the Julia release cycle.\n- `'min'` will install the earliest supported version of Julia compatible with the project. Especially useful in monorepos.\n\nInternally the action uses node's semver package to resolve version ranges. Its [documentation](https://github.com/npm/node-semver#advanced-range-syntax) contains more details on the version range syntax. You can test what version will be selected for a given input in this JavaScript [REPL](https://repl.it/@SaschaMann/setup-julia-version-logic).\n\n#### Prereleases\n\nThere are two methods of including pre-releases in version matching:\n\n1. Including the pre-release tag in the version itself, e.g. `'^1.3.0-rc1'`.\n2. Setting the input `include-all-prereleases` to `true`.\n\nThese behave slightly differently.\n\n1. If the version `a.b.c` contains pre-release tag, all pre-releases of version `a.b.c` will be included in the version matching.\nFor example, `^1.3.0-rc1` would match `1.3.0-rc2` but would **not** match `1.4.0-rc1` once released.\n2. If `include-preleases` is set to true, **all** pre-releases of all versions will be included in the version matching. In this case, `^1.3.0-rc1` would match `1.4.0-rc1` once released.\n\n**Example:** Without `include-all-prereleases: true`, the version `^1.3.0-rc1` would match `1.3.0-rc1`, `1.3.0-rc2`, `1.3.0`, `1.4.0` once they are released.\nWith `include-all-prereleases: true`, it would match `1.3.0-rc1`, `1.3.0-rc2`, `1.3.0`, `1.4.0-rc1`, `1.4.0`.\n\nIf you want to run tests against the latest tagged version, no matter what version that is, you can use\n\n```yaml\n- uses: julia-actions/setup-julia@v2\n  with:\n    version: '1'\n    include-all-prereleases: true\n```\n\n#### Recently released versions\n\nThe available Julia versions are pulled from [`versions.json`](https://julialang-s3.julialang.org/bin/versions.json).\n\n### Matrix Testing\n\n`bash` is chosen as shell to enforce consistent behaviour across operating systems. [Other shells](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell) are available but you may have to escape quotation marks or otherwise adjust the syntax.\n\n#### 64-bit Julia only\n\n```yaml\njobs:\n  test:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']\n        os: [ubuntu-latest, windows-latest, macOS-latest]\n\n    steps:\n      - uses: actions/checkout@v4\n      - name: \"Set up Julia\"\n        uses: julia-actions/setup-julia@v2\n        with:\n          version: ${{ matrix.julia-version }}\n      - run: julia -e 'println(\"Hello, World!\")'\n        shell: bash\n```\n\n#### 32-bit Julia\n\n```yaml\njobs:\n  test:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']\n        julia-arch: [x64, x86, aarch64]\n        os: [ubuntu-latest, windows-latest, macOS-latest]\n        # exclude unavailable/unwanted architectures\n        exclude:\n          - os: macOS-latest\n            julia-arch: x86\n          - os: macOS-latest\n            julia-arch: x64 # can be run but via rosetta on apple silicon runners\n          - os: ubuntu-latest\n            julia-arch: aarch64\n          - os: windows-latest\n            julia-arch: aarch64\n\n    steps:\n      - uses: actions/checkout@v4\n      - name: \"Set up Julia\"\n        uses: julia-actions/setup-julia@v2\n        with:\n          version: ${{ matrix.julia-version }}\n          arch: ${{ matrix.julia-arch }}\n      - run: julia -e 'println(\"Hello, World!\")'\n        shell: bash\n```\n\nAlternatively, you can include specific version and OS combinations that will use 32-bit Julia:\n\n```yaml\njobs:\n  test:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']\n        os: [ubuntu-latest, windows-latest, macOS-latest]\n        # Additionally create a job using 32-bit Julia 1.0.4 on windows-latest\n        include:\n          - os: windows-latest\n            julia-version: ['1.0.4']\n            julia-arch: x86\n\n    steps:\n      - uses: actions/checkout@v4\n      - name: \"Set up Julia\"\n        uses: julia-actions/setup-julia@v2\n        with:\n          version: ${{ matrix.julia-version }}\n      - run: julia -e 'println(\"Hello, World!\")'\n        shell: bash\n```\n\n### versioninfo\n\nBy default, only the output of `julia --version` is printed as verification that Julia has been installed for stable versions of Julia.\n`InteractiveUtils.versioninfo()` is run by default for nightly builds.\n\nStarting Julia and printing the full versioninfo takes a significant amount of time (1s or ~10% of the total build time in testing), so you may not want to run it in every build, in particular on paid runners as this cost will add up quickly.\nHowever, `julia --version` does not provide sufficient information to know which commit a nightly binary was built from, therefore it is useful to show the full versioninfo on nightly builds regardless.\n\nYou can override this behaviour by changing the input to `never` if you never want to run `InteractiveUtils.versioninfo()` or to `true` if you always want to run `InteractiveUtils.versioninfo()`, even on stable Julia builds.\n\n## Versioning\n\nThis action follows [GitHub's advice](https://help.github.com/en/articles/about-actions#versioning-your-action) on versioning actions, with an additional `latest` tag.\n\nIf you don't want to deal with updating the version of the action, similiarly to how Travis CI handles it, use `latest` or major version branches. [Dependabot](https://dependabot.com/) can also be used to automatically create Pull Requests to update actions used in your workflows.\n\nIt's unlikely, but not impossible, that there will be breaking changes post-v2.0.0 unless a new major version of Julia is introduced.\n\nYou can specify commits, branches or tags in your workflows as follows:\n\n```yaml\nsteps:\n  - uses: julia-actions/setup-julia@f2258781c657ad9b4b88072c5eeaf9ec8c370874 # commit SHA of the tagged 2.0.0 commit\n  - uses: julia-actions/setup-julia@latest  # latest version tag (may break existing workflows)\n  - uses: julia-actions/setup-julia@v2      # major version tag\n  - uses: julia-actions/setup-julia@v2.0    # minor version tag\n  - uses: julia-actions/setup-julia@v2.0.0  # specific version tag\n```\n\nIf your workflow requires access to secrets, you should always pin it to a commit SHA instead of a tag.\nThis will protect you in case a bad actor gains access to the setup-julia repo.\nYou can find more information in [GitHub's security hardening guide](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions).\n\n## Using Dependabot version updates to keep your GitHub Actions up to date\n\nWe highly recommend that you set up Dependabot version updates on your repo to keep your GitHub Actions up to date.\n\nTo set up Dependabot version updates, create a file named `.github/dependabot.yml` in your repo with the following contents:\n\n```yaml\nversion: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"monthly\"\n    open-pull-requests-limit: 99\n    labels:\n      - \"dependencies\"\n      - \"github-actions\"\n```\n\nFor more details on Dependabot version updates, see the [GitHub Dependabot documentation](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates).\n\n## Debug logs\n\nYou can enable [Step Debug Logs](https://github.com/actions/toolkit/blob/main/docs/action-debugging.md#step-debug-logs) for more detailed logs.\nNote that when debug logs are enabled, a request will be sent to `https://httpbin.julialang.org/ip` and the runner's IP will be printed to the debug logs.\n\n## Third party information\nParts of this software have been derived from other open source software.\nSee [THIRD_PARTY_NOTICE.md](THIRD_PARTY_NOTICE.md) for details.\n\n## Contributing to this repo\n\nPlease see the README in the [`devdocs/`](devdocs/) folder.\n","funding_links":[],"categories":["Recently Updated","Official Resources"],"sub_categories":["[Sep 02, 2024](/content/2024/09/02/README.md)","Official Actions"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulia-actions%2Fsetup-julia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulia-actions%2Fsetup-julia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulia-actions%2Fsetup-julia/lists"}