Compare commits

..

39 Commits
v1 ... v2.3.0

Author SHA1 Message Date
Dilum Aluthge
780022b48d Add production dependencies & build 2024-07-21 17:31:33 -04:00
Dilum Aluthge
3bc2a872da package.json: change version number from 2.2.0 to 2.3.0 (#271)
* `package.json`: change version number from `2.2.0` to `2.3.0`

* `rm -rf node_modules/ && npm ci && npm install`
2024-07-21 17:24:46 -04:00
Ian Butterworth
0c4130534d 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>
2024-07-21 11:11:51 -04:00
Dilum Aluthge
5956f5ed17 If the user provides default as the value of the arch input, use the runner machine's architecture (#263)
* If the user provides `default` as the value of the `arch` input, use the runner machine's architecture

* `npm run build`

* Convert the key `processedArchInput` to lower case before indexing into the `archSynonyms` dict

* `npm run build`

---------

Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
2024-07-21 10:58:40 +00:00
dependabot[bot]
a9e17d5c78 Bump prettier from 3.3.2 to 3.3.3 (#269)
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-19 22:16:16 -04:00
dependabot[bot]
f2f2b89a9f Bump ts-jest from 29.1.5 to 29.2.3 (#268)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.1.5 to 29.2.3.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.5...v29.2.3)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-20 02:08:37 +00:00
dependabot[bot]
f9eef78196 Bump semver from 7.6.2 to 7.6.3 (#270)
Bumps [semver](https://github.com/npm/node-semver) from 7.6.2 to 7.6.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.2...v7.6.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-20 01:59:18 +00:00
dependabot[bot]
3511533b57 Bump typescript from 5.4.5 to 5.5.3 (#258)
* Bump typescript from 5.4.5 to 5.5.3

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.5 to 5.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* npm run build

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
2024-07-19 20:10:17 +00:00
Dilum Aluthge
8db9e52340 CI: don't instruct the user to do npm run format (#267) 2024-07-19 16:04:23 -04:00
Dilum Aluthge
1da1716a18 Improve the error logging for the case of Julia 1.6 or 1.7 on Apple Silicon (macos-latest or macos-14) (#261)
* Add some more error logging

* `npm run build`

* Make the message more concise

* Remove the trailing newline at the very end of the last line of the error message

* `npm ci && npm run build`
2024-07-19 19:46:12 +00:00
dependabot[bot]
7653693003 Bump bin from 31b4b50 to e564658 (#259)
Bumps [bin](https://github.com/julia-actions/bin) from `31b4b50` to `e564658`.
- [Commits](31b4b500a3...e564658c0f)

---
updated-dependencies:
- dependency-name: bin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
2024-07-19 19:19:27 +00:00
dependabot[bot]
e1580df3b6 Bump @types/node from 20.14.6 to 20.14.11 (#266)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.6 to 20.14.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-19 15:10:57 -04:00
Dilum Aluthge
ba42af3a54 Always print an error message, never error silently (#262)
* Always print an error message, never error silently

* `npm run build`
2024-07-18 11:30:05 -04:00
Viral B. Shah
4778d3d0c8 Update README.md (#256) 2024-06-26 18:03:36 -04:00
Ian Butterworth
c7aa298e32 update version 2.0.0 -> 2.2.0 (#255) 2024-06-26 15:54:53 -04:00
Dilum Aluthge
cae3c21ea1 Make the devdocs more complete and self-contained (#252)
* Make the devdocs more complete and self-contained

* Rename devdocs/misc-notes-from-contributors.md to devdocs/misc/misc_notes_for_committers.md

* Document the dependencies of the build script

* No need to manually make multiple commits

---------

Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
2024-06-26 18:18:44 +00:00
Kristoffer Carlsson
389de5c0df Allow lts for the LTS, and allow pre for the latest pre-release (#234)
* update tests to latest `versions.json`

* allow specifying the version as `lts` to install the latest LTS version

for now, this just hardcodes the LTS version in the source (similar to how juliaup does it) since the latest LTS is not available in `versions.json`. Since the LTS is updated so rarely this might be ok for now.

* add a 'pre' version

* Run `npm ci` followed by `npm run build`

* Add a CI job to test `pre`

---------

Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
2024-06-26 14:12:52 -04:00
Dilum Aluthge
42e03d3446 CI: Install the same version of NodeJS that is specified in .tool-versions (#253)
* Create a `.tool-versions` file with an entry for NodeJS 20

* CI: Install the same version of NodeJS that is specified in `.tool-versions`
2024-06-19 19:09:08 -04:00
dependabot[bot]
e62bf8c418 Bump ts-jest from 29.1.2 to 29.1.5 (#249)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.1.2 to 29.1.5.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.2...v29.1.5)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:59:37 +00:00
dependabot[bot]
30038810d2 Bump prettier from 3.2.5 to 3.3.2 (#247)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:49:01 +00:00
dependabot[bot]
0e4b558b25 Bump semver from 7.6.0 to 7.6.2 (#244)
Bumps [semver](https://github.com/npm/node-semver) from 7.6.0 to 7.6.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.0...v7.6.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:40:25 +00:00
dependabot[bot]
3599cbd45f Bump @types/node from 20.12.8 to 20.14.6 (#254)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.8 to 20.14.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:29:43 +00:00
Dilum Aluthge
16b01270a4 CI: stop testing on macOS 11 (#251) 2024-06-19 17:19:52 -04:00
Ian Butterworth
ed4a842dbe Use Windows system tar (not the Git Bash tar) (#206)
* use windows tar, not git bash one

* correct manual patch

* rebuild

* Update src/installer.ts

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>

* Update installer.js

* Include the direct URL of the issue (not just the issue number)

* npm run build

---------

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
2024-06-19 16:58:30 -04:00
dependabot[bot]
63a26ece8c Bump braces from 3.0.2 to 3.0.3 (#246)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 11:03:37 -04:00
dependabot[bot]
4581e12ce4 Bump typescript from 5.3.3 to 5.4.5 (#238)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3 to 5.4.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 13:40:49 +00:00
dependabot[bot]
4212b2587b Bump @types/node from 20.12.2 to 20.12.8 (#239)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.2 to 20.12.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 09:34:54 -04:00
Dilum Aluthge
a515f9fb49 Add more error checking in getNightlyFileName (#237) 2024-04-28 20:02:37 -04:00
Sascha Mann
5fb759db5c Delete .github/workflows/backup.yml (#236)
This hasn't been working in ages and also probably wasn't a useful idea to begin with.
2024-04-19 13:39:15 +00:00
Sascha Mann
90754937ed CI: Update PR checks to node 20 (#235) 2024-04-19 07:48:05 -04:00
Dilum Aluthge
f5b61b79e1 README: recommend that users set up Dependabot version updates for GitHub Actions (#233) 2024-04-05 08:52:36 -04:00
Dilum Aluthge
ae2b920dd5 README: recommend v2 (#232) 2024-04-04 21:06:24 -04:00
Sascha Mann
699547385f Remove auto-assignment from bug report template (#231)
* Remove auto-assignment from bug report template
2024-04-03 07:24:26 -04:00
dependabot[bot]
85c0672686 Bump @types/node from 20.11.30 to 20.12.2 (#230)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.30 to 20.12.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 01:24:27 +02:00
Dilum Aluthge
b96a5725f5 Bump the version number to 2.0.0 in package.json and package-lock.json (#228)
* `package.json`: Bump the version number to 2.0.0

* `package-lock.json`: set the version number to `2.0.0`

* run `npm build`

---------

Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
2024-04-01 10:49:09 -04:00
Hendrik Ranocha
437a175294 update to node20 (#209)
Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
2024-04-01 09:56:39 -04:00
dependabot[bot]
e9d953d306 Bump @types/node from 20.11.16 to 20.11.30 (#226)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.16 to 20.11.30.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-22 18:30:02 +00:00
dependabot[bot]
4190528a8c Bump @types/semver from 7.5.6 to 7.5.8 (#222)
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.5.6 to 7.5.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

---
updated-dependencies:
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-22 18:19:11 +00:00
dependabot[bot]
9acd04fccc Bump nock from 13.5.1 to 13.5.4 (#224)
Bumps [nock](https://github.com/nock/nock) from 13.5.1 to 13.5.4.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.1...v13.5.4)

---
updated-dependencies:
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-22 14:10:48 -04:00
26 changed files with 18701 additions and 4994 deletions

View File

@@ -3,7 +3,6 @@ name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: SaschaMann
---

View File

@@ -1,34 +0,0 @@
name: Backup
on:
schedule:
- cron: '5 4 * * 0'
workflow_dispatch:
jobs:
backup:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Configure cache
uses: actions/cache@v4
with:
path: |
${{ env.GITHUB_WORKSPACE }}
~/.cache/restic
key: ${{ runner.os }}
- name: Install the correct Python version
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Run backup action
uses: julia-actions/restic-action@main
env: # Options: https://restic.readthedocs.io/en/latest/040_backup.html#environment-variables
RESTIC_REPOSITORY: b2:${{ secrets.B2_BUCKET }}:${{ github.repository }}
RESTIC_PASSWORD: ${{ secrets.RESTIC_PASSWORD }}
B2_ACCOUNT_ID: ${{ secrets.B2_ACCOUNT_ID }}
B2_ACCOUNT_KEY: ${{ secrets.B2_ACCOUNT_KEY }}

View File

@@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 16
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)

View File

@@ -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') }}

View File

@@ -22,7 +22,7 @@ jobs:
os:
- ubuntu-latest
- windows-latest
- macos-11 # Intel
# - macos-11 # Intel
- macos-12 # Intel
- macos-13 # Intel
- macos-14 # Apple Silicon
@@ -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') }}

View File

@@ -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') }}

View File

@@ -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
View File

@@ -1,3 +1,3 @@
node_modules/
__tests__/runner/*
# dist/
!dist/

1
.tool-versions Normal file
View File

@@ -0,0 +1 @@
nodejs 20.11.1

View File

@@ -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.

View File

@@ -5,24 +5,32 @@
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
### Inputs
```yaml
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
# The Julia version that will be installed and added as `julia` to the PATH.
# See "Julia Versions" below for a list of valid values.
@@ -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: ''
@@ -86,8 +94,8 @@ outputs:
```yaml
steps:
- uses: actions/checkout@v1.0.0
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- run: julia -e 'println("Hello, World!")'
@@ -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.
@@ -133,7 +143,7 @@ With `include-all-prereleases: true`, it would match `1.3.0-rc1`, `1.3.0-rc2`, `
If you want to run tests against the latest tagged version, no matter what version that is, you can use
```yaml
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: '1'
include-all-prereleases: true
@@ -159,9 +169,9 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1.0.0
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- run: julia -e 'println("Hello, World!")'
@@ -185,9 +195,9 @@ jobs:
julia-arch: x86
steps:
- uses: actions/checkout@v1.0.0
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
@@ -212,9 +222,9 @@ jobs:
julia-arch: x86
steps:
- uses: actions/checkout@v1.0.0
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- run: julia -e 'println("Hello, World!")'
@@ -237,23 +247,44 @@ This action follows [GitHub's advice](https://help.github.com/en/articles/about-
If you don't want to deal with updating the version of the action, similiarly to how Travis CI handles it, use `latest` or major version branches. [Dependabot](https://dependabot.com/) can also be used to automatically create Pull Requests to update actions used in your workflows.
It's unlikely, but not impossible, that there will be breaking changes post-v1.0.0 unless a new major version of Julia is introduced.
It's unlikely, but not impossible, that there will be breaking changes post-v2.0.0 unless a new major version of Julia is introduced.
You can specify commits, branches or tags in your workflows as follows:
```yaml
steps:
- uses: julia-actions/setup-julia@d3ce119a16594ea9e5d7974813970c73b6ab9e94 # commit SHA of the tagged 1.4.1 commit
- uses: julia-actions/setup-julia@f2258781c657ad9b4b88072c5eeaf9ec8c370874 # commit SHA of the tagged 2.0.0 commit
- uses: julia-actions/setup-julia@latest # latest version tag (may break existing workflows)
- uses: julia-actions/setup-julia@v1 # major version tag
- uses: julia-actions/setup-julia@v1.4 # minor version tag
- uses: julia-actions/setup-julia@v1.4.1 # specific version tag
- uses: julia-actions/setup-julia@v2 # major version tag
- uses: julia-actions/setup-julia@v2.0 # minor version tag
- uses: julia-actions/setup-julia@v2.0.0 # specific version tag
```
If your workflow requires access to secrets, you should always pin it to a commit SHA instead of a tag.
This will protect you in case a bad actor gains access to the setup-julia repo.
You can find more information in [GitHub's security hardening guide](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions).
## Using Dependabot version updates to keep your GitHub Actions up to date
We highly recommend that you set up Dependabot version updates on your repo to keep your GitHub Actions up to date.
To set up Dependabot version updates, create a file named `.github/dependabot.yml` in your repo with the following contents:
```yaml
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 99
labels:
- "dependencies"
- "github-actions"
```
For more details on Dependabot version updates, see the [GitHub Dependabot documentation](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates).
## Debug logs
You can enable [Step Debug Logs](https://github.com/actions/toolkit/blob/main/docs/action-debugging.md#step-debug-logs) for more detailed logs.
@@ -262,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

View File

@@ -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')
})
})

View File

@@ -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
@@ -23,7 +23,7 @@ outputs:
julia-bindir:
description: 'Path to the directory containing the Julia executable. Equivalent to JULIA_BINDIR: https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_BINDIR'
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
branding:
icon: 'download'

2
bin

Submodule bin updated: 31b4b500a3...874bfe398c

7
devdocs/README.md Normal file
View 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
View 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.

View 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
```

View File

@@ -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)

1000
dist/index.js vendored

File diff suppressed because it is too large Load Diff

79
lib/installer.js generated
View File

@@ -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;
@@ -150,18 +161,32 @@ function getNightlyFileName(arch) {
let fileExt1;
[fileExt1, ,] = getDesiredFileExts();
if (osPlat == 'win32') {
versionExt = arch == 'x64' ? '-win64' : '-win32';
if (arch == 'x86') {
versionExt = '-win32';
}
else if (arch == 'aarch64') {
throw new Error('Aarch64 Julia is not available on Windows');
}
else if (arch == 'x64') {
versionExt = '-win64';
}
else {
throw new Error(`Architecture ${arch} is not supported on Windows`);
}
}
else if (osPlat == 'darwin') {
if (arch == 'x86') {
throw new Error('32-bit Julia is not available on macOS');
throw new Error('32-bit (x86) Julia is not available on macOS');
}
else if (arch == 'aarch64') {
versionExt = '-macaarch64';
}
else {
else if (arch == 'x64') {
versionExt = '-mac64';
}
else {
throw new Error(`Architecture ${arch} is not supported on macOS`);
}
}
else if (osPlat === 'linux') {
if (arch == 'x86') {
@@ -170,9 +195,12 @@ function getNightlyFileName(arch) {
else if (arch == 'aarch64') {
versionExt = '-linux-aarch64';
}
else {
else if (arch == 'x64') {
versionExt = '-linux64';
}
else {
throw new Error(`Architecture ${arch} is not supported on Linux`);
}
}
else {
throw new Error(`Platform ${osPlat} is not supported`);
@@ -189,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) {
@@ -207,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
@@ -228,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
@@ -274,7 +327,9 @@ function installJulia(dest, versionInfo, version, arch) {
}
else {
// This is the more common path. Using .tar.gz is much faster
yield exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]);
// don't use the Git bash provided tar. Issue #205
// https://github.com/julia-actions/setup-julia/issues/205
yield exec.exec('powershell', ['-Command', `& "$env:WINDIR/System32/tar" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]);
}
return dest;
case 'darwin':
@@ -294,7 +349,6 @@ function installJulia(dest, versionInfo, version, arch) {
}
});
}
exports.installJulia = installJulia;
/**
* Test if Julia has been installed and print the version.
*
@@ -331,4 +385,3 @@ function showVersionInfo(showVersionInfoInput, version) {
}
});
}
exports.showVersionInfo = showVersionInfo;

39
lib/setup-julia.js generated
View File

@@ -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);

421
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "setup-julia",
"version": "1.9.6",
"version": "2.3.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "setup-julia",
"version": "1.9.6",
"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.11.16",
"@types/node": "^20.14.11",
"@types/retry": "^0.12.5",
"@types/semver": "^7.5.6",
"@types/semver": "^7.5.8",
"@vercel/ncc": "^0.38.1",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"nock": "^13.5.1",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
"nock": "^13.5.4",
"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.11.16",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz",
"integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==",
"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"
@@ -1482,9 +1482,9 @@
"dev": true
},
"node_modules/@types/semver": {
"version": "7.5.6",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
"integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
"version": "7.5.8",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
"dev": true
},
"node_modules/@types/stack-utils": {
@@ -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",
@@ -1761,12 +1767,12 @@
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@@ -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,10 +2279,40 @@
"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.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
@@ -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",
@@ -4388,9 +4527,9 @@
"dev": true
},
"node_modules/nock": {
"version": "13.5.1",
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.1.tgz",
"integrity": "sha512-+s7b73fzj5KnxbKH4Oaqz07tQ8degcMilU4rrmnKvI//b0JMBU4wEXFQ8zqr+3+L4eWSfU3H/UoIVGUV0tue1Q==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz",
"integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==",
"dev": true,
"dependencies": {
"debug": "^4.1.0",
@@ -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.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"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.11.16",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz",
"integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==",
"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"
@@ -6430,9 +6555,9 @@
"dev": true
},
"@types/semver": {
"version": "7.5.6",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
"integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
"version": "7.5.8",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
"dev": true
},
"@types/stack-utils": {
@@ -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",
@@ -6651,12 +6782,12 @@
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
}
},
"browserslist": {
@@ -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,10 +7142,39 @@
"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.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
@@ -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",
@@ -8587,9 +8819,9 @@
"dev": true
},
"nock": {
"version": "13.5.1",
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.1.tgz",
"integrity": "sha512-+s7b73fzj5KnxbKH4Oaqz07tQ8degcMilU4rrmnKvI//b0JMBU4wEXFQ8zqr+3+L4eWSfU3H/UoIVGUV0tue1Q==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz",
"integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==",
"dev": true,
"requires": {
"debug": "^4.1.0",
@@ -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.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
"integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
"dev": true
},
"undici-types": {

View File

@@ -1,6 +1,6 @@
{
"name": "setup-julia",
"version": "1.9.6",
"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.11.16",
"@types/node": "^20.14.11",
"@types/retry": "^0.12.5",
"@types/semver": "^7.5.6",
"@types/semver": "^7.5.8",
"@vercel/ncc": "^0.38.1",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"nock": "^13.5.1",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
"nock": "^13.5.4",
"prettier": "^3.3.3",
"ts-jest": "^29.2.3",
"typescript": "^5.5.3"
}
}

View File

@@ -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) {
@@ -124,22 +135,34 @@ function getNightlyFileName(arch: string): string {
[fileExt1, , ] = getDesiredFileExts()
if (osPlat == 'win32') {
versionExt = arch == 'x64' ? '-win64' : '-win32'
if (arch == 'x86') {
versionExt = '-win32'
} else if (arch == 'aarch64') {
throw new Error('Aarch64 Julia is not available on Windows')
} else if (arch == 'x64') {
versionExt = '-win64'
} else {
throw new Error(`Architecture ${arch} is not supported on Windows`)
}
} else if (osPlat == 'darwin') {
if (arch == 'x86') {
throw new Error('32-bit Julia is not available on macOS')
throw new Error('32-bit (x86) Julia is not available on macOS')
} else if (arch == 'aarch64') {
versionExt = '-macaarch64'
} else {
} else if (arch == 'x64') {
versionExt = '-mac64'
} else {
throw new Error(`Architecture ${arch} is not supported on macOS`)
}
} else if (osPlat === 'linux') {
if (arch == 'x86') {
versionExt = '-linux32'
} else if (arch == 'aarch64') {
versionExt = '-linux-aarch64'
} else {
} else if (arch == 'x64') {
versionExt = '-linux64'
} else {
throw new Error(`Architecture ${arch} is not supported on Linux`)
}
} else {
throw new Error(`Platform ${osPlat} is not supported`)
@@ -161,6 +184,7 @@ export function getFileInfo(versionInfo, version: string, arch: string) {
}
if (!versionInfo[version]) {
core.error(`Encountered error: ${err}`)
throw err
}
@@ -181,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
}
@@ -251,7 +306,9 @@ export async function installJulia(dest: string, versionInfo, version: string, a
}
} else {
// This is the more common path. Using .tar.gz is much faster
await exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`])
// don't use the Git bash provided tar. Issue #205
// https://github.com/julia-actions/setup-julia/issues/205
await exec.exec('powershell', ['-Command', `& "$env:WINDIR/System32/tar" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`])
}
return dest
case 'darwin':

View File

@@ -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)