mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-14 20:16:54 +08:00
Compare commits
1 Commits
SaschaMann
...
windows-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20e957a751 |
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
@@ -1,7 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: gitsubmodule
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: daily
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
2
.github/workflows/example-builds-nightly.yml
vendored
2
.github/workflows/example-builds-nightly.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
julia-version: [nightly, 1.8-nightly]
|
julia-version: [nightly, 1.6-nightly]
|
||||||
julia-arch: [x64, x86]
|
julia-arch: [x64, x86]
|
||||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
# 32-bit Julia binaries are not available on macOS
|
# 32-bit Julia binaries are not available on macOS
|
||||||
|
|||||||
6
.github/workflows/example-builds.yml
vendored
6
.github/workflows/example-builds.yml
vendored
@@ -4,7 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: ['main', 'master', 'releases/*']
|
branches: ['main', 'master', 'releases/*']
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -29,16 +28,11 @@ jobs:
|
|||||||
npm run build
|
npm run build
|
||||||
npm run pack
|
npm run pack
|
||||||
|
|
||||||
- run: mkdir -p ${{ github.workspace }}/dilumtestcache # TODO: delete this line
|
|
||||||
- name: "Set up Julia"
|
- name: "Set up Julia"
|
||||||
id: setup-julia
|
id: setup-julia
|
||||||
uses: ./
|
uses: ./
|
||||||
env:
|
|
||||||
RUNNER_TOOL_CACHE: ${{ github.workspace }}/dilumtestcache
|
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.julia-version }}
|
version: ${{ matrix.julia-version }}
|
||||||
arch: ${{ matrix.julia-arch }}
|
arch: ${{ matrix.julia-arch }}
|
||||||
- run: which julia # TODO: delete this line
|
|
||||||
- run: which -a julia # TODO: delete this line
|
|
||||||
- run: julia --version
|
- run: julia --version
|
||||||
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
|
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
|
||||||
|
|||||||
44
.github/workflows/windows-tests.yml
vendored
Normal file
44
.github/workflows/windows-tests.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name: Windows Benchmark
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
installer:
|
||||||
|
name: Installer
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download
|
||||||
|
run: curl -O https://julialang-s3.julialang.org/bin/winnt/x64/1.5/julia-1.5.3-win64.exe
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
Start-Process -FilePath julia-1.5.3-win64.exe -ArgumentList "/SILENT /dir=C:\Julia" -NoNewWindow -Wait
|
||||||
|
|
||||||
|
- name: Add to path
|
||||||
|
run: |
|
||||||
|
echo "C:\Julia\bin" >> $GITHUB_PATH
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- run: julia --version
|
||||||
|
|
||||||
|
archive:
|
||||||
|
name: Archive
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download
|
||||||
|
run: curl -O https://julialang-s3.julialang.org/bin/winnt/x64/1.5/julia-1.5.3-win64.zip
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
[System.IO.Compression.ZipFile]::ExtractToDirectory('julia-1.5.3-win64.zip', 'C:\Julia')
|
||||||
|
|
||||||
|
- name: Add to path
|
||||||
|
run: |
|
||||||
|
echo "C:\Julia\julia-1.5.3\bin" >> $GITHUB_PATH
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- run: julia --version
|
||||||
@@ -103,7 +103,7 @@ You can either specify specific Julia versions or version ranges. If you specify
|
|||||||
- `^1.3.0-0` is a **caret** version range that includes _all_ pre-releases. It matches all versions `≥ 1.3.0-` and `< 2.0.0`.
|
- `^1.3.0-0` is a **caret** version range that includes _all_ pre-releases. 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. It matches all versions `≥ 1.3.0-` and `< 1.4.0`.
|
- `~1.3.0-0` is a **tilde** version range that includes _all_ pre-releases. It matches all versions `≥ 1.3.0-` and `< 1.4.0`.
|
||||||
- `nightly` will install the latest nightly build.
|
- `nightly` will install the latest nightly build.
|
||||||
- `1.7-nightly` will install the latest nightly build for the upcoming 1.7 release. This version will only be available during certain phases of the Julia release cycle.
|
- `1.6-nightly` will install the latest nightly build for the upcoming 1.6 release. This version will only be available during certain phases of the Julia release cycle.
|
||||||
|
|
||||||
Internally the action uses node's semver package to resolve version ranges. Its [documentation](https://github.com/npm/node-semver#advanced-range-syntax) contains more details on the version range syntax. You can test what version will be selected for a given input in this JavaScript [REPL](https://repl.it/@SaschaMann/setup-julia-version-logic).
|
Internally the action uses node's semver package to resolve version ranges. Its [documentation](https://github.com/npm/node-semver#advanced-range-syntax) contains more details on the version range syntax. You can test what version will be selected for a given input in this JavaScript [REPL](https://repl.it/@SaschaMann/setup-julia-version-logic).
|
||||||
|
|
||||||
|
|||||||
10
lib/installer.js
generated
10
lib/installer.js
generated
@@ -124,19 +124,15 @@ function getNightlyFileName(arch) {
|
|||||||
return `julia-latest${versionExt}.${ext}`;
|
return `julia-latest${versionExt}.${ext}`;
|
||||||
}
|
}
|
||||||
function getFileInfo(versionInfo, version, arch) {
|
function getFileInfo(versionInfo, version, arch) {
|
||||||
const err = `Could not find ${archMap[arch]}/${version} binaries`;
|
|
||||||
if (version.endsWith('nightly')) {
|
if (version.endsWith('nightly')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (!versionInfo[version]) {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
for (let file of versionInfo[version].files) {
|
for (let file of versionInfo[version].files) {
|
||||||
if (file.os == osMap[osPlat] && file.arch == archMap[arch]) {
|
if (file.os == osMap[osPlat] && file.arch == archMap[arch]) {
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw err;
|
throw `Could not find ${archMap[arch]}/${version} binaries`;
|
||||||
}
|
}
|
||||||
exports.getFileInfo = getFileInfo;
|
exports.getFileInfo = getFileInfo;
|
||||||
function getDownloadURL(fileInfo, version, arch) {
|
function getDownloadURL(fileInfo, version, arch) {
|
||||||
@@ -150,10 +146,6 @@ function getDownloadURL(fileInfo, version, arch) {
|
|||||||
if (version == 'nightly') {
|
if (version == 'nightly') {
|
||||||
return `${baseURL}/${getNightlyFileName(arch)}`;
|
return `${baseURL}/${getNightlyFileName(arch)}`;
|
||||||
}
|
}
|
||||||
// Verify that fileInfo.url points at the official Julia download servers
|
|
||||||
if (!fileInfo.url.startsWith('https://julialang-s3.julialang.org/')) {
|
|
||||||
throw new Error(`versions.json points at a download location outside of Julia's download server: ${fileInfo.url}. Aborting for security reasons.`);
|
|
||||||
}
|
|
||||||
return fileInfo.url;
|
return fileInfo.url;
|
||||||
}
|
}
|
||||||
exports.getDownloadURL = getDownloadURL;
|
exports.getDownloadURL = getDownloadURL;
|
||||||
|
|||||||
8556
package-lock.json
generated
8556
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-julia",
|
"name": "setup-julia",
|
||||||
"version": "1.6.1",
|
"version": "1.6.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup Julia action",
|
"description": "setup Julia action",
|
||||||
"main": "lib/setup-julia.js",
|
"main": "lib/setup-julia.js",
|
||||||
|
|||||||
@@ -115,23 +115,17 @@ function getNightlyFileName(arch: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getFileInfo(versionInfo, version: string, arch: string) {
|
export function getFileInfo(versionInfo, version: string, arch: string) {
|
||||||
const err = `Could not find ${archMap[arch]}/${version} binaries`
|
|
||||||
|
|
||||||
if (version.endsWith('nightly')) {
|
if (version.endsWith('nightly')) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!versionInfo[version]) {
|
|
||||||
throw err
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let file of versionInfo[version].files) {
|
for (let file of versionInfo[version].files) {
|
||||||
if (file.os == osMap[osPlat] && file.arch == archMap[arch]) {
|
if (file.os == osMap[osPlat] && file.arch == archMap[arch]) {
|
||||||
return file
|
return file
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw err
|
throw `Could not find ${archMap[arch]}/${version} binaries`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDownloadURL(fileInfo, version: string, arch: string): string {
|
export function getDownloadURL(fileInfo, version: string, arch: string): string {
|
||||||
@@ -148,10 +142,6 @@ export function getDownloadURL(fileInfo, version: string, arch: string): string
|
|||||||
return `${baseURL}/${getNightlyFileName(arch)}`
|
return `${baseURL}/${getNightlyFileName(arch)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify that fileInfo.url points at the official Julia download servers
|
|
||||||
if (!fileInfo.url.startsWith('https://julialang-s3.julialang.org/')) {
|
|
||||||
throw new Error(`versions.json points at a download location outside of Julia's download server: ${fileInfo.url}. Aborting for security reasons.`)
|
|
||||||
}
|
|
||||||
return fileInfo.url
|
return fileInfo.url
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,12 +200,12 @@ export async function installJulia(versionInfo, version: string, arch: string):
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if Julia has been installed and print the version.
|
* Test if Julia has been installed and print the version.
|
||||||
*
|
*
|
||||||
* true => always show versioninfo
|
* true => always show versioninfo
|
||||||
* false => only show on nightlies
|
* false => only show on nightlies
|
||||||
* never => never show it anywhere
|
* never => never show it anywhere
|
||||||
*
|
*
|
||||||
* @param showVersionInfoInput
|
* @param showVersionInfoInput
|
||||||
*/
|
*/
|
||||||
export async function showVersionInfo(showVersionInfoInput: string, version: string): Promise<void> {
|
export async function showVersionInfo(showVersionInfoInput: string, version: string): Promise<void> {
|
||||||
// --compile=min -O0 reduces the time from ~1.8-1.9s to ~0.8-0.9s
|
// --compile=min -O0 reduces the time from ~1.8-1.9s to ~0.8-0.9s
|
||||||
@@ -225,7 +215,7 @@ export async function showVersionInfo(showVersionInfoInput: string, version: str
|
|||||||
case 'true':
|
case 'true':
|
||||||
exitCode = await exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()'])
|
exitCode = await exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()'])
|
||||||
break
|
break
|
||||||
|
|
||||||
case 'false':
|
case 'false':
|
||||||
if (version.endsWith('nightly')) {
|
if (version.endsWith('nightly')) {
|
||||||
exitCode = await exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()'])
|
exitCode = await exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()'])
|
||||||
@@ -233,7 +223,7 @@ export async function showVersionInfo(showVersionInfoInput: string, version: str
|
|||||||
exitCode = await exec.exec('julia', ['--version'])
|
exitCode = await exec.exec('julia', ['--version'])
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
||||||
case 'never':
|
case 'never':
|
||||||
exitCode = await exec.exec('julia', ['--version'])
|
exitCode = await exec.exec('julia', ['--version'])
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user