mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 19:16:54 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3645a07f58 | ||
|
|
d56bd397bb | ||
|
|
c7aa298e32 | ||
|
|
cae3c21ea1 | ||
|
|
389de5c0df | ||
|
|
42e03d3446 | ||
|
|
e62bf8c418 | ||
|
|
30038810d2 | ||
|
|
0e4b558b25 | ||
|
|
3599cbd45f |
2
.github/workflows/checkin.yml
vendored
2
.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
|
||||
|
||||
@@ -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') }}
|
||||
|
||||
4
.github/workflows/example-builds.yml
vendored
4
.github/workflows/example-builds.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
julia-version: ['1.0.5', '1.2', '^1.5.0-beta1', '1']
|
||||
julia-version: ['1.0.5', '1.2', '^1.5.0-beta1', '1', 'lts', 'pre']
|
||||
julia-arch: [x64, x86]
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
# 32-bit Julia binaries are not available on macOS
|
||||
@@ -33,7 +33,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.
|
||||
|
||||
@@ -109,6 +109,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.
|
||||
- `'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 +285,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')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
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)
|
||||
10103
dist/index.js
vendored
Normal file
10103
dist/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
8
lib/installer.js
generated
8
lib/installer.js
generated
@@ -42,6 +42,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',
|
||||
@@ -111,6 +113,12 @@ function getJuliaVersion(availableReleases, versionInput, includePrerelease = fa
|
||||
// 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) {
|
||||
|
||||
103
package-lock.json
generated
103
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "setup-julia",
|
||||
"version": "2.0.0",
|
||||
"version": "2.2.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "setup-julia",
|
||||
"version": "2.0.0",
|
||||
"version": "2.2.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
@@ -14,20 +14,20 @@
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"async-retry": "^1.3.3",
|
||||
"semver": "^7.6.0"
|
||||
"semver": "^7.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/async-retry": "^1.4.8",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.12.8",
|
||||
"@types/node": "^20.14.6",
|
||||
"@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",
|
||||
"prettier": "^3.3.2",
|
||||
"ts-jest": "^29.1.5",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
},
|
||||
@@ -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.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.6.tgz",
|
||||
"integrity": "sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -4585,9 +4585,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.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
|
||||
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
@@ -4740,12 +4740,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.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
|
||||
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
@@ -4753,22 +4750,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,9 +4973,9 @@
|
||||
}
|
||||
},
|
||||
"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.1.5",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz",
|
||||
"integrity": "sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"bs-logger": "0.x",
|
||||
@@ -5010,10 +4991,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 +5005,9 @@
|
||||
"@babel/core": {
|
||||
"optional": true
|
||||
},
|
||||
"@jest/transform": {
|
||||
"optional": true
|
||||
},
|
||||
"@jest/types": {
|
||||
"optional": true
|
||||
},
|
||||
@@ -6415,9 +6400,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.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.6.tgz",
|
||||
"integrity": "sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -8730,9 +8715,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.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
|
||||
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
|
||||
"dev": true
|
||||
},
|
||||
"pretty-format": {
|
||||
@@ -8832,27 +8817,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.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
|
||||
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w=="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "2.0.0",
|
||||
@@ -9022,9 +8989,9 @@
|
||||
}
|
||||
},
|
||||
"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.1.5",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz",
|
||||
"integrity": "sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bs-logger": "0.x",
|
||||
|
||||
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-julia",
|
||||
"version": "2.0.0",
|
||||
"version": "2.2.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.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/async-retry": "^1.4.8",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.12.8",
|
||||
"@types/node": "^20.14.6",
|
||||
"@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",
|
||||
"prettier": "^3.3.2",
|
||||
"ts-jest": "^29.1.5",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as exec from '@actions/exec'
|
||||
import * as tc from '@actions/tool-cache'
|
||||
|
||||
import * as fs from 'fs'
|
||||
|
||||
Reference in New Issue
Block a user