Skip to content

Commit

Permalink
Improve example version instructions. Add info about "lts" if user sp…
Browse files Browse the repository at this point in the history
…ecifies 1.6 explicitly (#265)

* improve example versions and note

* add info if user explicitly sets version to 1.6

* npm run build

* add 1.6 explicitly to CI

* convert to a github actions notice

* try core.notice

* npm run build

* Apply suggestions from code review

Co-authored-by: Dilum Aluthge <[email protected]>

* Update action.yml

* update example

* update toc

* npm build

---------

Co-authored-by: Dilum Aluthge <[email protected]>
  • Loading branch information
IanButterworth and DilumAluthge committed Jul 21, 2024
1 parent 5956f5e commit 0c41305
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/example-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
strategy:
fail-fast: false
matrix:
julia-version: ['1.0.5', '1.2', '^1.5.0-beta1', '1', 'lts', 'pre']
# include '1.6' here to test info message about lts tag existing
julia-version: ['1.0.5', '1.2', '^1.5.0-beta1', '1', '1.6', 'lts', 'pre']
julia-arch: [x64, x86]
os: [ubuntu-latest, macOS-latest, windows-latest]
# 32-bit Julia binaries are not available on macOS
Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,25 @@
This action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.

## Table of Contents
- [Table of Contents](#table-of-contents)
- [Usage](#usage)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Basic](#basic)
- [Julia Versions](#julia-versions)
- [Matrix Testing](#matrix-testing)
- [versioninfo](#versioninfo)
- [Versioning](#versioning)
- [Debug logs](#debug-logs)
- [Third party information](#third-party-information)
- [setup-julia Action](#setup-julia-action)
- [Table of Contents](#table-of-contents)
- [Usage](#usage)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Basic](#basic)
- [Julia Versions](#julia-versions)
- [Examples](#examples)
- [Prereleases](#prereleases)
- [Recently released versions](#recently-released-versions)
- [Matrix Testing](#matrix-testing)
- [64-bit Julia only](#64-bit-julia-only)
- [32-bit Julia](#32-bit-julia)
- [versioninfo](#versioninfo)
- [Versioning](#versioning)
- [Using Dependabot version updates to keep your GitHub Actions up to date](#using-dependabot-version-updates-to-keep-your-github-actions-up-to-date)
- [Debug logs](#debug-logs)
- [Third party information](#third-party-information)
- [Contributing to this repo](#contributing-to-this-repo)

## Usage

Expand All @@ -30,7 +38,7 @@ This action sets up a Julia environment for use in actions by downloading a spec
# Warning: It is strongly recommended to wrap this value 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`.
# For example, `1.10` may be parsed as `1.1`.
#
# Default: '1'
version: ''
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'Setup a Julia environment and add it to the PATH'
author: 'Sascha Mann'
inputs:
version:
description: 'The Julia version to download (if necessary) and use. Example: 1.0.4'
description: 'The Julia version to download (if necessary) and use. Use a string input to avoid unwanted decimal conversion e.g. 1.10 without quotes will be interpreted as 1.1. Examples: "1", "1.10", "lts", "pre"'
default: '1'
include-all-prereleases:
description: 'Include prereleases when matching the Julia version to available versions.'
Expand Down
3 changes: 3 additions & 0 deletions lib/setup-julia.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/setup-julia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ async function run() {
if (!versionInput) { // if `versionInput` is an empty string
throw new Error('Version input must not be null')
}
if (versionInput == '1.6') {
core.notice('[setup-julia] If you are testing 1.6 as a Long Term Support (lts) version, consider using the new "lts" version specifier instead of "1.6" explicitly, which will automatically resolve the current lts.')
}
if (!originalArchInput) { // if `originalArchInput` is an empty string
throw new Error(`Arch input must not be null`)
}
Expand Down

0 comments on commit 0c41305

Please sign in to comment.