This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
120 lines (119 loc) · 3.4 KB
/
cargo-test.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
on:
push:
paths:
- '**.rs'
- '*/Cargo.toml'
- 'Cargo.lock'
- .github/workflows/cargo-test.yml
- rust-toolchain.toml
pull_request:
paths:
- '**.rs'
- '*/Cargo.toml'
- 'Cargo.lock'
- .github/workflows/cargo-test.yml
- rust-toolchain.toml
workflow_dispatch:
inputs:
name: cargo test
jobs:
cargotest:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Cleanup unused space
shell: bash
run: |
set -x
df -h /
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/microsoft
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/lib/jvm
sudo rm -rf /usr/local/graalvm
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/swift
df -h /
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- uses: actions/[email protected]
- name: Install asciidoctor, pandoc, and pdftotext
shell: bash
run: |
sudo apt update -y && sudo apt install -y \
asciidoctor \
libusb-1.0-0-dev \
pandoc \
poppler-utils \
ruby \
- name: Install asciidoctor-pdf, asciidoctor-mermaid
shell: bash
run: |
sudo gem install rouge
sudo gem install asciidoctor-pdf -v 2.3.2
sudo gem install asciidoctor-mermaid -v 0.4.1
sudo npm install -g @mermaid-js/mermaid-cli
mmdc --help
- name: Install latest nightly
uses: oxidecomputer/actions-rs_toolchain@oxide/master
with:
components: rustfmt, clippy
- name: Install libusb
shell: bash
run: |
sudo apt update -y && sudo apt install -y \
libusb-1.0-0-dev
- name: Cache github etags
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.cache
key: github-cache
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ github.ref }}
restore-keys: |
${{ runner.os }}-cargo-registry-${{ github.ref }}
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ github.ref }}
restore-keys: |
${{ runner.os }}-cargo-index-${{ github.ref }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ github.ref }}
restore-keys: |
${{ runner.os }}-cargo-build-target-${{ github.ref }}
- name: Report pre-test remaining disk
shell: bash
run: |
set -x
df -h /
- name: Run cargo test
run: |
cargo test -- --test-threads=1 --nocapture
shell: bash
env:
RUST_LOG: trace
RUST_BACKTRACE: 1
- name: Report remaining disk
if: always()
shell: bash
run: |
set -x
df -h /
- name: Report /tmp
if: always()
shell: bash
run: |
ls -altr -R /tmp/asciidoc-rfd-render