mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-18 05:56:54 +08:00
Compare commits
8 Commits
ib/force_a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0504def29 | ||
|
|
7242f2d36e | ||
|
|
1ade3ab195 | ||
|
|
67e9ca1177 | ||
|
|
a29b9e4c77 | ||
|
|
7449f781cd | ||
|
|
8dccd20879 | ||
|
|
96b12c59b6 |
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -42,11 +42,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6.0.1
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v4
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# 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).
|
# 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)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v4
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@@ -71,4 +71,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v4
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ jobs:
|
|||||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6.0.1
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||||
with:
|
with:
|
||||||
node-version-file: '.tool-versions'
|
node-version-file: '.tool-versions'
|
||||||
|
|||||||
@@ -18,18 +18,18 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
julia-version: [nightly, 1.10-nightly]
|
julia-version: [nightly, 1.13-nightly]
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- windows-latest
|
- windows-latest
|
||||||
- macos-13 # Intel
|
- macos-15-intel # Intel
|
||||||
- macos-14 # Apple Silicon
|
- macos-14 # Apple Silicon
|
||||||
- macos-latest # Apple Silicon
|
- macos-latest # Apple Silicon
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6.0.1
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||||
with:
|
with:
|
||||||
node-version-file: '.tool-versions'
|
node-version-file: '.tool-versions'
|
||||||
|
|||||||
6
.github/workflows/example-builds-nightly.yml
vendored
6
.github/workflows/example-builds-nightly.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
julia-version: [nightly, 1.10-nightly]
|
julia-version: [nightly, 1.13-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
|
||||||
@@ -29,9 +29,9 @@ jobs:
|
|||||||
julia-arch: x86
|
julia-arch: x86
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6.0.1
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||||
with:
|
with:
|
||||||
node-version-file: '.tool-versions'
|
node-version-file: '.tool-versions'
|
||||||
|
|||||||
4
.github/workflows/example-builds.yml
vendored
4
.github/workflows/example-builds.yml
vendored
@@ -36,9 +36,9 @@ jobs:
|
|||||||
julia-version: '1'
|
julia-version: '1'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6.0.1
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }}
|
||||||
with:
|
with:
|
||||||
node-version-file: '.tool-versions'
|
node-version-file: '.tool-versions'
|
||||||
|
|||||||
26
.github/workflows/pr_checks.yml
vendored
26
.github/workflows/pr_checks.yml
vendored
@@ -39,21 +39,21 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
### Check out the repo:
|
### Check out the repo:
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
### Cleanall:
|
### Cleanall:
|
||||||
- run: make cleanall
|
- run: make cleanall
|
||||||
### Install NodeJS
|
### Install NodeJS
|
||||||
# Unix (non-Windows):
|
# Unix (non-Windows):
|
||||||
- uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
|
- uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
- run: make unix-asdf-install
|
- run: make unix-asdf-install
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
# Windows:
|
# Windows:
|
||||||
# Windows does not support asdf, so we have to use `actions/setup-node`
|
# Windows does not support asdf, so we have to use `actions/setup-node`
|
||||||
# to install asdf:
|
# to install asdf:
|
||||||
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
- uses: actions/setup-node@dda4788290998366da86b6a4f497909644397bb2
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
with:
|
with:
|
||||||
node-version-file: '.tool-versions'
|
node-version-file: '.tool-versions'
|
||||||
@@ -82,21 +82,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
### Check out the repo:
|
### Check out the repo:
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
### Cleanall:
|
### Cleanall:
|
||||||
- run: make cleanall
|
- run: make cleanall
|
||||||
### Install NodeJS
|
### Install NodeJS
|
||||||
# Unix (non-Windows):
|
# Unix (non-Windows):
|
||||||
- uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
|
- uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
- run: make unix-asdf-install
|
- run: make unix-asdf-install
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
# Windows:
|
# Windows:
|
||||||
# Windows does not support asdf, so we have to use `actions/setup-node`
|
# Windows does not support asdf, so we have to use `actions/setup-node`
|
||||||
# to install asdf:
|
# to install asdf:
|
||||||
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
- uses: actions/setup-node@dda4788290998366da86b6a4f497909644397bb2
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
with:
|
with:
|
||||||
node-version-file: '.tool-versions'
|
node-version-file: '.tool-versions'
|
||||||
@@ -126,21 +126,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
### Check out the repo:
|
### Check out the repo:
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
### Cleanall:
|
### Cleanall:
|
||||||
- run: make cleanall
|
- run: make cleanall
|
||||||
### Install NodeJS
|
### Install NodeJS
|
||||||
# Unix (non-Windows):
|
# Unix (non-Windows):
|
||||||
- uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
|
- uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
- run: make unix-asdf-install
|
- run: make unix-asdf-install
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
# Windows:
|
# Windows:
|
||||||
# Windows does not support asdf, so we have to use `actions/setup-node`
|
# Windows does not support asdf, so we have to use `actions/setup-node`
|
||||||
# to install asdf:
|
# to install asdf:
|
||||||
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
- uses: actions/setup-node@dda4788290998366da86b6a4f497909644397bb2
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
with:
|
with:
|
||||||
node-version-file: '.tool-versions'
|
node-version-file: '.tool-versions'
|
||||||
@@ -161,14 +161,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
### Check out the repo:
|
### Check out the repo:
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
### Cleanall:
|
### Cleanall:
|
||||||
- run: make cleanall
|
- run: make cleanall
|
||||||
### Install NodeJS
|
### Install NodeJS
|
||||||
# Unix (non-Windows):
|
# Unix (non-Windows):
|
||||||
- uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
|
- uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
- run: make unix-asdf-install
|
- run: make unix-asdf-install
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
@@ -199,12 +199,12 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
### Check out the repo:
|
### Check out the repo:
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
### Install NodeJS
|
### Install NodeJS
|
||||||
# Unix (non-Windows):
|
# Unix (non-Windows):
|
||||||
- uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
|
- uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
- run: make unix-asdf-install
|
- run: make unix-asdf-install
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -56,18 +56,6 @@ This action sets up a Julia environment for use in actions by downloading a spec
|
|||||||
# Specifying 'default' uses the architecture of the runner executing the job.
|
# Specifying 'default' uses the architecture of the runner executing the job.
|
||||||
arch: 'default'
|
arch: 'default'
|
||||||
|
|
||||||
# Force the use of the specified architecture even when it may be suboptimal on the runner.
|
|
||||||
#
|
|
||||||
# By default, requesting x86 or x64 on an aarch64 macOS runner (Apple Silicon) will fail with an error,
|
|
||||||
# as this is usually a misconfiguration. Set this to 'true' to override the error and allow the installation.
|
|
||||||
#
|
|
||||||
# Note: x64 Julia can run on Apple Silicon via Rosetta 2, but native aarch64 is typically preferred.
|
|
||||||
#
|
|
||||||
# Supported values: true | false
|
|
||||||
#
|
|
||||||
# Default: false
|
|
||||||
force-arch: 'false'
|
|
||||||
|
|
||||||
# Set the display setting for printing InteractiveUtils.versioninfo() after installing.
|
# Set the display setting for printing InteractiveUtils.versioninfo() after installing.
|
||||||
#
|
#
|
||||||
# Starting Julia and running InteractiveUtils.versioninfo() takes a significant amount of time (1s or ~10% of the total build time in testing),
|
# Starting Julia and running InteractiveUtils.versioninfo() takes a significant amount of time (1s or ~10% of the total build time in testing),
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ inputs:
|
|||||||
description: 'Architecture of the Julia binaries. Defaults to the architecture of the runner executing the job.'
|
description: 'Architecture of the Julia binaries. Defaults to the architecture of the runner executing the job.'
|
||||||
required: false
|
required: false
|
||||||
default: 'default'
|
default: 'default'
|
||||||
force-arch:
|
|
||||||
description: 'Force the use of the specified architecture even when it may be suboptimal on the runner (e.g., x86 on Apple Silicon macOS runners). By default, requesting x86/x64 on aarch64 macOS runners will fail with an error.'
|
|
||||||
required: false
|
|
||||||
default: 'false'
|
|
||||||
show-versioninfo:
|
show-versioninfo:
|
||||||
description: 'Display InteractiveUtils.versioninfo() after installing'
|
description: 'Display InteractiveUtils.versioninfo() after installing'
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
29
dist/index.js
vendored
29
dist/index.js
vendored
@@ -7177,6 +7177,7 @@ const isSatisfiable = (comparators, options) => {
|
|||||||
// already replaced the hyphen ranges
|
// already replaced the hyphen ranges
|
||||||
// turn into a set of JUST comparators.
|
// turn into a set of JUST comparators.
|
||||||
const parseComparator = (comp, options) => {
|
const parseComparator = (comp, options) => {
|
||||||
|
comp = comp.replace(re[t.BUILD], '')
|
||||||
debug('comp', comp, options)
|
debug('comp', comp, options)
|
||||||
comp = replaceCarets(comp, options)
|
comp = replaceCarets(comp, options)
|
||||||
debug('caret', comp)
|
debug('caret', comp)
|
||||||
@@ -7597,11 +7598,25 @@ class SemVer {
|
|||||||
other = new SemVer(other, this.options)
|
other = new SemVer(other, this.options)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
if (this.major < other.major) {
|
||||||
compareIdentifiers(this.major, other.major) ||
|
return -1
|
||||||
compareIdentifiers(this.minor, other.minor) ||
|
}
|
||||||
compareIdentifiers(this.patch, other.patch)
|
if (this.major > other.major) {
|
||||||
)
|
return 1
|
||||||
|
}
|
||||||
|
if (this.minor < other.minor) {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
if (this.minor > other.minor) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
if (this.patch < other.patch) {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
if (this.patch > other.patch) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
comparePre (other) {
|
comparePre (other) {
|
||||||
@@ -8502,6 +8517,10 @@ module.exports = debug
|
|||||||
|
|
||||||
const numeric = /^[0-9]+$/
|
const numeric = /^[0-9]+$/
|
||||||
const compareIdentifiers = (a, b) => {
|
const compareIdentifiers = (a, b) => {
|
||||||
|
if (typeof a === 'number' && typeof b === 'number') {
|
||||||
|
return a === b ? 0 : a < b ? -1 : 1
|
||||||
|
}
|
||||||
|
|
||||||
const anum = numeric.test(a)
|
const anum = numeric.test(a)
|
||||||
const bnum = numeric.test(b)
|
const bnum = numeric.test(b)
|
||||||
|
|
||||||
|
|||||||
5049
package-lock.json
generated
5049
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/async-retry": "^1.4.9",
|
"@types/async-retry": "^1.4.9",
|
||||||
"@types/jest": "^30.0.0",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/node": "^24.1.0",
|
"@types/node": "^25.2.0",
|
||||||
"@types/retry": "^0.12.5",
|
"@types/retry": "^0.12.5",
|
||||||
"@types/semver": "^7.7.0",
|
"@types/semver": "^7.7.0",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ async function run() {
|
|||||||
const versionInput = core.getInput('version').trim()
|
const versionInput = core.getInput('version').trim()
|
||||||
const includePrereleases = core.getInput('include-all-prereleases').trim() == 'true'
|
const includePrereleases = core.getInput('include-all-prereleases').trim() == 'true'
|
||||||
const originalArchInput = core.getInput('arch').trim()
|
const originalArchInput = core.getInput('arch').trim()
|
||||||
const forceArch = core.getInput('force-arch').trim() == 'true'
|
|
||||||
const projectInput = core.getInput('project').trim() // Julia project file
|
const projectInput = core.getInput('project').trim() // Julia project file
|
||||||
|
|
||||||
// It can easily happen that, for example, a workflow file contains an input `version: ${{ matrix.julia-version }}`
|
// It can easily happen that, for example, a workflow file contains an input `version: ${{ matrix.julia-version }}`
|
||||||
@@ -64,11 +63,7 @@ async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
|
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
|
||||||
if (forceArch) {
|
core.warning('[setup-julia] x64 arch has been requested on a macOS runner that has an arm64 (Apple Silicon) architecture. You may have meant to use the "aarch64" arch instead (or left it unspecified for the correct default).')
|
||||||
core.warning('[setup-julia] x64 arch has been requested on a macOS runner that has an arm64 (Apple Silicon) architecture. The "force-arch" input is set to "true", so proceeding with x64 installation. Note that this will mean Julia will be run under Rosetta emulation.')
|
|
||||||
} else {
|
|
||||||
throw new Error('[setup-julia] x64 arch has been requested on a macOS runner that has an arm64 (Apple Silicon) architecture. You may have meant to use the "aarch64" arch instead (or "default" or left it unspecified for the correct default). To force the use of x64 on this runner, set the "force-arch" input to "true".')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let processedArchInput: string;
|
let processedArchInput: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user