-
-
Notifications
You must be signed in to change notification settings - Fork 31
92 lines (85 loc) · 3.78 KB
/
ci.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
name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
- dev
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
tool:
# Note: Specifying the version of valgrind is not supported.
# cargo-watch is supported by cargo-binstall (through quickinstall)
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cross,nextest,protoc,shellcheck,shfmt,valgrind,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
- cargo-hack@0.5.21,cargo-llvm-cov@0.5.0,cargo-minimal-versions@0.1.5,parse-changelog@0.5.1,cargo-udeps@0.1.33,cargo-valgrind@2.1.0,cross@0.2.4,nextest@0.9.11,protoc@3.21.7,shellcheck@0.8.0,shfmt@3.5.1,wasm-pack@0.10.3,wasmtime@1.0.1,mdbook@0.4.21,mdbook-linkcheck@0.7.7,cargo-watch@8.1.1
- cargo-hack@0.5,cargo-llvm-cov@0.5,cargo-minimal-versions@0.1,parse-changelog@0.5,cargo-udeps@0.1,cargo-valgrind@2.1,cross@0.2,nextest@0.9,shellcheck@0.8,shfmt@3.5,wasm-pack@0.10,wasmtime@1.0,mdbook@0.4,mdbook-linkcheck@0.7,cargo-watch@8.1
- cargo-valgrind@2,shfmt@3,wasmtime@1,cargo-watch@8
include:
- os: macos-11
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
- os: windows-2019
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./
with:
tool: ${{ matrix.tool }}
manifest:
runs-on: ubuntu-latest
permissions:
contents: write # TODO test
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@nightly
- run: tools/manifest.sh
- run: git add -N . && git diff --exit-code
if: github.repository_owner != 'taiki-e' || github.event_name != 'schedule' && !(github.event_name == 'push' && github.ref == 'refs/heads/main')
- id: diff
run: ci/manifest.sh
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
- uses: taiki-e/create-pull-request@v4
with:
title: Update manifest
body: |
Auto-generated by [create-pull-request][1]
[Please close and immediately reopen this pull request to run CI.][2]
[1]: https://github.com/peter-evans/create-pull-request
[2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
branch: update-manifest
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: taiki-e/install-action@shellcheck
- uses: taiki-e/install-action@shfmt
- run: npm install prettier
- run: shfmt -d $(git ls-files '*.sh')
if: always()
- run: npx prettier -c $(git ls-files '*.yml')
if: always()
- run: npx prettier -c $(git ls-files '*.js')
if: always()
- run: shellcheck $(git ls-files '*.sh')
if: always()