mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-16 04:56:53 +08:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8954cf4cb4 | ||
|
|
3eb3524cb4 | ||
|
|
6ac7df4cef | ||
|
|
c7bbfb8ea8 | ||
|
|
be4aa6964b | ||
|
|
1cabf59107 | ||
|
|
8945494c8c | ||
|
|
a81735fc3d | ||
|
|
2c2ccf4805 | ||
|
|
0352b39425 | ||
|
|
5ed1ab9531 | ||
|
|
b440227ef4 | ||
|
|
e07eb0ff2a | ||
|
|
0c24e24eb5 | ||
|
|
abd4c5ae03 | ||
|
|
51f7dbcff0 | ||
|
|
06264a4b68 | ||
|
|
8f56a5b739 | ||
|
|
83f4f82909 | ||
|
|
eba5daa7a3 | ||
|
|
150b180e77 | ||
|
|
df27cccb6d | ||
|
|
4e8b9a1f06 | ||
|
|
960c1f45ca | ||
|
|
ca58c641a5 | ||
|
|
6c0c21977e | ||
|
|
6a79c57a32 |
5
.github/workflows/example-builds-nightly.yml
vendored
5
.github/workflows/example-builds-nightly.yml
vendored
@@ -23,7 +23,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v1.0.0
|
- uses: actions/checkout@v1.0.0
|
||||||
|
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
run: npm install --production
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
npm run pack
|
||||||
|
|
||||||
- name: "Set up Julia (nightly)"
|
- name: "Set up Julia (nightly)"
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|||||||
7
.github/workflows/example-builds.yml
vendored
7
.github/workflows/example-builds.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
julia-version: ['1.0.5', '1', '^1.3.0-rc1']
|
julia-version: ['1.0.5', '1', '^1.5.0-beta1']
|
||||||
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
|
||||||
@@ -20,7 +20,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v1.0.0
|
- uses: actions/checkout@v1.0.0
|
||||||
|
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
run: npm install --production
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
npm run pack
|
||||||
|
|
||||||
- name: "Set up Julia"
|
- name: "Set up Julia"
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
__tests__/runner/*
|
__tests__/runner/*
|
||||||
|
!dist/
|
||||||
|
|||||||
27
README.md
27
README.md
@@ -11,7 +11,8 @@ This action sets up a Julia environment for use in actions by downloading a spec
|
|||||||
- [Julia Versions](#julia-versions)
|
- [Julia Versions](#julia-versions)
|
||||||
- [Matrix Testing](#matrix-testing)
|
- [Matrix Testing](#matrix-testing)
|
||||||
- [Versioning](#versioning)
|
- [Versioning](#versioning)
|
||||||
- [Licence info](#licence-info)
|
- [Privacy Info](#privacy-info)
|
||||||
|
- [Third party information](#third-party-information)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -40,10 +41,11 @@ You can either specify specific Julia versions or version ranges. If you specify
|
|||||||
|
|
||||||
- `1.2.0` is a valid semver version. The action will try to download exactly this version. If it's not available, the build step will fail.
|
- `1.2.0` is a valid semver version. The action will try to download exactly this version. If it's not available, the build step will fail.
|
||||||
- `1.0` is a version range that will match the highest available Julia version that starts with `1.0`, e.g. `1.0.5`.
|
- `1.0` is a version range that will match the highest available Julia version that starts with `1.0`, e.g. `1.0.5`.
|
||||||
- `^1.3.0-rc1` is a caret version range that includes preleases. It matches all versions `≥ 1.3.0-rc1` and `< 1.4.0`.
|
- `^1.3.0-rc1` is a caret version range that includes pre-releases starting at `rc1`. It matches all versions `≥ 1.3.0-rc1` and `< 1.4.0`.
|
||||||
|
- `^1.3-0` is a caret 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.
|
||||||
|
|
||||||
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.
|
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).
|
||||||
|
|
||||||
#### WARNING: Version ranges are experimental and potentially out of date
|
#### WARNING: Version ranges are experimental and potentially out of date
|
||||||
|
|
||||||
@@ -51,6 +53,8 @@ Currently the list of available versions is hardcoded. You have to use the lates
|
|||||||
|
|
||||||
### Matrix Testing
|
### Matrix Testing
|
||||||
|
|
||||||
|
`bash` is chosen as shell to enforce consistent behaviour across operating systems. [Other shells](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell) are available but you may have to escape quotation marks or otherwise adjust the syntax.
|
||||||
|
|
||||||
#### 64-bit Julia only
|
#### 64-bit Julia only
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -69,6 +73,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.julia-version }}
|
version: ${{ matrix.julia-version }}
|
||||||
- run: julia -e 'println("Hello, World!")'
|
- run: julia -e 'println("Hello, World!")'
|
||||||
|
shell: bash
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 32-bit Julia
|
#### 32-bit Julia
|
||||||
@@ -95,6 +100,7 @@ jobs:
|
|||||||
version: ${{ matrix.julia-version }}
|
version: ${{ matrix.julia-version }}
|
||||||
arch: ${{ matrix.julia-arch }}
|
arch: ${{ matrix.julia-arch }}
|
||||||
- run: julia -e 'println("Hello, World!")'
|
- run: julia -e 'println("Hello, World!")'
|
||||||
|
shell: bash
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, you can include specific version and OS combinations that will use 32-bit Julia:
|
Alternatively, you can include specific version and OS combinations that will use 32-bit Julia:
|
||||||
@@ -120,6 +126,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.julia-version }}
|
version: ${{ matrix.julia-version }}
|
||||||
- run: julia -e 'println("Hello, World!")'
|
- run: julia -e 'println("Hello, World!")'
|
||||||
|
shell: bash
|
||||||
```
|
```
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
@@ -141,5 +148,15 @@ steps:
|
|||||||
- uses: julia-actions/setup-julia@v0.1.0 # specific version tag
|
- uses: julia-actions/setup-julia@v0.1.0 # specific version tag
|
||||||
```
|
```
|
||||||
|
|
||||||
## Licence info
|
## Privacy Info
|
||||||
Parts of this software have been derived from the `setup-go` [action](https://github.com/actions/setup-go) and the [TypeScript Action Template](https://github.com/actions/typescript-action), both released by GitHub under the MIT licence.
|
|
||||||
|
Julia version 1.5 and later collects telemetry information during certain `Pkg` operations.
|
||||||
|
Please refer to <https://julialang.org/legal/data/> for information on what data is collected.
|
||||||
|
This action does not alter the Julia installation in any way, therefore telemetry on your CI runs will be collected by the Julia Pkg server unless you opt out.
|
||||||
|
In a later release of the action, an action input to opt out of telemetry will be provided but for now you need to add a step to your workflows that edits `telemetry.toml` in the CI environment as described in the [Opting Out](https://julialang.org/legal/data/#opting_out) section of the above document.
|
||||||
|
|
||||||
|
**This action itself does not collect any kind of personal data or telemetry information.**
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|||||||
55
THIRD_PARTY_NOTICE.md
Normal file
55
THIRD_PARTY_NOTICE.md
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# Third Party Notices and Information
|
||||||
|
|
||||||
|
Parts of this software have been derived from other open source software.
|
||||||
|
Find their full licence information below.
|
||||||
|
|
||||||
|
- [`setup-go` action](#setup-go-action)
|
||||||
|
- [TypeScript Action Template](#typescript-action-template)
|
||||||
|
|
||||||
|
## [`setup-go` action](https://github.com/actions/setup-go)
|
||||||
|
|
||||||
|
> The MIT License (MIT)
|
||||||
|
>
|
||||||
|
> Copyright (c) 2018 GitHub, Inc. and contributors
|
||||||
|
>
|
||||||
|
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
> of this software and associated documentation files (the "Software"), to deal
|
||||||
|
> in the Software without restriction, including without limitation the rights
|
||||||
|
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
> copies of the Software, and to permit persons to whom the Software is
|
||||||
|
> furnished to do so, subject to the following conditions:
|
||||||
|
>
|
||||||
|
> The above copyright notice and this permission notice shall be included in
|
||||||
|
> all copies or substantial portions of the Software.
|
||||||
|
>
|
||||||
|
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
> THE SOFTWARE.
|
||||||
|
|
||||||
|
## [TypeScript Action Template](https://github.com/actions/typescript-action)
|
||||||
|
|
||||||
|
> The MIT License (MIT)
|
||||||
|
>
|
||||||
|
> Copyright (c) 2018 GitHub, Inc. and contributors
|
||||||
|
>
|
||||||
|
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
> of this software and associated documentation files (the "Software"), to deal
|
||||||
|
> in the Software without restriction, including without limitation the rights
|
||||||
|
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
> copies of the Software, and to permit persons to whom the Software is
|
||||||
|
> furnished to do so, subject to the following conditions:
|
||||||
|
>
|
||||||
|
> The above copyright notice and this permission notice shall be included in
|
||||||
|
> all copies or substantial portions of the Software.
|
||||||
|
>
|
||||||
|
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
> THE SOFTWARE.
|
||||||
@@ -9,9 +9,13 @@ inputs:
|
|||||||
description: 'Architecture of the Julia binaries. Defaults to x64.'
|
description: 'Architecture of the Julia binaries. Defaults to x64.'
|
||||||
required: false
|
required: false
|
||||||
default: 'x64'
|
default: 'x64'
|
||||||
|
show-versioninfo:
|
||||||
|
description: 'Display InteractiveUtils.versioninfo() after installing'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'lib/setup-julia.js'
|
main: 'dist/index.js'
|
||||||
branding:
|
branding:
|
||||||
icon: 'download'
|
icon: 'download'
|
||||||
color: 'green'
|
color: 'green'
|
||||||
|
|||||||
@@ -1,13 +1,44 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
git checkout -b releases/"$1"
|
branch_name="$(git symbolic-ref --short -q HEAD)"
|
||||||
|
version="v$(jq -r .version package.json)"
|
||||||
|
repo="$1"
|
||||||
|
|
||||||
|
if [ -z "$repo" ]; then
|
||||||
|
echo "ERROR: must specify repository"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== debug info ==="
|
||||||
|
echo "branch: $branch_name"
|
||||||
|
echo "version: $version"
|
||||||
|
echo "repo: $repo"
|
||||||
|
echo "=================="
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check that the version doesn't exist yet
|
||||||
|
version_exists="$(curl -s https://api.github.com/repos/"$repo"/tags -H "Accept: application/vnd.github.v3.full+json" | jq -r '.[] | select(.name == "'"$version"'") | .name')"
|
||||||
|
if [ -n "$version_exists" ]; then
|
||||||
|
echo "ERROR: version $version already exists"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git checkout -b releases/"$version"
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
npm test
|
npm test
|
||||||
npm prune --production
|
npm run pack
|
||||||
|
|
||||||
sed -i 's/node_modules/!node_modules/g' .gitignore
|
sed -i 's/dist/!dist/g' .gitignore
|
||||||
git add node_modules
|
git add dist
|
||||||
git commit -a -m "Add production dependencies & build"
|
git commit -a -m "Add production dependencies & build"
|
||||||
git tag "$1"
|
|
||||||
|
# Tags
|
||||||
|
major_minor="$(sed 's/\.[^.]*$//' <<< "$version")"
|
||||||
|
major="$(sed 's/\.[^.]*$//' <<< "$major_minor")"
|
||||||
|
|
||||||
|
git tag "$version"
|
||||||
|
git tag -f "$major_minor"
|
||||||
|
git tag -f "$major"
|
||||||
|
git tag -f "latest"
|
||||||
|
|||||||
@@ -1,14 +1,36 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
branch_name="$(git symbolic-ref --short -q HEAD)"
|
branch_name="$(git symbolic-ref --short -q HEAD)"
|
||||||
|
version="v$(jq -r .version package.json)"
|
||||||
|
repo="$1"
|
||||||
|
|
||||||
git checkout -B test/"$branch_name"
|
if [ -z "$repo" ]; then
|
||||||
|
echo "ERROR: must specify repository"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== debug info ==="
|
||||||
|
echo "branch: $branch_name"
|
||||||
|
echo "version: $version"
|
||||||
|
echo "repo: $repo"
|
||||||
|
echo "=================="
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check that the version doesn't exist yet
|
||||||
|
version_exists="$(curl -s https://api.github.com/repos/"$repo"/tags -H "Accept: application/vnd.github.v3.full+json" | jq -r '.[] | select(.name == "'"$version"'") | .name')"
|
||||||
|
if [ -n "$version_exists" ]; then
|
||||||
|
echo "ERROR: version $version already exists"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git checkout -B test/"$branch_name"/releases/"$version"
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
npm test
|
npm test
|
||||||
npm prune --production
|
npm run pack
|
||||||
|
|
||||||
sed -i 's/node_modules/!node_modules/g' .gitignore
|
# Add dist/ to git and commit it
|
||||||
git add node_modules
|
sed -i 's/dist/!dist/g' .gitignore
|
||||||
|
git add dist
|
||||||
git commit -a -m "Add production dependencies & build"
|
git commit -a -m "Add production dependencies & build"
|
||||||
|
|||||||
4521
dist/index.js
vendored
Normal file
4521
dist/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
dist/unzip
vendored
Normal file
BIN
dist/unzip
vendored
Normal file
Binary file not shown.
@@ -1,16 +0,0 @@
|
|||||||
# Release checklist
|
|
||||||
|
|
||||||
Version: `1.b.c`
|
|
||||||
|
|
||||||
- [ ] Create release branch `releases/v1.b.c`
|
|
||||||
- [ ] Unignore `node_modules/` by adding `!` in front in `.gitignore`
|
|
||||||
- [ ] Delete `node_modules/`
|
|
||||||
- [ ] Install production dependencies: `npm install --production`
|
|
||||||
- [ ] Add `node_modules/`: `git add node_modules`
|
|
||||||
- [ ] Commit & push action: `git commit -a -m "Publish v1.b.c."`, then `git push`
|
|
||||||
- [ ] Test the action with an example package
|
|
||||||
- [ ] Create tags
|
|
||||||
- [ ] `v1.b.c` pointing at the last commit in `releases/v1.b.c`
|
|
||||||
- [ ] `latest` pointing at the latest version of the highest major version
|
|
||||||
- [ ] `v1` pointing at the latest `1.x.x` version
|
|
||||||
- [ ] Push tags
|
|
||||||
2
lib/installer.js
generated
2
lib/installer.js
generated
@@ -25,7 +25,7 @@ const semver = __importStar(require("semver"));
|
|||||||
const osPlat = os.platform(); // possible values: win32 (Windows), linux (Linux), darwin (macOS)
|
const osPlat = os.platform(); // possible values: win32 (Windows), linux (Linux), darwin (macOS)
|
||||||
core.debug(`platform: ${osPlat}`);
|
core.debug(`platform: ${osPlat}`);
|
||||||
// This is temporary until we have a better way of fetching releases (see #1, #4 for details)
|
// This is temporary until we have a better way of fetching releases (see #1, #4 for details)
|
||||||
exports.juliaVersions = ['v1.3.0', 'v1.3.0-rc5', 'v1.3.0-rc4', 'v1.3.0-rc3', 'v1.3.0-rc2', 'v1.0.5', 'v1.2.0', 'v1.3.0-rc1', 'v1.2.0-rc3', 'v1.3.0-alpha', 'v1.2.0-rc2', 'v1.2.0-rc1', 'v1.1.1', 'v1.0.4', 'v1.1.0', 'v1.1.0-rc2', 'v1.1.0-rc1', 'v1.0.3', 'v1.0.2', 'v1.0.1', 'v1.0.0', 'v0.7.0', 'v1.0.0-rc1', 'v0.7.0-rc3', 'v0.7.0-rc2', 'v0.7.0-rc1', 'v0.7.0-beta2', 'v0.6.4', 'v0.7.0-beta', 'v0.7.0-alpha', 'v0.6.3', 'v0.6.2', 'v0.6.1', 'v0.6.0', 'v0.6.0-rc3', 'v0.6.0-rc2', 'v0.5.2', 'v0.6.0-rc1', 'v0.6.0-pre.beta', 'v0.5.1', 'v0.6.0-pre.alpha', 'v0.5.0', 'v0.4.7', 'v0.5.0-rc4', 'v0.5.0-rc3', 'v0.5.0-rc2', 'v0.5.0-rc1', 'v0.5.0-rc0', 'v0.4.6', 'v0.4.5', 'v0.4.4', 'v0.4.3', 'v0.4.2', 'v0.4.1', 'v0.3.12', 'v0.4.0', 'v0.4.0-rc4', 'v0.4.0-rc3', 'v0.4.0-rc2', 'v0.4.0-rc1', 'v0.3.11', 'v0.3.10', 'v0.3.9', 'v0.3.8', 'v0.3.7', 'v0.3.6', 'v0.3.5', 'v0.3.4', 'v0.3.3', 'v0.3.2', 'v0.3.1', 'v0.3.0', 'v0.3.0-rc4', 'v0.3.0-rc3', 'v0.3.0-rc2', 'v0.3.0-rc1', 'v0.2.0-rc1', 'v0.2.0-rc3', 'v0.2.0-rc4', 'v0.2.0', 'v0.2.0-rc2'];
|
exports.juliaVersions = ['v1.5.0-rc1', 'v1.5.0-beta1', 'v1.4.2', 'v1.4.1', 'v1.4.0', 'v1.4.0-rc2', 'v1.4.0-rc1', 'v1.3.1', 'v1.3.0', 'v1.3.0-rc5', 'v1.3.0-rc4', 'v1.3.0-rc3', 'v1.3.0-rc2', 'v1.0.5', 'v1.2.0', 'v1.3.0-rc1', 'v1.2.0-rc3', 'v1.3.0-alpha', 'v1.2.0-rc2', 'v1.2.0-rc1', 'v1.1.1', 'v1.0.4', 'v1.1.0', 'v1.1.0-rc2', 'v1.1.0-rc1', 'v1.0.3', 'v1.0.2', 'v1.0.1', 'v1.0.0', 'v0.7.0', 'v1.0.0-rc1', 'v0.7.0-rc3', 'v0.7.0-rc2', 'v0.7.0-rc1', 'v0.7.0-beta2', 'v0.6.4', 'v0.7.0-beta', 'v0.7.0-alpha', 'v0.6.3', 'v0.6.2', 'v0.6.1', 'v0.6.0', 'v0.6.0-rc3', 'v0.6.0-rc2', 'v0.5.2', 'v0.6.0-rc1', 'v0.6.0-pre.beta', 'v0.5.1', 'v0.6.0-pre.alpha', 'v0.5.0', 'v0.4.7', 'v0.5.0-rc4', 'v0.5.0-rc3', 'v0.5.0-rc2', 'v0.5.0-rc1', 'v0.5.0-rc0', 'v0.4.6', 'v0.4.5', 'v0.4.4', 'v0.4.3', 'v0.4.2', 'v0.4.1', 'v0.3.12', 'v0.4.0', 'v0.4.0-rc4', 'v0.4.0-rc3', 'v0.4.0-rc2', 'v0.4.0-rc1', 'v0.3.11', 'v0.3.10', 'v0.3.9', 'v0.3.8', 'v0.3.7', 'v0.3.6', 'v0.3.5', 'v0.3.4', 'v0.3.3', 'v0.3.2', 'v0.3.1', 'v0.3.0', 'v0.3.0-rc4', 'v0.3.0-rc3', 'v0.3.0-rc2', 'v0.3.0-rc1', 'v0.2.0-rc1', 'v0.2.0-rc3', 'v0.2.0-rc4', 'v0.2.0', 'v0.2.0-rc2'];
|
||||||
function getJuliaVersion(availableReleases, versionInput) {
|
function getJuliaVersion(availableReleases, versionInput) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (semver.valid(versionInput) == versionInput) {
|
if (semver.valid(versionInput) == versionInput) {
|
||||||
|
|||||||
8
lib/setup-julia.js
generated
8
lib/setup-julia.js
generated
@@ -43,8 +43,12 @@ function run() {
|
|||||||
}
|
}
|
||||||
// Add it to PATH
|
// Add it to PATH
|
||||||
core.addPath(path.join(juliaPath, 'bin'));
|
core.addPath(path.join(juliaPath, 'bin'));
|
||||||
// Test if Julia has been installed by showing versioninfo()
|
// Test if Julia has been installed
|
||||||
yield exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
|
exec.exec('julia', ['--version']);
|
||||||
|
// If enabled, also show the full version info
|
||||||
|
if (core.getInput('show-versioninfo') == 'true') {
|
||||||
|
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|||||||
3626
package-lock.json
generated
3626
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-julia",
|
"name": "setup-julia",
|
||||||
"version": "0.1.0",
|
"version": "1.1.8",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup Julia action",
|
"description": "setup Julia action",
|
||||||
"main": "lib/setup-julia.js",
|
"main": "lib/setup-julia.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"format": "prettier --single-quote --print-width 120 --tab-width 4 --no-semi --write **/*.ts",
|
"pack": "ncc build",
|
||||||
"format-check": "prettier --single-quote --print-width 120 --tab-width 4 --no-semi --check **/*.ts",
|
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -24,7 +23,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.0.0",
|
"@actions/core": "^1.0.0",
|
||||||
"@actions/exec": "^1.0.0",
|
"@actions/exec": "^1.0.0",
|
||||||
"@actions/github": "^1.0.0",
|
|
||||||
"@actions/io": "^1.0.0",
|
"@actions/io": "^1.0.0",
|
||||||
"@actions/tool-cache": "^1.0.0",
|
"@actions/tool-cache": "^1.0.0",
|
||||||
"semver": "^6.3.0"
|
"semver": "^6.3.0"
|
||||||
@@ -33,10 +31,11 @@
|
|||||||
"@types/jest": "^24.0.13",
|
"@types/jest": "^24.0.13",
|
||||||
"@types/node": "^12.12.7",
|
"@types/node": "^12.12.7",
|
||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^6.0.0",
|
||||||
|
"@zeit/ncc": "^0.22.0",
|
||||||
"jest": "^24.8.0",
|
"jest": "^24.8.0",
|
||||||
"jest-circus": "^24.7.1",
|
"jest-circus": "^24.7.1",
|
||||||
"prettier": "^1.17.1",
|
"prettier": "^1.17.1",
|
||||||
"ts-jest": "^24.0.2",
|
"ts-jest": "^26.0.0",
|
||||||
"typescript": "^3.5.1"
|
"typescript": "^3.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import * as core from '@actions/core'
|
|||||||
import * as exec from '@actions/exec'
|
import * as exec from '@actions/exec'
|
||||||
import * as tc from '@actions/tool-cache'
|
import * as tc from '@actions/tool-cache'
|
||||||
|
|
||||||
import * as https from 'https'
|
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
|
|
||||||
@@ -13,7 +12,7 @@ const osPlat = os.platform() // possible values: win32 (Windows), linux (Linux),
|
|||||||
core.debug(`platform: ${osPlat}`)
|
core.debug(`platform: ${osPlat}`)
|
||||||
|
|
||||||
// This is temporary until we have a better way of fetching releases (see #1, #4 for details)
|
// This is temporary until we have a better way of fetching releases (see #1, #4 for details)
|
||||||
export const juliaVersions = ['v1.3.0', 'v1.3.0-rc5', 'v1.3.0-rc4', 'v1.3.0-rc3', 'v1.3.0-rc2', 'v1.0.5', 'v1.2.0', 'v1.3.0-rc1', 'v1.2.0-rc3', 'v1.3.0-alpha', 'v1.2.0-rc2', 'v1.2.0-rc1', 'v1.1.1', 'v1.0.4', 'v1.1.0', 'v1.1.0-rc2', 'v1.1.0-rc1', 'v1.0.3', 'v1.0.2', 'v1.0.1', 'v1.0.0', 'v0.7.0', 'v1.0.0-rc1', 'v0.7.0-rc3', 'v0.7.0-rc2', 'v0.7.0-rc1', 'v0.7.0-beta2', 'v0.6.4', 'v0.7.0-beta', 'v0.7.0-alpha', 'v0.6.3', 'v0.6.2', 'v0.6.1', 'v0.6.0', 'v0.6.0-rc3', 'v0.6.0-rc2', 'v0.5.2', 'v0.6.0-rc1', 'v0.6.0-pre.beta', 'v0.5.1', 'v0.6.0-pre.alpha', 'v0.5.0', 'v0.4.7', 'v0.5.0-rc4', 'v0.5.0-rc3', 'v0.5.0-rc2', 'v0.5.0-rc1', 'v0.5.0-rc0', 'v0.4.6', 'v0.4.5', 'v0.4.4', 'v0.4.3', 'v0.4.2', 'v0.4.1', 'v0.3.12', 'v0.4.0', 'v0.4.0-rc4', 'v0.4.0-rc3', 'v0.4.0-rc2', 'v0.4.0-rc1', 'v0.3.11', 'v0.3.10', 'v0.3.9', 'v0.3.8', 'v0.3.7', 'v0.3.6', 'v0.3.5', 'v0.3.4', 'v0.3.3', 'v0.3.2', 'v0.3.1', 'v0.3.0', 'v0.3.0-rc4', 'v0.3.0-rc3', 'v0.3.0-rc2', 'v0.3.0-rc1', 'v0.2.0-rc1', 'v0.2.0-rc3', 'v0.2.0-rc4', 'v0.2.0', 'v0.2.0-rc2']
|
export const juliaVersions = ['v1.5.0-rc1', 'v1.5.0-beta1', 'v1.4.2', 'v1.4.1', 'v1.4.0', 'v1.4.0-rc2', 'v1.4.0-rc1', 'v1.3.1', 'v1.3.0', 'v1.3.0-rc5', 'v1.3.0-rc4', 'v1.3.0-rc3', 'v1.3.0-rc2', 'v1.0.5', 'v1.2.0', 'v1.3.0-rc1', 'v1.2.0-rc3', 'v1.3.0-alpha', 'v1.2.0-rc2', 'v1.2.0-rc1', 'v1.1.1', 'v1.0.4', 'v1.1.0', 'v1.1.0-rc2', 'v1.1.0-rc1', 'v1.0.3', 'v1.0.2', 'v1.0.1', 'v1.0.0', 'v0.7.0', 'v1.0.0-rc1', 'v0.7.0-rc3', 'v0.7.0-rc2', 'v0.7.0-rc1', 'v0.7.0-beta2', 'v0.6.4', 'v0.7.0-beta', 'v0.7.0-alpha', 'v0.6.3', 'v0.6.2', 'v0.6.1', 'v0.6.0', 'v0.6.0-rc3', 'v0.6.0-rc2', 'v0.5.2', 'v0.6.0-rc1', 'v0.6.0-pre.beta', 'v0.5.1', 'v0.6.0-pre.alpha', 'v0.5.0', 'v0.4.7', 'v0.5.0-rc4', 'v0.5.0-rc3', 'v0.5.0-rc2', 'v0.5.0-rc1', 'v0.5.0-rc0', 'v0.4.6', 'v0.4.5', 'v0.4.4', 'v0.4.3', 'v0.4.2', 'v0.4.1', 'v0.3.12', 'v0.4.0', 'v0.4.0-rc4', 'v0.4.0-rc3', 'v0.4.0-rc2', 'v0.4.0-rc1', 'v0.3.11', 'v0.3.10', 'v0.3.9', 'v0.3.8', 'v0.3.7', 'v0.3.6', 'v0.3.5', 'v0.3.4', 'v0.3.3', 'v0.3.2', 'v0.3.1', 'v0.3.0', 'v0.3.0-rc4', 'v0.3.0-rc3', 'v0.3.0-rc2', 'v0.3.0-rc1', 'v0.2.0-rc1', 'v0.2.0-rc3', 'v0.2.0-rc4', 'v0.2.0', 'v0.2.0-rc2']
|
||||||
|
|
||||||
export async function getJuliaVersion(availableReleases: string[], versionInput: string): Promise<string> {
|
export async function getJuliaVersion(availableReleases: string[], versionInput: string): Promise<string> {
|
||||||
if (semver.valid(versionInput) == versionInput) {
|
if (semver.valid(versionInput) == versionInput) {
|
||||||
|
|||||||
@@ -32,8 +32,13 @@ async function run() {
|
|||||||
// Add it to PATH
|
// Add it to PATH
|
||||||
core.addPath(path.join(juliaPath, 'bin'))
|
core.addPath(path.join(juliaPath, 'bin'))
|
||||||
|
|
||||||
// Test if Julia has been installed by showing versioninfo()
|
// Test if Julia has been installed
|
||||||
await exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()'])
|
exec.exec('julia', ['--version'])
|
||||||
|
|
||||||
|
// If enabled, also show the full version info
|
||||||
|
if (core.getInput('show-versioninfo') == 'true') {
|
||||||
|
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()'])
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message)
|
core.setFailed(error.message)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user