mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 11:06:53 +08:00
Compare commits
22 Commits
releases/v
...
v2.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
780022b48d | ||
|
|
3bc2a872da | ||
|
|
0c4130534d | ||
|
|
5956f5ed17 | ||
|
|
a9e17d5c78 | ||
|
|
f2f2b89a9f | ||
|
|
f9eef78196 | ||
|
|
3511533b57 | ||
|
|
8db9e52340 | ||
|
|
1da1716a18 | ||
|
|
7653693003 | ||
|
|
e1580df3b6 | ||
|
|
ba42af3a54 | ||
|
|
4778d3d0c8 | ||
|
|
c7aa298e32 | ||
|
|
cae3c21ea1 | ||
|
|
389de5c0df | ||
|
|
42e03d3446 | ||
|
|
e62bf8c418 | ||
|
|
30038810d2 | ||
|
|
0e4b558b25 | ||
|
|
3599cbd45f |
4
.github/workflows/checkin.yml
vendored
4
.github/workflows/checkin.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: '.tool-versions'
|
||||
|
||||
- name: "npm ci"
|
||||
run: npm ci
|
||||
@@ -31,6 +31,6 @@ jobs:
|
||||
# Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
|
||||
run: |
|
||||
git diff --exit-code --stat -- . ':!node_modules' \
|
||||
|| (echo "##[error] found changed files after build. please 'npm run build && npm run format'" \
|
||||
|| (echo "##[error] found changed files after build. please 'npm ci && npm run build'" \
|
||||
"and check in all changes" \
|
||||
&& exit 1)
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: '.tool-versions'
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: '.tool-versions'
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
|
||||
2
.github/workflows/example-builds-nightly.yml
vendored
2
.github/workflows/example-builds-nightly.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: '.tool-versions'
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
|
||||
5
.github/workflows/example-builds.yml
vendored
5
.github/workflows/example-builds.yml
vendored
@@ -19,7 +19,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
julia-version: ['1.0.5', '1.2', '^1.5.0-beta1', '1']
|
||||
# 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
|
||||
@@ -33,7 +34,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: '.tool-versions'
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,3 @@
|
||||
node_modules/
|
||||
__tests__/runner/*
|
||||
dist/
|
||||
!dist/
|
||||
|
||||
1
.tool-versions
Normal file
1
.tool-versions
Normal file
@@ -0,0 +1 @@
|
||||
nodejs 20.11.1
|
||||
@@ -1,11 +1,3 @@
|
||||
# Dev docs / Contributing guide
|
||||
# Contributing
|
||||
|
||||
## Building and tagging a release (requires write access)
|
||||
|
||||
1. Test your changes, merge into `master`.
|
||||
2. Checkout `master`.
|
||||
3. Bump the version number in [`package.json`](package.json).
|
||||
4. Run `./bin/build-release julia-actions/setup-julia` to create a release branch and build a release.
|
||||
5. Push the branch (**without tags**) and verify that CI is passing on it.
|
||||
6. Run `git push --tags --force` to update the tags.
|
||||
7. Create a release for the `vX.Y.Z` tag.
|
||||
Please see the README in the [`devdocs/`](devdocs/) folder.
|
||||
|
||||
38
README.md
38
README.md
@@ -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
|
||||
|
||||
@@ -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: ''
|
||||
@@ -109,6 +117,8 @@ You can either specify specific Julia versions or version ranges. If you specify
|
||||
- `'~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 `< 1.4.0`.
|
||||
- `'^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 `< 2.0.0`.
|
||||
- `'~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 `< 1.4.0`.
|
||||
- `'lts'` will install the latest LTS build.
|
||||
- `'pre'` will install the latest prerelease build (RCs, betas, and alphas).
|
||||
- `'nightly'` will install the latest nightly build.
|
||||
- `'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.
|
||||
|
||||
@@ -283,3 +293,7 @@ Note that when debug logs are enabled, a request will be sent to `https://httpbi
|
||||
## Third party information
|
||||
Parts of this software have been derived from other open source software.
|
||||
See [THIRD_PARTY_NOTICE.md](THIRD_PARTY_NOTICE.md) for details.
|
||||
|
||||
## Contributing to this repo
|
||||
|
||||
Please see the README in the [`devdocs/`](devdocs/) folder.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,30 +4,30 @@
|
||||
import * as path from 'path'
|
||||
|
||||
import * as io from '@actions/io'
|
||||
|
||||
import nock = require('nock')
|
||||
import * as semver from 'semver'
|
||||
|
||||
import nock = require('nock')
|
||||
|
||||
const testVersions = [
|
||||
'0.1.2', '0.2.0', '0.2.1', '0.3.0',
|
||||
'0.3.1', '0.3.10', '0.3.11', '0.3.12',
|
||||
'0.3.2', '0.3.3', '0.3.4', '0.3.5',
|
||||
'0.3.6', '0.3.7', '0.3.8', '0.3.9',
|
||||
'0.4.0', '0.4.0-rc1', '0.4.0-rc2', '0.4.0-rc3',
|
||||
'0.4.0-rc4', '0.4.1', '0.4.2', '0.4.3',
|
||||
'0.4.4', '0.4.5', '0.4.6', '0.4.7',
|
||||
'0.5.0', '0.5.0-rc0', '0.5.0-rc1', '0.5.0-rc2',
|
||||
'0.5.0-rc3', '0.5.0-rc4', '0.5.1', '0.5.2',
|
||||
'0.6.0', '0.6.0-pre.alpha', '0.6.0-pre.beta', '0.6.0-rc1',
|
||||
'0.6.0-rc2', '0.6.0-rc3', '0.6.1', '0.6.2',
|
||||
'0.6.3', '0.6.4', '0.7.0', '0.7.0-alpha',
|
||||
'0.7.0-beta', '0.7.0-beta2', '0.7.0-rc1', '0.7.0-rc2',
|
||||
'0.7.0-rc3', '1.0.0', '1.0.0-rc1', '1.0.1',
|
||||
'1.0.2', '1.0.3', '1.0.4', '1.0.5',
|
||||
'1.1.0', '1.1.0-rc1', '1.1.0-rc2', '1.1.1',
|
||||
'1.2.0', '1.2.0-rc1', '1.2.0-rc2', '1.2.0-rc3',
|
||||
'1.3.0-alpha', '1.3.0-rc1', '1.3.0-rc2', '1.3.0-rc3',
|
||||
'1.3.0-rc4'
|
||||
'0.1.2',
|
||||
'0.2.0', '0.2.1',
|
||||
'0.3.0', '0.3.1', '0.3.10', '0.3.11', '0.3.12', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9',
|
||||
'0.4.0', '0.4.0-rc1', '0.4.0-rc2', '0.4.0-rc3', '0.4.0-rc4', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7',
|
||||
'0.5.0', '0.5.0-rc0', '0.5.0-rc1', '0.5.0-rc2', '0.5.0-rc3', '0.5.0-rc4', '0.5.1', '0.5.2',
|
||||
'0.6.0', '0.6.0-pre.alpha', '0.6.0-pre.beta', '0.6.0-rc1', '0.6.0-rc2', '0.6.0-rc3', '0.6.1', '0.6.2', '0.6.3', '0.6.4',
|
||||
'0.7.0', '0.7.0-alpha', '0.7.0-beta', '0.7.0-beta2', '0.7.0-rc1', '0.7.0-rc2', '0.7.0-rc3',
|
||||
'1.0.0', '1.0.0-rc1', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5',
|
||||
'1.1.0', '1.1.0-rc1', '1.1.0-rc2', '1.1.1',
|
||||
'1.2.0', '1.2.0-rc1', '1.2.0-rc2', '1.2.0-rc3',
|
||||
'1.3.0', '1.3.0-alpha', '1.3.0-rc1', '1.3.0-rc2', '1.3.0-rc3', '1.3.0-rc4', '1.3.0-rc5', '1.3.1',
|
||||
'1.4.0', '1.4.0-rc1', '1.4.0-rc2', '1.4.1', '1.4.2',
|
||||
'1.5.0', '1.5.0-beta1', '1.5.0-rc1', '1.5.0-rc2', '1.5.1', '1.5.2', '1.5.3', '1.5.4',
|
||||
'1.6.0', '1.6.0-beta1', '1.6.0-rc1', '1.6.0-rc2', '1.6.0-rc3', '1.6.1', '1.6.2', '1.6.3', '1.6.4', '1.6.5', '1.6.6', '1.6.7',
|
||||
'1.7.0', '1.7.0-beta1', '1.7.0-beta2', '1.7.0-beta3', '1.7.0-beta4', '1.7.0-rc1', '1.7.0-rc2', '1.7.0-rc3', '1.7.1', '1.7.2', '1.7.3',
|
||||
'1.8.0', '1.8.0-beta1', '1.8.0-beta2', '1.8.0-beta3', '1.8.0-rc1', '1.8.0-rc2', '1.8.0-rc3', '1.8.0-rc4', '1.8.1', '1.8.2', '1.8.3', '1.8.4', '1.8.5',
|
||||
'1.9.0', '1.9.0-alpha1', '1.9.0-beta1', '1.9.0-beta2', '1.9.0-beta3', '1.9.0-beta4', '1.9.0-rc1', '1.9.0-rc2', '1.9.0-rc3', '1.9.1', '1.9.2', '1.9.3', '1.9.4',
|
||||
'1.10.0', '1.10.0-alpha1', '1.10.0-beta1', '1.10.0-beta2', '1.10.0-beta3', '1.10.0-rc1', '1.10.0-rc2', '1.10.0-rc3', '1.10.1', '1.10.2',
|
||||
'1.11.0-alpha1', '1.11.0-alpha2', '1.11.0-beta1'
|
||||
]
|
||||
|
||||
const toolDir = path.join(__dirname, 'runner', 'tools')
|
||||
@@ -55,22 +55,33 @@ describe('version matching tests', () => {
|
||||
expect(installer.getJuliaVersion([], 'nightly')).toEqual('nightly')
|
||||
expect(installer.getJuliaVersion(testVersions, 'nightly')).toEqual('nightly')
|
||||
})
|
||||
|
||||
it('LTS', () => {
|
||||
// Update test when LTS is updated
|
||||
expect(installer.getJuliaVersion(testVersions, 'lts')).toEqual(installer.getJuliaVersion(testVersions, '1.6'))
|
||||
expect(installer.getJuliaVersion(testVersions, 'lts')).toEqual('1.6.7')
|
||||
})
|
||||
|
||||
it('pre', () => {
|
||||
expect(installer.getJuliaVersion(testVersions, 'pre')).toEqual('1.11.0-beta1')
|
||||
})
|
||||
})
|
||||
|
||||
describe('version ranges', () => {
|
||||
it('Chooses the highest available version that matches the input', () => {
|
||||
expect(installer.getJuliaVersion(testVersions, '1')).toEqual('1.2.0')
|
||||
expect(installer.getJuliaVersion(testVersions, '1')).toEqual('1.10.2')
|
||||
expect(installer.getJuliaVersion(testVersions, '1.0')).toEqual('1.0.5')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.3.0-rc1')).toEqual('1.3.0-rc4')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.2.0-rc1')).toEqual('1.2.0')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.3.0-rc1')).toEqual('1.10.2')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.2.0-rc1')).toEqual('1.10.2')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.10.0-rc1')).toEqual('1.10.2')
|
||||
})
|
||||
})
|
||||
|
||||
describe('include-prereleases', () => {
|
||||
it('Chooses the highest available version that matches the input including prereleases', () => {
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.2.0-0', true)).toEqual('1.3.0-rc4')
|
||||
expect(installer.getJuliaVersion(testVersions, '1', true)).toEqual('1.3.0-rc4')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.2.0-0', false)).toEqual('1.2.0')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.2.0-0', true)).toEqual('1.11.0-beta1')
|
||||
expect(installer.getJuliaVersion(testVersions, '1', true)).toEqual('1.11.0-beta1')
|
||||
expect(installer.getJuliaVersion(testVersions, '^1.2.0-0', false)).toEqual('1.10.2')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
name: 'Setup Julia environment'
|
||||
description: 'Setup a Julia environment and add it to the PATH'
|
||||
author: 'Sascha Mann'
|
||||
inputs:
|
||||
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.'
|
||||
@@ -12,7 +12,7 @@ inputs:
|
||||
arch:
|
||||
description: 'Architecture of the Julia binaries. Defaults to the architecture of the runner executing the job.'
|
||||
required: false
|
||||
default: '${{ runner.arch }}'
|
||||
default: 'default'
|
||||
show-versioninfo:
|
||||
description: 'Display InteractiveUtils.versioninfo() after installing'
|
||||
required: false
|
||||
|
||||
2
bin
2
bin
Submodule bin updated: 31b4b500a3...874bfe398c
7
devdocs/README.md
Normal file
7
devdocs/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Devdocs for the `setup-julia` repo
|
||||
|
||||
If you want to make a pull request to this repo, please read the following:
|
||||
1. [Local development](local_setup.md)
|
||||
|
||||
If you have commit access to this repo, you may be interested in the following:
|
||||
1. [Making a new release of this action](making_a_new_release.md)
|
||||
47
devdocs/local_setup.md
Normal file
47
devdocs/local_setup.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Local development
|
||||
|
||||
## 1. Clone the repo
|
||||
|
||||
```bash
|
||||
git clone git@github.com:julia-actions/setup-julia.git
|
||||
cd setup-julia
|
||||
```
|
||||
|
||||
## 2. Install NodeJS
|
||||
|
||||
### Unix, using `asdf` (recommended, but not required)
|
||||
|
||||
First, make sure that you have installed [`asdf`](https://asdf-vm.com/) on your local machine.
|
||||
|
||||
Then, `cd` to your clone of the repo and run the following commands:
|
||||
|
||||
```bash
|
||||
asdf plugin add nodejs
|
||||
asdf install
|
||||
```
|
||||
|
||||
This will use `asdf` to install the correct version of NodeJS.
|
||||
|
||||
### Unix, but not using `asdf`
|
||||
|
||||
Instead of using `asdf`, you can instead choose to install NodeJS manually.
|
||||
|
||||
First, check the `.tool-versions` file in this repo, and see what version of NodeJS you need. Then, install that same version of NodejS on your local machine.
|
||||
|
||||
### Windows
|
||||
|
||||
`asdf` does not (currently) support Windows. So on Windows, you have to install NodeJS manually.
|
||||
|
||||
First, check the `.tool-versions` file in this repo, and see what version of NodeJS you need. Then, install that same version of NodejS on your local machine.
|
||||
|
||||
## 3. Working locally
|
||||
|
||||
First, `cd` to your clone of the repo. Now you can run the following commands:
|
||||
|
||||
```bash
|
||||
npm ci
|
||||
|
||||
npm run build
|
||||
```
|
||||
|
||||
When you are ready, you can commit your changes and push them to your PR.
|
||||
128
devdocs/making_a_new_release.md
Normal file
128
devdocs/making_a_new_release.md
Normal file
@@ -0,0 +1,128 @@
|
||||
# Making a new release of this action (requires commit access)
|
||||
|
||||
If you have commit access to this repo, you can make a new release.
|
||||
|
||||
Here are the instructions.
|
||||
|
||||
## Step 1: Clone a fresh copy of the repo
|
||||
|
||||
We intentionally work in a brand-new copy of the repo.
|
||||
|
||||
```bash
|
||||
git clone git@github.com:julia-actions/setup-julia.git
|
||||
cd setup-julia
|
||||
git checkout master
|
||||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
## Step 2: Make sure you have the right version of NodeJS
|
||||
|
||||
If you use [`asdf`](https://asdf-vm.com/), this is as simple as:
|
||||
|
||||
```bash
|
||||
asdf plugin add nodejs
|
||||
asdf install
|
||||
```
|
||||
|
||||
If you don't use `asdf`, then you need to:
|
||||
1. Open the `./tool-versions` file in the root of the repo.
|
||||
2. Make note of the NodeJS version listed in the `.tool-versions` file.
|
||||
3. Install that same version of NodeJS on your machine.
|
||||
4. Make sure that you are currently using that version of NodeJS (i.e. it is at the front of your PATH).
|
||||
|
||||
## Step 3: Edit the `version` field in `package.json`
|
||||
|
||||
```bash
|
||||
vim package.json
|
||||
|
||||
# Edit the `version` number (should be line 2)
|
||||
# Save your changes in Vim. Then exit Vim.
|
||||
|
||||
# For the remaining of this guide, let MAJOR.MINOR.PATCH refer
|
||||
# to the new version number that you set.
|
||||
|
||||
git add package.json
|
||||
|
||||
# No need to commit yet.
|
||||
# The release script will run `git commit`.
|
||||
```
|
||||
|
||||
## Step 4: Remove the `dist/` line from the `.gitignore` file
|
||||
|
||||
```bash
|
||||
vim .gitignore
|
||||
# Delete the line that says `dist/` (it should be line 3)
|
||||
# Save your changes in Vim. Then exit Vim.
|
||||
|
||||
git add .gitignore
|
||||
|
||||
# No need to commit yet.
|
||||
# The release script will run `git commit`.
|
||||
```
|
||||
|
||||
## Step 5: Make sure you have the necessary dependencies
|
||||
|
||||
The `build-release.sh` script requires the following dependencies:
|
||||
|
||||
1. Bash
|
||||
2. `curl`
|
||||
3. `git`
|
||||
4. `jq`
|
||||
5. `sed`
|
||||
|
||||
## Step 6: Run the `build-release.sh` script
|
||||
|
||||
```bash
|
||||
ls -l bin/build-release.sh
|
||||
chmod +x bin/build-release.sh
|
||||
ls -l bin/build-release.sh
|
||||
|
||||
./bin/build-release.sh julia-actions/setup-julia
|
||||
```
|
||||
|
||||
Wait a minute or two. The script will build everything and will create a new release branch named `releases/vMAJOR.MINOR.PATCH`.
|
||||
|
||||
## Step 7: Push ONLY the `releases/vMAJOR.MINOR.PATCH` branch
|
||||
|
||||
Only push the `releases/` branch. Do NOT push any tags yet.
|
||||
|
||||
```bash
|
||||
git push origin releases/vMAJOR.MINOR.PATCH
|
||||
```
|
||||
|
||||
Now you need to go to https://github.com/julia-actions/setup-julia/tree/releases/vMAJOR.MINOR.PATCH and wait for CI to finish running.
|
||||
|
||||
Do NOT proceed to the next step until CI is all green on the `releases/vMAJOR.MINOR.PATCH` branch.
|
||||
|
||||
## Step 8: Push the tags (only after CI is all green)
|
||||
|
||||
Once CI is all green on the `releases/vMAJOR.MINOR.PATCH` branch, you can push the tags.
|
||||
|
||||
You need to force-push.
|
||||
|
||||
```bash
|
||||
git push --tags --force
|
||||
```
|
||||
|
||||
## Step 9: Use the GitHub web UI to create a new GitHub Release
|
||||
|
||||
Go to https://github.com/julia-actions/setup-julia/releases and create a new release for the now-existant `vMAJOR.MINOR.PATCH` tag using the GitHub web interface.
|
||||
|
||||
## Step 10: Clean up your local repo
|
||||
|
||||
```bash
|
||||
git submodule deinit --force .
|
||||
git submodule update --init
|
||||
git fetch --all --prune
|
||||
git checkout master
|
||||
git reset --hard origin/master
|
||||
```
|
||||
|
||||
## Step 11: Delete your local repo
|
||||
|
||||
```bash
|
||||
cd ..
|
||||
ls setup-julia
|
||||
rm -rf setup-julia
|
||||
```
|
||||
@@ -1,4 +1,4 @@
|
||||
# Contributors
|
||||
# Misc notes for contributors
|
||||
|
||||
### Checkin
|
||||
|
||||
@@ -19,4 +19,4 @@ git commit -m "Informative commit message" # Commit. This will run Husky
|
||||
```
|
||||
|
||||
During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier) as well as pruning out devDependencies using `npm prune --production`.
|
||||
It will also make sure these changes are appropriately included in your commit (no further work is needed)
|
||||
It will also make sure these changes are appropriately included in your commit (no further work is needed)
|
||||
10162
dist/index.js
vendored
Normal file
10162
dist/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
50
lib/installer.js
generated
50
lib/installer.js
generated
@@ -32,7 +32,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.showVersionInfo = exports.installJulia = exports.getDownloadURL = exports.getFileInfo = exports.getJuliaVersion = exports.getJuliaVersions = exports.getJuliaVersionInfo = void 0;
|
||||
exports.getJuliaVersionInfo = getJuliaVersionInfo;
|
||||
exports.getJuliaVersions = getJuliaVersions;
|
||||
exports.getJuliaVersion = getJuliaVersion;
|
||||
exports.getFileInfo = getFileInfo;
|
||||
exports.getDownloadURL = getDownloadURL;
|
||||
exports.installJulia = installJulia;
|
||||
exports.showVersionInfo = showVersionInfo;
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const exec = __importStar(require("@actions/exec"));
|
||||
const tc = __importStar(require("@actions/tool-cache"));
|
||||
@@ -42,6 +48,8 @@ const os = __importStar(require("os"));
|
||||
const path = __importStar(require("path"));
|
||||
const retry = require("async-retry");
|
||||
const semver = __importStar(require("semver"));
|
||||
const LTS_VERSION = '1.6';
|
||||
const MAJOR_VERSION = '1'; // Could be deduced from versions.json
|
||||
// Translations between actions input and Julia arch names
|
||||
const osMap = {
|
||||
'win32': 'winnt',
|
||||
@@ -92,7 +100,6 @@ function getJuliaVersionInfo() {
|
||||
return JSON.parse(fs.readFileSync(versionsFile).toString());
|
||||
});
|
||||
}
|
||||
exports.getJuliaVersionInfo = getJuliaVersionInfo;
|
||||
/**
|
||||
* @returns An array of all Julia versions available for download
|
||||
*/
|
||||
@@ -105,12 +112,17 @@ function getJuliaVersions(versionInfo) {
|
||||
return versions;
|
||||
});
|
||||
}
|
||||
exports.getJuliaVersions = getJuliaVersions;
|
||||
function getJuliaVersion(availableReleases, versionInput, includePrerelease = false) {
|
||||
if (semver.valid(versionInput) == versionInput || versionInput.endsWith('nightly')) {
|
||||
// versionInput is a valid version or a nightly version, use it directly
|
||||
return versionInput;
|
||||
}
|
||||
if (versionInput == 'lts') {
|
||||
return getJuliaVersion(availableReleases, LTS_VERSION, false);
|
||||
}
|
||||
if (versionInput == 'pre') {
|
||||
return getJuliaVersion(availableReleases, MAJOR_VERSION, true);
|
||||
}
|
||||
// Use the highest available version that matches versionInput
|
||||
let version = semver.maxSatisfying(availableReleases, versionInput, { includePrerelease });
|
||||
if (version == null) {
|
||||
@@ -120,7 +132,6 @@ function getJuliaVersion(availableReleases, versionInput, includePrerelease = fa
|
||||
version = version.replace(/^v/, '');
|
||||
return version;
|
||||
}
|
||||
exports.getJuliaVersion = getJuliaVersion;
|
||||
function getDesiredFileExts() {
|
||||
let fileExt1;
|
||||
let hasFileExt2;
|
||||
@@ -206,6 +217,7 @@ function getFileInfo(versionInfo, version, arch) {
|
||||
return null;
|
||||
}
|
||||
if (!versionInfo[version]) {
|
||||
core.error(`Encountered error: ${err}`);
|
||||
throw err;
|
||||
}
|
||||
for (let file of versionInfo[version].files) {
|
||||
@@ -224,10 +236,35 @@ function getFileInfo(versionInfo, version, arch) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// The following block is just to provide improved log messages in the CI logs.
|
||||
// We specifically want to improve the case where someone is trying to install
|
||||
// Julia 1.6 or 1.7 on Apple Silicon (aarch64) macOS.
|
||||
{
|
||||
const one_fileext_is_targz = (fileExt1 == "tar.gz") || (fileExt2 == "tar.gz");
|
||||
const one_fileext_is_dmg = (fileExt1 == "dmg") || (fileExt2 == "dmg");
|
||||
const one_fileext_is_targz_and_other_is_dmg = one_fileext_is_targz && one_fileext_is_dmg;
|
||||
// We say that "this Julia version does NOT have native binaries for Apple Silicon"
|
||||
// if and only if "this Julia version is < 1.8.0"
|
||||
const this_julia_version_does_NOT_have_native_binaries_for_apple_silicon = semver.lt(version, '1.8.0');
|
||||
const this_is_macos = osPlat == 'darwin';
|
||||
if (this_is_macos && one_fileext_is_targz_and_other_is_dmg && this_julia_version_does_NOT_have_native_binaries_for_apple_silicon) {
|
||||
const msg = `It looks like you are trying to install Julia 1.6 or 1.7 on ` +
|
||||
`the "macos-latest" runners.\n` +
|
||||
`"macos-latest" now resolves to "macos-14", which run on Apple ` +
|
||||
`Silicon (aarch64) macOS machines.\n` +
|
||||
`Unfortunately, Julia 1.6 and 1.7 do not have native binaries ` +
|
||||
`available for Apple Silicon macOS.\n` +
|
||||
`Therefore, it is not possible to install Julia with the current ` +
|
||||
`constraints.\n` +
|
||||
`For instructions on how to fix this error, please see the following Discourse post: ` +
|
||||
`https://discourse.julialang.org/t/how-to-fix-github-actions-ci-failures-with-julia-1-6-or-1-7-on-macos-latest-and-macos-14/117019`;
|
||||
core.error(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
core.error(`Encountered error: ${err}`);
|
||||
throw err;
|
||||
}
|
||||
exports.getFileInfo = getFileInfo;
|
||||
function getDownloadURL(fileInfo, version, arch) {
|
||||
const baseURL = `https://julialangnightlies-s3.julialang.org/bin/${osMap[osPlat]}/${arch}`;
|
||||
// release branch nightlies, e.g. 1.6-nightlies should return .../bin/linux/x64/1.6/julia-latest-linux64.tar.gz
|
||||
@@ -245,7 +282,6 @@ function getDownloadURL(fileInfo, version, arch) {
|
||||
}
|
||||
return fileInfo.url;
|
||||
}
|
||||
exports.getDownloadURL = getDownloadURL;
|
||||
function installJulia(dest, versionInfo, version, arch) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// Download Julia
|
||||
@@ -313,7 +349,6 @@ function installJulia(dest, versionInfo, version, arch) {
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.installJulia = installJulia;
|
||||
/**
|
||||
* Test if Julia has been installed and print the version.
|
||||
*
|
||||
@@ -350,4 +385,3 @@ function showVersionInfo(showVersionInfoInput, version) {
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.showVersionInfo = showVersionInfo;
|
||||
|
||||
39
lib/setup-julia.js
generated
39
lib/setup-julia.js
generated
@@ -36,15 +36,17 @@ const core = __importStar(require("@actions/core"));
|
||||
const tc = __importStar(require("@actions/tool-cache"));
|
||||
const fs = __importStar(require("fs"));
|
||||
const https = __importStar(require("https"));
|
||||
const os = __importStar(require("os"));
|
||||
const path = __importStar(require("path"));
|
||||
const installer = __importStar(require("./installer"));
|
||||
// Note: before we index into this dict, we always first do `.toLowerCase()` on
|
||||
// the key.
|
||||
//
|
||||
// Therefore, this dict does not need to account for differences in case.
|
||||
const archSynonyms = {
|
||||
'x86': 'x86',
|
||||
'X86': 'x86',
|
||||
'x64': 'x64',
|
||||
'X64': 'x64',
|
||||
'aarch64': 'aarch64',
|
||||
'ARM64': 'aarch64',
|
||||
'arm64': 'aarch64'
|
||||
};
|
||||
function run() {
|
||||
@@ -65,22 +67,39 @@ function run() {
|
||||
core.debug(`ERROR: Could not retrieve runner IP: ${err}`);
|
||||
});
|
||||
}
|
||||
// Inputs
|
||||
const versionInput = core.getInput('version');
|
||||
const includePrereleases = core.getInput('include-all-prereleases') == 'true';
|
||||
const originalArchInput = core.getInput('arch');
|
||||
// Inputs.
|
||||
// Note that we intentionally strip leading and lagging whitespace by using `.trim()`
|
||||
const versionInput = core.getInput('version').trim();
|
||||
const includePrereleases = core.getInput('include-all-prereleases').trim() == 'true';
|
||||
const originalArchInput = core.getInput('arch').trim();
|
||||
// It can easily happen that, for example, a workflow file contains an input `version: ${{ matrix.julia-version }}`
|
||||
// while the strategy matrix only contains a key `${{ matrix.version }}`.
|
||||
// In that case, we want the action to fail, rather than trying to download julia from an URL that's missing parts and 404ing.
|
||||
// We _could_ fall back to the default but that means that builds silently do things differently than they're meant to, which
|
||||
// is worse than failing the build.
|
||||
if (!versionInput) {
|
||||
if (!versionInput) { // if `versionInput` is an empty string
|
||||
throw new Error('Version input must not be null');
|
||||
}
|
||||
if (!originalArchInput) {
|
||||
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`);
|
||||
}
|
||||
const arch = archSynonyms[originalArchInput];
|
||||
let processedArchInput;
|
||||
if (originalArchInput == "default") {
|
||||
// If the user sets the `arch` input to `default`, then we use the
|
||||
// architecture of the machine that we are running on.
|
||||
processedArchInput = os.arch();
|
||||
core.debug(`The "arch" input is "default", so we will use the machine arch: ${processedArchInput}`);
|
||||
}
|
||||
else {
|
||||
processedArchInput = originalArchInput;
|
||||
}
|
||||
// Note: we convert the key `processedArchInput` to lower case
|
||||
// before we index into the `archSynonyms` dict.
|
||||
const arch = archSynonyms[processedArchInput.toLowerCase()];
|
||||
core.debug(`Mapped the "arch" from ${processedArchInput} to ${arch}`);
|
||||
const versionInfo = yield installer.getJuliaVersionInfo();
|
||||
const availableReleases = yield installer.getJuliaVersions(versionInfo);
|
||||
const version = installer.getJuliaVersion(availableReleases, versionInput, includePrereleases);
|
||||
|
||||
365
package-lock.json
generated
365
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "setup-julia",
|
||||
"version": "2.0.0",
|
||||
"version": "2.3.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "setup-julia",
|
||||
"version": "2.0.0",
|
||||
"version": "2.3.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
@@ -14,21 +14,21 @@
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"async-retry": "^1.3.3",
|
||||
"semver": "^7.6.0"
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/async-retry": "^1.4.8",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.12.8",
|
||||
"@types/node": "^20.14.11",
|
||||
"@types/retry": "^0.12.5",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-circus": "^29.7.0",
|
||||
"nock": "^13.5.4",
|
||||
"prettier": "^3.2.5",
|
||||
"ts-jest": "^29.1.2",
|
||||
"typescript": "^5.4.5"
|
||||
"prettier": "^3.3.3",
|
||||
"ts-jest": "^29.2.3",
|
||||
"typescript": "^5.5.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
@@ -1467,9 +1467,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.12.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz",
|
||||
"integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==",
|
||||
"version": "20.14.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz",
|
||||
"integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -1575,6 +1575,12 @@
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/async": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz",
|
||||
"integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/async-retry": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
|
||||
@@ -2131,6 +2137,21 @@
|
||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ejs": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz",
|
||||
"integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"jake": "^10.8.5"
|
||||
},
|
||||
"bin": {
|
||||
"ejs": "bin/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.292",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.292.tgz",
|
||||
@@ -2258,6 +2279,36 @@
|
||||
"bser": "2.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/filelist": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz",
|
||||
"integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"minimatch": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/filelist/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/filelist/node_modules/minimatch": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
@@ -2622,6 +2673,94 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/jake": {
|
||||
"version": "10.9.2",
|
||||
"resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz",
|
||||
"integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"async": "^3.2.3",
|
||||
"chalk": "^4.0.2",
|
||||
"filelist": "^1.0.4",
|
||||
"minimatch": "^3.1.2"
|
||||
},
|
||||
"bin": {
|
||||
"jake": "bin/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/jake/node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/jake/node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/jake/node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jake/node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/jake/node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/jake/node_modules/supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/jest": {
|
||||
"version": "29.7.0",
|
||||
"resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
|
||||
@@ -4585,9 +4724,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
|
||||
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
@@ -4740,12 +4879,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
|
||||
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
@@ -4753,22 +4889,6 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/semver/node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/semver/node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"node_modules/shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
@@ -4992,12 +5112,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-jest": {
|
||||
"version": "29.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz",
|
||||
"integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==",
|
||||
"version": "29.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz",
|
||||
"integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"bs-logger": "0.x",
|
||||
"ejs": "^3.1.10",
|
||||
"fast-json-stable-stringify": "2.x",
|
||||
"jest-util": "^29.0.0",
|
||||
"json5": "^2.2.3",
|
||||
@@ -5010,10 +5131,11 @@
|
||||
"ts-jest": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.10.0 || ^18.0.0 || >=20.0.0"
|
||||
"node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.0 <8",
|
||||
"@jest/transform": "^29.0.0",
|
||||
"@jest/types": "^29.0.0",
|
||||
"babel-jest": "^29.0.0",
|
||||
"jest": "^29.0.0",
|
||||
@@ -5023,6 +5145,9 @@
|
||||
"@babel/core": {
|
||||
"optional": true
|
||||
},
|
||||
"@jest/transform": {
|
||||
"optional": true
|
||||
},
|
||||
"@jest/types": {
|
||||
"optional": true
|
||||
},
|
||||
@@ -5064,9 +5189,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.4.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
|
||||
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
|
||||
"version": "5.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
|
||||
"integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -6415,9 +6540,9 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "20.12.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz",
|
||||
"integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==",
|
||||
"version": "20.14.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz",
|
||||
"integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -6505,6 +6630,12 @@
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"async": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz",
|
||||
"integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==",
|
||||
"dev": true
|
||||
},
|
||||
"async-retry": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
|
||||
@@ -6906,6 +7037,15 @@
|
||||
"integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
|
||||
"dev": true
|
||||
},
|
||||
"ejs": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz",
|
||||
"integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"jake": "^10.8.5"
|
||||
}
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.4.292",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.292.tgz",
|
||||
@@ -7002,6 +7142,35 @@
|
||||
"bser": "2.1.1"
|
||||
}
|
||||
},
|
||||
"filelist": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz",
|
||||
"integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimatch": "^5.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
@@ -7270,6 +7439,69 @@
|
||||
"istanbul-lib-report": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"jake": {
|
||||
"version": "10.9.2",
|
||||
"resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz",
|
||||
"integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^3.2.3",
|
||||
"chalk": "^4.0.2",
|
||||
"filelist": "^1.0.4",
|
||||
"minimatch": "^3.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"jest": {
|
||||
"version": "29.7.0",
|
||||
"resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
|
||||
@@ -8730,9 +8962,9 @@
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
|
||||
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true
|
||||
},
|
||||
"pretty-format": {
|
||||
@@ -8832,27 +9064,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
|
||||
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"requires": {
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
}
|
||||
}
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "2.0.0",
|
||||
@@ -9022,12 +9236,13 @@
|
||||
}
|
||||
},
|
||||
"ts-jest": {
|
||||
"version": "29.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz",
|
||||
"integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==",
|
||||
"version": "29.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz",
|
||||
"integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bs-logger": "0.x",
|
||||
"ejs": "^3.1.10",
|
||||
"fast-json-stable-stringify": "2.x",
|
||||
"jest-util": "^29.0.0",
|
||||
"json5": "^2.2.3",
|
||||
@@ -9055,9 +9270,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "5.4.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
|
||||
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
|
||||
"version": "5.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
|
||||
"integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"undici-types": {
|
||||
|
||||
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-julia",
|
||||
"version": "2.0.0",
|
||||
"version": "2.3.0",
|
||||
"private": true,
|
||||
"description": "setup Julia action",
|
||||
"main": "lib/setup-julia.js",
|
||||
@@ -26,20 +26,20 @@
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"async-retry": "^1.3.3",
|
||||
"semver": "^7.6.0"
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/async-retry": "^1.4.8",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.12.8",
|
||||
"@types/node": "^20.14.11",
|
||||
"@types/retry": "^0.12.5",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-circus": "^29.7.0",
|
||||
"nock": "^13.5.4",
|
||||
"prettier": "^3.2.5",
|
||||
"ts-jest": "^29.1.2",
|
||||
"typescript": "^5.4.5"
|
||||
"prettier": "^3.3.3",
|
||||
"ts-jest": "^29.2.3",
|
||||
"typescript": "^5.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ import retry = require('async-retry')
|
||||
|
||||
import * as semver from 'semver'
|
||||
|
||||
const LTS_VERSION = '1.6'
|
||||
const MAJOR_VERSION = '1' // Could be deduced from versions.json
|
||||
|
||||
// Translations between actions input and Julia arch names
|
||||
const osMap = {
|
||||
'win32': 'winnt',
|
||||
@@ -82,6 +85,14 @@ export function getJuliaVersion(availableReleases: string[], versionInput: strin
|
||||
return versionInput
|
||||
}
|
||||
|
||||
if (versionInput == 'lts') {
|
||||
return getJuliaVersion(availableReleases, LTS_VERSION, false)
|
||||
}
|
||||
|
||||
if (versionInput == 'pre') {
|
||||
return getJuliaVersion(availableReleases, MAJOR_VERSION, true)
|
||||
}
|
||||
|
||||
// Use the highest available version that matches versionInput
|
||||
let version = semver.maxSatisfying(availableReleases, versionInput, {includePrerelease})
|
||||
if (version == null) {
|
||||
@@ -173,6 +184,7 @@ export function getFileInfo(versionInfo, version: string, arch: string) {
|
||||
}
|
||||
|
||||
if (!versionInfo[version]) {
|
||||
core.error(`Encountered error: ${err}`)
|
||||
throw err
|
||||
}
|
||||
|
||||
@@ -193,8 +205,39 @@ export function getFileInfo(versionInfo, version: string, arch: string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The following block is just to provide improved log messages in the CI logs.
|
||||
// We specifically want to improve the case where someone is trying to install
|
||||
// Julia 1.6 or 1.7 on Apple Silicon (aarch64) macOS.
|
||||
{
|
||||
const one_fileext_is_targz = (fileExt1 == "tar.gz") || (fileExt2 == "tar.gz");
|
||||
const one_fileext_is_dmg = (fileExt1 == "dmg") || (fileExt2 == "dmg");
|
||||
const one_fileext_is_targz_and_other_is_dmg = one_fileext_is_targz && one_fileext_is_dmg;
|
||||
|
||||
// We say that "this Julia version does NOT have native binaries for Apple Silicon"
|
||||
// if and only if "this Julia version is < 1.8.0"
|
||||
const this_julia_version_does_NOT_have_native_binaries_for_apple_silicon = semver.lt(
|
||||
version,
|
||||
'1.8.0',
|
||||
);
|
||||
const this_is_macos = osPlat == 'darwin';
|
||||
if (this_is_macos && one_fileext_is_targz_and_other_is_dmg && this_julia_version_does_NOT_have_native_binaries_for_apple_silicon) {
|
||||
const msg = `It looks like you are trying to install Julia 1.6 or 1.7 on ` +
|
||||
`the "macos-latest" runners.\n` +
|
||||
`"macos-latest" now resolves to "macos-14", which run on Apple ` +
|
||||
`Silicon (aarch64) macOS machines.\n` +
|
||||
`Unfortunately, Julia 1.6 and 1.7 do not have native binaries ` +
|
||||
`available for Apple Silicon macOS.\n` +
|
||||
`Therefore, it is not possible to install Julia with the current ` +
|
||||
`constraints.\n` +
|
||||
`For instructions on how to fix this error, please see the following Discourse post: ` +
|
||||
`https://discourse.julialang.org/t/how-to-fix-github-actions-ci-failures-with-julia-1-6-or-1-7-on-macos-latest-and-macos-14/117019`
|
||||
core.error(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
core.error(`Encountered error: ${err}`)
|
||||
throw err
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as exec from '@actions/exec'
|
||||
import * as tc from '@actions/tool-cache'
|
||||
|
||||
import * as fs from 'fs'
|
||||
import * as https from 'https'
|
||||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
|
||||
import * as installer from './installer'
|
||||
|
||||
// Note: before we index into this dict, we always first do `.toLowerCase()` on
|
||||
// the key.
|
||||
//
|
||||
// Therefore, this dict does not need to account for differences in case.
|
||||
const archSynonyms = {
|
||||
'x86': 'x86',
|
||||
'X86': 'x86',
|
||||
'x64': 'x64',
|
||||
'X64': 'x64',
|
||||
'aarch64': 'aarch64',
|
||||
'ARM64': 'aarch64',
|
||||
'arm64': 'aarch64'
|
||||
}
|
||||
|
||||
@@ -38,24 +39,40 @@ async function run() {
|
||||
})
|
||||
}
|
||||
|
||||
// Inputs
|
||||
const versionInput = core.getInput('version')
|
||||
const includePrereleases = core.getInput('include-all-prereleases') == 'true'
|
||||
const originalArchInput = core.getInput('arch')
|
||||
// Inputs.
|
||||
// Note that we intentionally strip leading and lagging whitespace by using `.trim()`
|
||||
const versionInput = core.getInput('version').trim()
|
||||
const includePrereleases = core.getInput('include-all-prereleases').trim() == 'true'
|
||||
const originalArchInput = core.getInput('arch').trim()
|
||||
|
||||
// It can easily happen that, for example, a workflow file contains an input `version: ${{ matrix.julia-version }}`
|
||||
// while the strategy matrix only contains a key `${{ matrix.version }}`.
|
||||
// In that case, we want the action to fail, rather than trying to download julia from an URL that's missing parts and 404ing.
|
||||
// We _could_ fall back to the default but that means that builds silently do things differently than they're meant to, which
|
||||
// is worse than failing the build.
|
||||
if (!versionInput) {
|
||||
if (!versionInput) { // if `versionInput` is an empty string
|
||||
throw new Error('Version input must not be null')
|
||||
}
|
||||
if (!originalArchInput) {
|
||||
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`)
|
||||
}
|
||||
|
||||
const arch = archSynonyms[originalArchInput]
|
||||
let processedArchInput: string;
|
||||
if (originalArchInput == "default") {
|
||||
// If the user sets the `arch` input to `default`, then we use the
|
||||
// architecture of the machine that we are running on.
|
||||
processedArchInput = os.arch();
|
||||
core.debug(`The "arch" input is "default", so we will use the machine arch: ${processedArchInput}`)
|
||||
} else {
|
||||
processedArchInput = originalArchInput;
|
||||
}
|
||||
// Note: we convert the key `processedArchInput` to lower case
|
||||
// before we index into the `archSynonyms` dict.
|
||||
const arch = archSynonyms[processedArchInput.toLowerCase()]
|
||||
core.debug(`Mapped the "arch" from ${processedArchInput} to ${arch}`)
|
||||
|
||||
const versionInfo = await installer.getJuliaVersionInfo()
|
||||
const availableReleases = await installer.getJuliaVersions(versionInfo)
|
||||
|
||||
Reference in New Issue
Block a user