-
Notifications
You must be signed in to change notification settings - Fork 74
87 lines (85 loc) · 2.35 KB
/
run-ci-script.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
name: run-ci-script
on:
workflow_call:
inputs:
runner:
required: false
type: string
default: ubuntu-latest
target:
required: false
type: string
default: ''
rustflags:
required: false
type: string
default: ''
script:
required: false
type: string
default: ci/run-docker.sh
setup_script:
required: false
type: string
norun:
required: false
type: string
default: ''
verify:
required: false
type: string
default: ''
features:
required: false
type: string
default: ''
jobs:
run-ci-script:
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Rustup Cache
uses: actions/cache@v2
with:
path: |
~/.rustup/toolchains
key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain') }}
- name: Install Toolchain
uses: dtolnay/rust-toolchain@master
with:
# FIXME: change to nightly once https://github.com/rust-lang/packed_simd/pull/350 is merged
# needs to be kept in sync with the toolchain files
toolchain: nightly-2023-06-14
targets: ${{ inputs.target }}
components: rustfmt
- name: Generate Lockfile
run: cargo generate-lockfile
- name: Init Cargo Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup
if: ${{ inputs.setup_script != '' }}
run: ${{ inputs.setup_script }}
env:
TARGET: ${{ inputs.target }}
RUSTFLAGS: ${{ inputs.rustflags }}
NORUN: ${{ inputs.norun }}
VERIFY: ${{ inputs.verify }}
FEATURES: ${{ inputs.features }}
- name: Run CI Script
timeout-minutes: 15
run: ${{ inputs.script }}
env:
TARGET: ${{ inputs.target }}
RUSTFLAGS: ${{ inputs.rustflags }}
NORUN: ${{ inputs.norun }}
VERIFY: ${{ inputs.verify }}
FEATURES: ${{ inputs.features }}