Compare commits

..

1 Commits
v2.1 ... v1.9

Author SHA1 Message Date
Ian Butterworth
ac0d62164d Add production dependencies & build 2024-02-13 13:39:28 -05:00
12 changed files with 118 additions and 155 deletions

View File

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

34
.github/workflows/backup.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
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 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 16
- name: "npm ci" - name: "npm ci"
run: npm ci run: npm ci

View File

@@ -22,7 +22,7 @@ jobs:
os: os:
- ubuntu-latest - ubuntu-latest
- windows-latest - windows-latest
# - macos-11 # Intel - macos-11 # Intel
- macos-12 # Intel - macos-12 # Intel
- macos-13 # Intel - macos-13 # Intel
- macos-14 # Apple Silicon - macos-14 # Apple Silicon

1
.gitignore vendored
View File

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

View File

@@ -22,7 +22,7 @@ This action sets up a Julia environment for use in actions by downloading a spec
### Inputs ### Inputs
```yaml ```yaml
- uses: julia-actions/setup-julia@v2 - uses: julia-actions/setup-julia@v1
with: with:
# The Julia version that will be installed and added as `julia` to the PATH. # The Julia version that will be installed and added as `julia` to the PATH.
# See "Julia Versions" below for a list of valid values. # See "Julia Versions" below for a list of valid values.
@@ -86,8 +86,8 @@ outputs:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v1.0.0
- uses: julia-actions/setup-julia@v2 - uses: julia-actions/setup-julia@v1
with: with:
version: '1.10' version: '1.10'
- run: julia -e 'println("Hello, World!")' - run: julia -e 'println("Hello, World!")'
@@ -133,7 +133,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 If you want to run tests against the latest tagged version, no matter what version that is, you can use
```yaml ```yaml
- uses: julia-actions/setup-julia@v2 - uses: julia-actions/setup-julia@v1
with: with:
version: '1' version: '1'
include-all-prereleases: true include-all-prereleases: true
@@ -159,9 +159,9 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest] os: [ubuntu-latest, windows-latest, macOS-latest]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v1.0.0
- name: "Set up Julia" - name: "Set up Julia"
uses: julia-actions/setup-julia@v2 uses: julia-actions/setup-julia@v1
with: with:
version: ${{ matrix.julia-version }} version: ${{ matrix.julia-version }}
- run: julia -e 'println("Hello, World!")' - run: julia -e 'println("Hello, World!")'
@@ -185,9 +185,9 @@ jobs:
julia-arch: x86 julia-arch: x86
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v1.0.0
- name: "Set up Julia" - name: "Set up Julia"
uses: julia-actions/setup-julia@v2 uses: julia-actions/setup-julia@v1
with: with:
version: ${{ matrix.julia-version }} version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }} arch: ${{ matrix.julia-arch }}
@@ -212,9 +212,9 @@ jobs:
julia-arch: x86 julia-arch: x86
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v1.0.0
- name: "Set up Julia" - name: "Set up Julia"
uses: julia-actions/setup-julia@v2 uses: julia-actions/setup-julia@v1
with: with:
version: ${{ matrix.julia-version }} version: ${{ matrix.julia-version }}
- run: julia -e 'println("Hello, World!")' - run: julia -e 'println("Hello, World!")'
@@ -237,44 +237,23 @@ 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. 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-v2.0.0 unless a new major version of Julia is introduced. 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.
You can specify commits, branches or tags in your workflows as follows: You can specify commits, branches or tags in your workflows as follows:
```yaml ```yaml
steps: steps:
- uses: julia-actions/setup-julia@f2258781c657ad9b4b88072c5eeaf9ec8c370874 # commit SHA of the tagged 2.0.0 commit - uses: julia-actions/setup-julia@d3ce119a16594ea9e5d7974813970c73b6ab9e94 # commit SHA of the tagged 1.4.1 commit
- uses: julia-actions/setup-julia@latest # latest version tag (may break existing workflows) - uses: julia-actions/setup-julia@latest # latest version tag (may break existing workflows)
- uses: julia-actions/setup-julia@v2 # major version tag - uses: julia-actions/setup-julia@v1 # major version tag
- uses: julia-actions/setup-julia@v2.0 # minor version tag - uses: julia-actions/setup-julia@v1.4 # minor version tag
- uses: julia-actions/setup-julia@v2.0.0 # specific version tag - uses: julia-actions/setup-julia@v1.4.1 # specific version tag
``` ```
If your workflow requires access to secrets, you should always pin it to a commit SHA instead of a 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. 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). 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 ## 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. You can enable [Step Debug Logs](https://github.com/actions/toolkit/blob/main/docs/action-debugging.md#step-debug-logs) for more detailed logs.

