17 Commits

Author SHA1 Message Date
svartalf
941154aed5 Release 1.0.2 2019-10-14 18:31:15 +03:00
dependabot-preview[bot]
a919188b61 Merge pull request #11 from actions-rs/dependabot/npm_and_yarn/types/node-12.7.12 2019-10-14 15:16:26 +00:00
dependabot-preview[bot]
beaa269702 Bump typescript from 3.6.3 to 3.6.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.6.3 to 3.6.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.6.3...v3.6.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 18:15:08 +03:00
Lionel Faber
ad3964bd05 Use info log level when installing rustup 2019-10-14 15:19:08 +03:00
dependabot-preview[bot]
46a11bddfe Bump @types/node from 12.7.11 to 12.7.12
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.7.11 to 12.7.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-09 10:18:58 +00:00
svartalf
6715f9d030 Do not use target input as a --default-target argument for rustup 2019-10-05 23:46:29 +03:00
dependabot-preview[bot]
15b1f315b5 Bump @types/node from 12.7.8 to 12.7.11
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.7.8 to 12.7.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-05 23:41:07 +03:00
svartalf
c8dbab4109 Fancy look for the inputs list 2019-09-29 09:39:36 +03:00
dependabot-preview[bot]
003538387b Bump @types/node from 12.7.7 to 12.7.8
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.7.7 to 12.7.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-27 11:55:48 +03:00
dependabot-preview[bot]
d021bc1259 Bump @types/node from 12.7.5 to 12.7.7
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.7.5 to 12.7.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 10:26:07 +03:00
svartalf
8e306a9c7f Proper path for workflows configuration 2019-09-19 13:20:25 +03:00
svartalf
7ad8591ba0 CI build 2019-09-19 13:17:53 +03:00
svartalf
fa175680a2 Merge pull request #4 from actions-rs/dependabot/npm_and_yarn/actions/core-1.1.1
Bump @actions/core from 1.0.0 to 1.1.1
2019-09-19 11:11:53 +03:00
dependabot-preview[bot]
bd476ecc6b Bump @actions/core from 1.0.0 to 1.1.1
Bumps [@actions/core](https://github.com/actions/toolkit) from 1.0.0 to 1.1.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Commits](https://github.com/actions/toolkit/compare/@actions/core@1.0.0...@actions/tool-cache@1.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 07:01:20 +00:00
svartalf
10382284bb Merge pull request #2 from actions-rs/dependabot/npm_and_yarn/ts-jest-24.1.0
Bump ts-jest from 24.0.2 to 24.1.0
2019-09-16 20:15:45 +03:00
svartalf
cfc1332c14 Link to recipes 2019-09-16 10:40:48 +03:00
dependabot-preview[bot]
6e4f2cb688 Bump ts-jest from 24.0.2 to 24.1.0
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 24.0.2 to 24.1.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v24.0.2...v24.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-15 21:40:39 +00:00
8 changed files with 5712 additions and 5637 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
custom: https://svartalf.info/donate/

18
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Continuous integration
on: [pull_request, push]
jobs:
check_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: "npm ci"
run: npm ci
- name: "npm run build"
run: npm run build
- name: "npm run test"
run: npm run test

23
CHANGELOG.md Normal file
View File

@@ -0,0 +1,23 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.0.2] - 2019-10-14
### Changed
- Missing `rustup` executable will not raise an annotating warning before the installation anymore (#13)
## [1.0.1] - 2019-10-05
### Changed
- `target` input is not used as a `--default-target` argument for `rustup` anymore (#8)
## [1.0.0] - 2019-09-15
### Added
- First public version

View File

@@ -1,4 +1,4 @@
# `rustup toolchain` Action
# `rust-toolchain` Action
![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)
[![Gitter](https://badges.gitter.im/actions-rs/community.svg)](https://gitter.im/actions-rs/community)
@@ -25,15 +25,26 @@ jobs:
with:
toolchain: nightly
override: true
# `cargo check` command here will use installed `nightly`
# as it set as an "override" for current directory
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
```
See [additional recipes here](https://github.com/actions-rs/meta).
## Inputs
* `toolchain` (*required*): Toolchain name, see [rustup page](https://github.com/rust-lang/rustup.rs#toolchain-specification) for details.\
Examples: `stable`, `nightly`, `nightly-2019-04-20`
* `target`: Additionally install specific target for this toolchain (ex. `x86_64-apple-darwin`)
* `default`: Set installed toolchain as default (executes `rustup toolchain default {TOOLCHAIN}`)
* `override`: Set installed toolchain as an override for current directory
| Name | Required | Description | Type | Default |
| ------------| :------: | ---------------------------------------------------------------------------------------------------------------------------------------| ------ | --------|
| `toolchain` | ✓ | [Toolchain](https://github.com/rust-lang/rustup.rs#toolchain-specification) name to use, ex. `stable`, `nightly`, `nightly-2019-04-20` | string | |
| `target` | | Additionally install specified target for this toolchain, ex. `x86_64-apple-darwin` | string | |
| `default` | | Set installed toolchain as a default toolchain | bool | false |
| `override` | | Set installed toolchain as an override for the current directory | bool | false |
## Components

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

11260
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "rust-toolchain",
"version": "1.0.0",
"version": "1.0.2",
"private": false,
"description": "Install the Rust toolchain",
"main": "lib/main.js",
@@ -29,18 +29,18 @@
"url": "https://github.com/actions-rs/toolchain/issues"
},
"dependencies": {
"@actions/core": "^1.0.0",
"@actions/core": "^1.1.1",
"@actions/exec": "^1.0.0",
"@actions/io": "^1.0.0",
"download": "^7.1.0"
},
"devDependencies": {
"@types/jest": "^24.0.13",
"@types/node": "^12.7.5",
"@types/node": "^12.7.12",
"@zeit/ncc": "^0.20.5",
"jest": "^24.9.0",
"jest-circus": "^24.9.0",
"ts-jest": "^24.0.2",
"typescript": "^3.5.1"
"ts-jest": "^24.1.0",
"typescript": "^3.6.4"
}
}

View File

@@ -32,13 +32,13 @@ function downloadRustInit(url: string, name: string): Promise<string> {
});
}
async function get_rustup(toolchain: string, target?: string): Promise<string> {
async function get_rustup(toolchain: string): Promise<string> {
try {
const foundPath = await io.which('rustup', true);
core.debug(`Found rustup at ${foundPath}`);
return foundPath;
} catch (error) {
core.warning('Unable to find rustup, installing it now');
core.info('Unable to find rustup, installing it now');
}
let args = [
@@ -46,10 +46,8 @@ async function get_rustup(toolchain: string, target?: string): Promise<string> {
'--default-toolchain',
toolchain,
];
if (target) {
args.push('--default-host');
args.push(target);
}
// Note: `target` input can't be used here for `--default-host` argument, see #8
switch (process.platform) {
case 'darwin':
@@ -74,7 +72,7 @@ async function get_rustup(toolchain: string, target?: string): Promise<string> {
async function run() {
const opts = args.toolchain_args();
const rustup = await get_rustup(opts.name, opts.target);
const rustup = await get_rustup(opts.name);
await exec.exec(rustup, ['toolchain', 'install', opts.name]);