2021-12-27 20:24:34 +02:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-06-17 06:32:14 +03:00
|
|
|
branches: [master]
|
2021-12-27 20:24:34 +02:00
|
|
|
pull_request:
|
2023-02-19 03:23:55 +02:00
|
|
|
workflow_dispatch:
|
2021-12-27 20:24:34 +02:00
|
|
|
schedule: [cron: "40 1 * * *"]
|
|
|
|
|
2022-09-03 01:09:30 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-12-27 20:24:34 +02:00
|
|
|
jobs:
|
|
|
|
install:
|
2023-01-31 22:29:29 +02:00
|
|
|
name: Rust ${{matrix.rust}} on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}}
|
2022-07-15 20:06:35 +03:00
|
|
|
runs-on: ${{matrix.os}}-latest
|
2021-12-27 20:24:34 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-01-31 22:29:29 +02:00
|
|
|
os: [ubuntu, macos, windows]
|
|
|
|
rust: [nightly, beta, stable, 1.62.0, stable 18 months ago, stable minus 8 releases]
|
2022-07-15 20:06:35 +03:00
|
|
|
include:
|
2023-01-31 22:29:29 +02:00
|
|
|
- os: ubuntu
|
|
|
|
rust: 1.0.0
|
2022-11-26 04:56:18 +02:00
|
|
|
timeout-minutes: 45
|
2021-12-27 20:24:34 +02:00
|
|
|
steps:
|
2023-09-05 08:35:00 +03:00
|
|
|
- uses: actions/checkout@v4
|
2021-12-27 20:24:34 +02:00
|
|
|
- uses: ./
|
2022-09-25 15:29:24 +03:00
|
|
|
name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}}
|
2021-12-27 20:24:34 +02:00
|
|
|
id: toolchain
|
|
|
|
with:
|
|
|
|
toolchain: ${{matrix.rust}}
|
2022-07-16 02:56:54 +03:00
|
|
|
- name: echo ${{'${{steps.toolchain.outputs.cachekey}}'}}
|
2022-07-15 20:40:08 +03:00
|
|
|
run: echo '${{steps.toolchain.outputs.cachekey}}'
|
2022-07-16 02:56:54 +03:00
|
|
|
- name: check ${{'${{steps.toolchain.outputs.cachekey}}'}}
|
|
|
|
if: matrix.rust == '1.62.0'
|
|
|
|
run: cmp -s <(echo ${{steps.toolchain.outputs.cachekey}}) <(echo 20220627a831)
|
|
|
|
shell: bash
|
2021-12-27 20:24:34 +02:00
|
|
|
- run: rustc --version
|
2023-01-31 22:20:49 +02:00
|
|
|
- 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'
|