View File

@@ -23,7 +23,7 @@ outputs:
julia-bindir: 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' 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: runs:
using: 'node20' using: 'node16'
main: 'dist/index.js' main: 'dist/index.js'
branding: branding:
icon: 'download' icon: 'download'

29
dist/index.js vendored
View File

@@ -157,31 +157,17 @@ function getNightlyFileName(arch) {
let fileExt1; let fileExt1;
[fileExt1, ,] = getDesiredFileExts(); [fileExt1, ,] = getDesiredFileExts();
if (osPlat == 'win32') { if (osPlat == 'win32') {
if (arch == 'x86') { versionExt = arch == 'x64' ? '-win64' : '-win32';
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') { else if (osPlat == 'darwin') {
if (arch == 'x86') { if (arch == 'x86') {
throw new Error('32-bit (x86) Julia is not available on macOS'); throw new Error('32-bit Julia is not available on macOS');
} }
else if (arch == 'aarch64') { else if (arch == 'aarch64') {
versionExt = '-macaarch64'; versionExt = '-macaarch64';
} }
else if (arch == 'x64') {
versionExt = '-mac64';
}
else { else {
throw new Error(`Architecture ${arch} is not supported on macOS`); versionExt = '-mac64';
} }
} }
else if (osPlat === 'linux') { else if (osPlat === 'linux') {
@@ -191,11 +177,8 @@ function getNightlyFileName(arch) {
else if (arch == 'aarch64') { else if (arch == 'aarch64') {
versionExt = '-linux-aarch64'; versionExt = '-linux-aarch64';
} }
else if (arch == 'x64') {
versionExt = '-linux64';
}
else { else {
throw new Error(`Architecture ${arch} is not supported on Linux`); versionExt = '-linux64';
} }
} }
else { else {
@@ -298,9 +281,7 @@ function installJulia(dest, versionInfo, version, arch) {
} }
else { else {
// This is the more common path. Using .tar.gz is much faster // This is the more common path. Using .tar.gz is much faster
// don't use the Git bash provided tar. Issue #205 yield exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]);
// 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; return dest;
case 'darwin': case 'darwin':

29
lib/installer.js generated
View File

@@ -150,31 +150,17 @@ function getNightlyFileName(arch) {
let fileExt1; let fileExt1;
[fileExt1, ,] = getDesiredFileExts(); [fileExt1, ,] = getDesiredFileExts();
if (osPlat == 'win32') { if (osPlat == 'win32') {
if (arch == 'x86') { versionExt = arch == 'x64' ? '-win64' : '-win32';
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') { else if (osPlat == 'darwin') {
if (arch == 'x86') { if (arch == 'x86') {
throw new Error('32-bit (x86) Julia is not available on macOS'); throw new Error('32-bit Julia is not available on macOS');
} }
else if (arch == 'aarch64') { else if (arch == 'aarch64') {
versionExt = '-macaarch64'; versionExt = '-macaarch64';
} }
else if (arch == 'x64') {
versionExt = '-mac64';
}
else { else {
throw new Error(`Architecture ${arch} is not supported on macOS`); versionExt = '-mac64';
} }
} }
else if (osPlat === 'linux') { else if (osPlat === 'linux') {
@@ -184,11 +170,8 @@ function getNightlyFileName(arch) {
else if (arch == 'aarch64') { else if (arch == 'aarch64') {
versionExt = '-linux-aarch64'; versionExt = '-linux-aarch64';
} }
else if (arch == 'x64') {
versionExt = '-linux64';
}
else { else {
throw new Error(`Architecture ${arch} is not supported on Linux`); versionExt = '-linux64';
} }
} }
else { else {
@@ -291,9 +274,7 @@ function installJulia(dest, versionInfo, version, arch) {
} }
else { else {
// This is the more common path. Using .tar.gz is much faster // This is the more common path. Using .tar.gz is much faster
// don't use the Git bash provided tar. Issue #205 yield exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]);
// 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; return dest;
case 'darwin': case 'darwin':

88
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "setup-julia", "name": "setup-julia",
"version": "2.1.0", "version": "1.9.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "setup-julia", "name": "setup-julia",
"version": "2.1.0", "version": "1.9.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
@@ -19,16 +19,16 @@
"devDependencies": { "devDependencies": {
"@types/async-retry": "^1.4.8", "@types/async-retry": "^1.4.8",
"@types/jest": "^29.5.12", "@types/jest": "^29.5.12",
"@types/node": "^20.12.8", "@types/node": "^20.11.16",
"@types/retry": "^0.12.5", "@types/retry": "^0.12.5",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.6",
"@vercel/ncc": "^0.38.1", "@vercel/ncc": "^0.38.1",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-circus": "^29.7.0", "jest-circus": "^29.7.0",
"nock": "^13.5.4", "nock": "^13.5.1",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"ts-jest": "^29.1.2", "ts-jest": "^29.1.2",
"typescript": "^5.4.5" "typescript": "^5.3.3"
} }
}, },
"node_modules/@actions/core": { "node_modules/@actions/core": {
@@ -1467,9 +1467,9 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.12.8", "version": "20.11.16",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz",
"integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==", "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
@@ -1482,9 +1482,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/semver": { "node_modules/@types/semver": {
"version": "7.5.8", "version": "7.5.6",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
"dev": true "dev": true
}, },
"node_modules/@types/stack-utils": { "node_modules/@types/stack-utils": {
@@ -1761,12 +1761,12 @@
} }
}, },
"node_modules/braces": { "node_modules/braces": {
"version": "3.0.3", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fill-range": "^7.1.1" "fill-range": "^7.0.1"
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=8"
@@ -2259,9 +2259,9 @@
} }
}, },
"node_modules/fill-range": { "node_modules/fill-range": {
"version": "7.1.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
@@ -4388,9 +4388,9 @@
"dev": true "dev": true
}, },
"node_modules/nock": { "node_modules/nock": {
"version": "13.5.4", "version": "13.5.1",
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.1.tgz",
"integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", "integrity": "sha512-+s7b73fzj5KnxbKH4Oaqz07tQ8degcMilU4rrmnKvI//b0JMBU4wEXFQ8zqr+3+L4eWSfU3H/UoIVGUV0tue1Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"debug": "^4.1.0", "debug": "^4.1.0",
@@ -5064,9 +5064,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.4.5", "version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
@@ -6415,9 +6415,9 @@
} }
}, },
"@types/node": { "@types/node": {
"version": "20.12.8", "version": "20.11.16",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz",
"integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==", "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
@@ -6430,9 +6430,9 @@
"dev": true "dev": true
}, },
"@types/semver": { "@types/semver": {
"version": "7.5.8", "version": "7.5.6",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
"dev": true "dev": true
}, },
"@types/stack-utils": { "@types/stack-utils": {
@@ -6651,12 +6651,12 @@
} }
}, },
"braces": { "braces": {
"version": "3.0.3", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true, "dev": true,
"requires": { "requires": {
"fill-range": "^7.1.1" "fill-range": "^7.0.1"
} }
}, },
"browserslist": { "browserslist": {
@@ -7003,9 +7003,9 @@
} }
}, },
"fill-range": { "fill-range": {
"version": "7.1.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
@@ -8587,9 +8587,9 @@
"dev": true "dev": true
}, },
"nock": { "nock": {
"version": "13.5.4", "version": "13.5.1",
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.1.tgz",
"integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", "integrity": "sha512-+s7b73fzj5KnxbKH4Oaqz07tQ8degcMilU4rrmnKvI//b0JMBU4wEXFQ8zqr+3+L4eWSfU3H/UoIVGUV0tue1Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"debug": "^4.1.0", "debug": "^4.1.0",
@@ -9055,9 +9055,9 @@
"dev": true "dev": true
}, },
"typescript": { "typescript": {
"version": "5.4.5", "version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"dev": true "dev": true
}, },
"undici-types": { "undici-types": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "setup-julia", "name": "setup-julia",
"version": "2.1.0", "version": "1.9.6",
"private": true, "private": true,
"description": "setup Julia action", "description": "setup Julia action",
"main": "lib/setup-julia.js", "main": "lib/setup-julia.js",
@@ -31,15 +31,15 @@
"devDependencies": { "devDependencies": {
"@types/async-retry": "^1.4.8", "@types/async-retry": "^1.4.8",
"@types/jest": "^29.5.12", "@types/jest": "^29.5.12",
"@types/node": "^20.12.8", "@types/node": "^20.11.16",
"@types/retry": "^0.12.5", "@types/retry": "^0.12.5",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.6",
"@vercel/ncc": "^0.38.1", "@vercel/ncc": "^0.38.1",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-circus": "^29.7.0", "jest-circus": "^29.7.0",
"nock": "^13.5.4", "nock": "^13.5.1",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"ts-jest": "^29.1.2", "ts-jest": "^29.1.2",
"typescript": "^5.4.5" "typescript": "^5.3.3"
} }
} }

