mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 19:16:54 +08:00
Compare commits
29 Commits
releases/v
...
v1.9.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58ad1cdde7 | ||
|
|
a86c40a7ef | ||
|
|
5ee76acf71 | ||
|
|
aa55906904 | ||
|
|
3fd1872eb1 | ||
|
|
022282ae13 | ||
|
|
3d2a9887ca | ||
|
|
56e107761d | ||
|
|
8a5ee44838 | ||
|
|
84c4368e8a | ||
|
|
9c1e77be1e | ||
|
|
0e1e5daf3b | ||
|
|
23a5f339d0 | ||
|
|
6b19329a6c | ||
|
|
5ed2862b88 | ||
|
|
431db78ca5 | ||
|
|
400582c979 | ||
|
|
87851b8730 | ||
|
|
c21388676f | ||
|
|
9179217812 | ||
|
|
9ddbd3e829 | ||
|
|
ac49140569 | ||
|
|
ca4f81e332 | ||
|
|
90d78ece70 | ||
|
|
7c41900d93 | ||
|
|
54863dca42 | ||
|
|
2960172124 | ||
|
|
f132be810e | ||
|
|
6d60bc8709 |
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
@@ -5,3 +5,13 @@ updates:
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: 'github-actions'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: monthly
|
||||
|
||||
4
.github/workflows/backup.yml
vendored
4
.github/workflows/backup.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Configure cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
${{ env.GITHUB_WORKSPACE }}
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
key: ${{ runner.os }}
|
||||
|
||||
- name: Install the correct Python version
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
|
||||
6
.github/workflows/checkin.yml
vendored
6
.github/workflows/checkin.yml
vendored
@@ -12,7 +12,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: "npm ci"
|
||||
run: npm ci
|
||||
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -42,11 +42,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -71,4 +71,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
@@ -23,9 +23,15 @@ jobs:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1.0.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
@@ -18,13 +18,19 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
julia-version: [nightly, 1.8-nightly]
|
||||
julia-version: [nightly, 1.10-nightly]
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1.0.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
10
.github/workflows/example-builds-nightly.yml
vendored
10
.github/workflows/example-builds-nightly.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
julia-version: [nightly, 1.8-nightly]
|
||||
julia-version: [nightly, 1.10-nightly]
|
||||
julia-arch: [x64, x86]
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
# 32-bit Julia binaries are not available on macOS
|
||||
@@ -29,9 +29,15 @@ jobs:
|
||||
julia-arch: x86
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1.0.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
8
.github/workflows/example-builds.yml
vendored
8
.github/workflows/example-builds.yml
vendored
@@ -28,9 +28,15 @@ jobs:
|
||||
julia-arch: x86
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1.0.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: "Install dependencies"
|
||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# setup-julia Action
|
||||
|
||||
[](https://securitylab.github.com/tools/codeql)
|
||||
[](https://dependabot.com)
|
||||
|
||||
This action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.
|
||||
|
||||
@@ -98,7 +97,9 @@ steps:
|
||||
|
||||
You can either specify specific Julia versions or version ranges. If you specify a version range, the **highest** available Julia version that matches the range will be selected.
|
||||
|
||||
**Warning:** It is strongly recommended to wrap versions 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`.
|
||||
> **Warning**
|
||||
>
|
||||
> It is strongly recommended to wrap versions 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`.
|
||||
|
||||
#### Examples
|
||||
|
||||
|
||||
2
bin
2
bin
Submodule bin updated: 31b4b500a3...047c0c66bc
13032
dist/index.js
vendored
13032
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
26
lib/installer.js
generated
26
lib/installer.js
generated
@@ -84,8 +84,9 @@ function getJuliaVersionInfo() {
|
||||
const versionsFile = yield retry((bail) => __awaiter(this, void 0, void 0, function* () {
|
||||
return yield tc.downloadTool('https://julialang-s3.julialang.org/bin/versions.json');
|
||||
}), {
|
||||
retries: 5,
|
||||
onRetry: (err) => {
|
||||
core.debug(`Download of versions.json failed, trying again. Error: ${err}`);
|
||||
core.info(`Download of versions.json failed, trying again. Error: ${err}`);
|
||||
}
|
||||
});
|
||||
return JSON.parse(fs.readFileSync(versionsFile).toString());
|
||||
@@ -125,9 +126,9 @@ function getDesiredFileExts() {
|
||||
let hasFileExt2;
|
||||
let fileExt2;
|
||||
if (osPlat == 'win32') {
|
||||
fileExt1 = 'exe';
|
||||
hasFileExt2 = false;
|
||||
fileExt2 = '';
|
||||
fileExt1 = 'tar.gz';
|
||||
hasFileExt2 = true;
|
||||
fileExt2 = 'exe';
|
||||
}
|
||||
else if (osPlat == 'darwin') {
|
||||
fileExt1 = 'tar.gz';
|
||||
@@ -226,8 +227,9 @@ function installJulia(versionInfo, version, arch) {
|
||||
const juliaDownloadPath = yield retry((bail) => __awaiter(this, void 0, void 0, function* () {
|
||||
return yield tc.downloadTool(downloadURL);
|
||||
}), {
|
||||
retries: 5,
|
||||
onRetry: (err) => {
|
||||
core.debug(`Download of ${downloadURL} failed, trying again. Error: ${err}`);
|
||||
core.info(`Download of ${downloadURL} failed, trying again. Error: ${err}`);
|
||||
}
|
||||
});
|
||||
// Verify checksum
|
||||
@@ -249,12 +251,18 @@ function installJulia(versionInfo, version, arch) {
|
||||
yield exec.exec('tar', ['xf', juliaDownloadPath, '--strip-components=1', '-C', tempInstallDir]);
|
||||
return tempInstallDir;
|
||||
case 'win32':
|
||||
if (version.endsWith('nightly') || semver.gtr(version, '1.3', { includePrerelease: true })) {
|
||||
// The installer changed in 1.4: https://github.com/JuliaLang/julia/blob/ef0c9108b12f3ae177c51037934351ffa703b0b5/NEWS.md#build-system-changes
|
||||
yield exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/SILENT /dir=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`]);
|
||||
if (fileInfo !== null && fileInfo.extension == 'exe') {
|
||||
if (version.endsWith('nightly') || semver.gtr(version, '1.3', { includePrerelease: true })) {
|
||||
// The installer changed in 1.4: https://github.com/JuliaLang/julia/blob/ef0c9108b12f3ae177c51037934351ffa703b0b5/NEWS.md#build-system-changes
|
||||
yield exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/SILENT /dir=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`]);
|
||||
}
|
||||
else {
|
||||
yield exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
yield exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`]);
|
||||
// This is the more common path. Using .tar.gz is much faster
|
||||
yield exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${tempInstallDir}`]);
|
||||
}
|
||||
return tempInstallDir;
|
||||
case 'darwin':
|
||||
|
||||
3363
package-lock.json
generated
3363
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-julia",
|
||||
"version": "1.9.2",
|
||||
"version": "1.9.4",
|
||||
"private": true,
|
||||
"description": "setup Julia action",
|
||||
"main": "lib/setup-julia.js",
|
||||
@@ -23,23 +23,23 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"async-retry": "^1.3.3",
|
||||
"semver": "^7.3.8"
|
||||
"semver": "^7.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/async-retry": "^1.4.5",
|
||||
"@types/jest": "^29.4.0",
|
||||
"@types/node": "^16.18.12",
|
||||
"@types/jest": "^29.5.0",
|
||||
"@types/node": "^18.14.2",
|
||||
"@types/retry": "^0.12.2",
|
||||
"@types/semver": "^7.3.13",
|
||||
"@zeit/ncc": "^0.22.3",
|
||||
"jest": "^29.4.2",
|
||||
"jest-circus": "^29.4.2",
|
||||
"nock": "^13.3.0",
|
||||
"prettier": "^2.8.4",
|
||||
"@types/semver": "^7.5.6",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"jest": "^29.5.0",
|
||||
"jest-circus": "^29.5.0",
|
||||
"nock": "^13.3.8",
|
||||
"prettier": "^3.1.0",
|
||||
"ts-jest": "^29.0.5",
|
||||
"typescript": "^4.9.5"
|
||||
"typescript": "^5.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,9 @@ export async function getJuliaVersionInfo(): Promise<object> {
|
||||
const versionsFile = await retry(async (bail: Function) => {
|
||||
return await tc.downloadTool('https://julialang-s3.julialang.org/bin/versions.json')
|
||||
}, {
|
||||
retries: 5,
|
||||
onRetry: (err: Error) => {
|
||||
core.debug(`Download of versions.json failed, trying again. Error: ${err}`)
|
||||
core.info(`Download of versions.json failed, trying again. Error: ${err}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -99,9 +100,9 @@ function getDesiredFileExts(): [string, boolean, string] {
|
||||
let fileExt2: string
|
||||
|
||||
if (osPlat == 'win32') {
|
||||
fileExt1 = 'exe'
|
||||
hasFileExt2 = false
|
||||
fileExt2 = ''
|
||||
fileExt1 = 'tar.gz'
|
||||
hasFileExt2 = true
|
||||
fileExt2 = 'exe'
|
||||
} else if (osPlat == 'darwin') {
|
||||
fileExt1 = 'tar.gz'
|
||||
hasFileExt2 = true
|
||||
@@ -208,8 +209,9 @@ export async function installJulia(versionInfo, version: string, arch: string):
|
||||
const juliaDownloadPath = await retry(async (bail: Function) => {
|
||||
return await tc.downloadTool(downloadURL)
|
||||
}, {
|
||||
retries: 5,
|
||||
onRetry: (err: Error) => {
|
||||
core.debug(`Download of ${downloadURL} failed, trying again. Error: ${err}`)
|
||||
core.info(`Download of ${downloadURL} failed, trying again. Error: ${err}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -233,11 +235,16 @@ export async function installJulia(versionInfo, version: string, arch: string):
|
||||
await exec.exec('tar', ['xf', juliaDownloadPath, '--strip-components=1', '-C', tempInstallDir])
|
||||
return tempInstallDir
|
||||
case 'win32':
|
||||
if (version.endsWith('nightly') || semver.gtr(version, '1.3', {includePrerelease: true})) {
|
||||
// The installer changed in 1.4: https://github.com/JuliaLang/julia/blob/ef0c9108b12f3ae177c51037934351ffa703b0b5/NEWS.md#build-system-changes
|
||||
await exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/SILENT /dir=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`])
|
||||
if (fileInfo !== null && fileInfo.extension == 'exe') {
|
||||
if (version.endsWith('nightly') || semver.gtr(version, '1.3', {includePrerelease: true})) {
|
||||
// The installer changed in 1.4: https://github.com/JuliaLang/julia/blob/ef0c9108b12f3ae177c51037934351ffa703b0b5/NEWS.md#build-system-changes
|
||||
await exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/SILENT /dir=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`])
|
||||
} else {
|
||||
await exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`])
|
||||
}
|
||||
} else {
|
||||
await exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${path.join(process.cwd(), tempInstallDir)}" -NoNewWindow -Wait`])
|
||||
// This is the more common path. Using .tar.gz is much faster
|
||||
await exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${tempInstallDir}`])
|
||||
}
|
||||
return tempInstallDir
|
||||
case 'darwin':
|
||||
|
||||
Reference in New Issue
Block a user