Improve example version instructions. Add info about "lts" if user specifies 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 <dilum@aluthge.com>

* Update action.yml

* update example

* update toc

* npm build

---------

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
This commit is contained in:
Ian Butterworth
2024-07-21 11:11:51 -04:00
committed by GitHub
parent 5956f5ed17
commit 0c4130534d
5 changed files with 29 additions and 14 deletions

View File

@@ -19,7 +19,8 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: 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] julia-arch: [x64, x86]
os: [ubuntu-latest, macOS-latest, windows-latest] os: [ubuntu-latest, macOS-latest, windows-latest]
# 32-bit Julia binaries are not available on macOS # 32-bit Julia binaries are not available on macOS

View File

@@ -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. 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](#table-of-contents) - [setup-julia Action](#setup-julia-action)
- [Usage](#usage) - [Table of Contents](#table-of-contents)
- [Inputs](#inputs) - [Usage](#usage)
- [Outputs](#outputs) - [Inputs](#inputs)
- [Basic](#basic) - [Outputs](#outputs)
- [Julia Versions](#julia-versions) - [Basic](#basic)
- [Matrix Testing](#matrix-testing) - [Julia Versions](#julia-versions)
- [versioninfo](#versioninfo) - [Examples](#examples)
- [Versioning](#versioning) - [Prereleases](#prereleases)
- [Debug logs](#debug-logs) - [Recently released versions](#recently-released-versions)
- [Third party information](#third-party-information) - [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 ## Usage
@@ -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. # Warning: It is strongly recommended to wrap this value in quotes.
# Otherwise, the YAML parser used by GitHub Actions parses certain # Otherwise, the YAML parser used by GitHub Actions parses certain
# versions as numbers which causes the wrong version to be selected. # 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' # Default: '1'
version: '' version: ''

View File

@@ -3,7 +3,7 @@ description: 'Setup a Julia environment and add it to the PATH'
author: 'Sascha Mann' author: 'Sascha Mann'
inputs: inputs:
version: 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' default: '1'
include-all-prereleases: include-all-prereleases:
description: 'Include prereleases when matching the Julia version to available versions.' description: 'Include prereleases when matching the Julia version to available versions.'

3
lib/setup-julia.js generated
View File

@@ -80,6 +80,9 @@ function run() {
if (!versionInput) { // if `versionInput` is an empty string if (!versionInput) { // if `versionInput` is an empty string
throw new Error('Version input must not be null'); 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 if (!originalArchInput) { // if `originalArchInput` is an empty string
throw new Error(`Arch input must not be null`); throw new Error(`Arch input must not be null`);
} }

View File

@@ -53,6 +53,9 @@ async function run() {
if (!versionInput) { // if `versionInput` is an empty string if (!versionInput) { // if `versionInput` is an empty string
throw new Error('Version input must not be null') 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 if (!originalArchInput) { // if `originalArchInput` is an empty string
throw new Error(`Arch input must not be null`) throw new Error(`Arch input must not be null`)
} }