mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2025-06-07 11:16:37 +00:00
Fix workflows so pr isn't messy
This commit is contained in:
parent
5ab0241b57
commit
75ee89e83d
3 changed files with 51 additions and 19 deletions
44
.github/workflows/ci.yml
vendored
Normal file
44
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
schedule: [cron: "40 1 * * *"]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
install:
|
||||||
|
name: Rust ${{matrix.rust}} on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}}
|
||||||
|
runs-on: ${{matrix.os}}-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu, macos, windows]
|
||||||
|
rust: [nightly, beta, stable, 1.62.0, stable 18 months ago, stable minus 8 releases]
|
||||||
|
include:
|
||||||
|
- os: ubuntu
|
||||||
|
rust: 1.0.0
|
||||||
|
timeout-minutes: 45
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./
|
||||||
|
name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}}
|
||||||
|
id: toolchain
|
||||||
|
with:
|
||||||
|
toolchain: ${{matrix.rust}}
|
||||||
|
- name: echo ${{'${{steps.toolchain.outputs.cachekey}}'}}
|
||||||
|
run: echo '${{steps.toolchain.outputs.cachekey}}'
|
||||||
|
- name: check ${{'${{steps.toolchain.outputs.cachekey}}'}}
|
||||||
|
if: matrix.rust == '1.62.0'
|
||||||
|
run: cmp -s <(echo ${{steps.toolchain.outputs.cachekey}}) <(echo 20220627a831)
|
||||||
|
shell: bash
|
||||||
|
- run: rustc --version
|
||||||
|
- run: cargo init . --bin --name CI
|
||||||
|
if: matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.rust == 'stable'
|
||||||
|
- run: cargo add syn@1
|
||||||
|
if: matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.rust == 'stable'
|
||||||
|
- run: cargo check
|
||||||
|
if: matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.rust == 'stable'
|
12
.github/workflows/sync.yml
vendored
12
.github/workflows/sync.yml
vendored
|
@ -1,12 +0,0 @@
|
||||||
name: Rebase Upstream
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * 0" # run once a week
|
|
||||||
workflow_dispatch: # run manually
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
sync:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- uses: imba-tjd/rebase-upstream-action@master
|
|
14
README.md
14
README.md
|
@ -17,13 +17,13 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: IronCoreLabs/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- run: cargo test --all-features
|
- run: cargo test --all-features
|
||||||
```
|
```
|
||||||
|
|
||||||
The selection of Rust toolchain is made based on the particular @rev of this
|
The selection of Rust toolchain is made based on the particular @rev of this
|
||||||
Action being requested. For example "IronCoreLabs/rust-toolchain@nightly" pulls in
|
Action being requested. For example "dtolnay/rust-toolchain@nightly" pulls in
|
||||||
the nightly Rust toolchain, while "IronCoreLabs/rust-toolchain@1.42.0" pulls in
|
the nightly Rust toolchain, while "dtolnay/rust-toolchain@1.42.0" pulls in
|
||||||
1.42.0.
|
1.42.0.
|
||||||
|
|
||||||
## Toolchain File
|
## Toolchain File
|
||||||
|
@ -45,7 +45,7 @@ All inputs are optional.
|
||||||
<td>
|
<td>
|
||||||
Rustup toolchain specifier e.g. <code>stable</code>, <code>nightly</code>, <code>1.42.0</code>, <code>nightly-2022-01-01</code>.
|
Rustup toolchain specifier e.g. <code>stable</code>, <code>nightly</code>, <code>1.42.0</code>, <code>nightly-2022-01-01</code>.
|
||||||
<b>Important: the default is to match the @rev as described above.</b>
|
<b>Important: the default is to match the @rev as described above.</b>
|
||||||
When passing an explicit <code>toolchain</code> as an input instead of @rev, you'll want to use "IronCoreLabs/rust-toolchain@master" as the revision of the action.
|
When passing an explicit <code>toolchain</code> as an input instead of @rev, you'll want to use "dtolnay/rust-toolchain@master" as the revision of the action.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -70,7 +70,7 @@ All inputs are optional.
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>toolchain</code></td>
|
<td><code>toolchain</code></td>
|
||||||
<td>
|
<td>
|
||||||
The parsed toolchain that was installed by this action.
|
Rustup's name for the selected version of the toolchain. "1.62.0"
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -89,7 +89,7 @@ compiler support.
|
||||||
```yaml
|
```yaml
|
||||||
# Installs the most recent stable toolchain as of the specified time
|
# Installs the most recent stable toolchain as of the specified time
|
||||||
# offset, which may be written in years, months, weeks, or days.
|
# offset, which may be written in years, months, weeks, or days.
|
||||||
- uses: IronCoreLabs/rust-toolchain@master
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: stable 18 months ago
|
toolchain: stable 18 months ago
|
||||||
```
|
```
|
||||||
|
@ -97,7 +97,7 @@ compiler support.
|
||||||
```yaml
|
```yaml
|
||||||
# Installs the stable toolchain which preceded the most recent one by
|
# Installs the stable toolchain which preceded the most recent one by
|
||||||
# the specified number of minor versions.
|
# the specified number of minor versions.
|
||||||
- uses: IronCoreLabs/rust-toolchain@master
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: stable minus 8 releases
|
toolchain: stable minus 8 releases
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue