forked from actions-rs/toolchain
-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (88 loc) · 2.67 KB
/
test_install_stable_nightly_beta.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI Test - install toolchain stable, nightly, and beta
on:
push:
branches:
- main
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
schedule:
# Every Monday at midnight: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: "0 0 * * 1"
permissions:
contents: read
concurrency:
# Cancel old actions upon push
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
install_on_runner:
name: Toolchain stable, nightly, and beta (runner)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
toolchain:
- stable
- nightly
- beta
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use myself
id: toolchain
uses: ./
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
- name: Test action outputs
env:
RUSTC: ${{ steps.toolchain.outputs.rustc }}
RUSTC_HASH: ${{ steps.toolchain.outputs.rustc_hash }}
CARGO: ${{ steps.toolchain.outputs.cargo }}
RUSTUP: ${{ steps.toolchain.outputs.rustup }}
run: |
echo "$RUSTC" && test "$RUSTC" != ""
echo "$RUSTC_HASH" && test "$RUSTC_HASH" != ""
echo "$CARGO" && test "$CARGO" != ""
echo "$RUSTUP" && test "$RUSTUP" != ""
install_in_docker:
name: Toolchain stable, nightly, and beta (docker)
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- nightly
- beta
# Docker image, not the GitHub Actions VM
container: ubuntu:latest
steps:
- name: Checkout
uses: actions/checkout@v4
# `rustup` will need `curl` or `wget` later
- name: Install packages
run: apt-get update && apt-get install -y curl
- name: Use myself
id: toolchain
uses: ./
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
- name: Test action outputs
env:
RUSTC: ${{ steps.toolchain.outputs.rustc }}
RUSTC_HASH: ${{ steps.toolchain.outputs.rustc_hash }}
CARGO: ${{ steps.toolchain.outputs.cargo }}
RUSTUP: ${{ steps.toolchain.outputs.rustup }}
run: |
echo "$RUSTC" && test "$RUSTC" != ""
echo "$RUSTC_HASH" && test "$RUSTC_HASH" != ""
echo "$CARGO" && test "$CARGO" != ""
echo "$RUSTUP" && test "$RUSTUP" != ""