View File

@@ -124,34 +124,22 @@ function getNightlyFileName(arch: string): string {
[fileExt1, , ] = getDesiredFileExts() [fileExt1, , ] = getDesiredFileExts()
if (osPlat == 'win32') { if (osPlat == 'win32') {
if (arch == 'x86') { versionExt = arch == 'x64' ? '-win64' : '-win32'
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') { } else if (osPlat == 'darwin') {
if (arch == 'x86') { if (arch == 'x86') {
throw new Error('32-bit (x86) Julia is not available on macOS') throw new Error('32-bit Julia is not available on macOS')
} else if (arch == 'aarch64') { } else if (arch == 'aarch64') {
versionExt = '-macaarch64' versionExt = '-macaarch64'
} else if (arch == 'x64') {
versionExt = '-mac64'
} else { } else {
throw new Error(`Architecture ${arch} is not supported on macOS`) versionExt = '-mac64'
} }
} else if (osPlat === 'linux') { } else if (osPlat === 'linux') {
if (arch == 'x86') { if (arch == 'x86') {
versionExt = '-linux32' versionExt = '-linux32'
} else if (arch == 'aarch64') { } else if (arch == 'aarch64') {
versionExt = '-linux-aarch64' versionExt = '-linux-aarch64'
} else if (arch == 'x64') {
versionExt = '-linux64'
} else { } else {
throw new Error(`Architecture ${arch} is not supported on Linux`) versionExt = '-linux64'
} }
} else { } else {
throw new Error(`Platform ${osPlat} is not supported`) throw new Error(`Platform ${osPlat} is not supported`)
@@ -263,9 +251,7 @@ export async function installJulia(dest: string, versionInfo, version: string, a
} }
} else { } else {
// This is the more common path. Using .tar.gz is much faster // This is the more common path. Using .tar.gz is much faster
// don't use the Git bash provided tar. Issue #205 await exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`])
// 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 return dest
case 'darwin': case 'darwin':