-
-
Notifications
You must be signed in to change notification settings - Fork 13
132 lines (113 loc) · 3.23 KB
/
check.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
121
122
123
124
125
126
127
128
129
130
131
132
on: [push, pull_request]
permissions:
contents: write
name: CI
env:
PF_INFO: "ascii"
PF_PAD1: 0
PF_PAD2: 0
PF_PAD3: 0
jobs:
checks:
name: ${{ matrix.name }} (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-freebsd
- aarch64-linux-android
- x86_64-pc-windows-gnu
- x86_64-apple-darwin
include:
- os: ubuntu-latest
name: Linux x86_64
target: x86_64-unknown-linux-gnu
cross: false
strip: true
- os: ubuntu-latest
name: FreeBSD
target: x86_64-unknown-freebsd
cross: true
strip: true
- os: ubuntu-latest
name: Android
target: aarch64-linux-android
cross: true
strip: true
- os: windows-latest
name: Windows x86_64
target: x86_64-pc-windows-gnu
cross: false
strip: true
- os: macos-latest
name: macOS x86_64
target: x86_64-apple-darwin
cross: false
strip: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Bootstrap
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
target: ${{ matrix.target }}
- name: Formatting
uses: actions-rs/cargo@v1
with:
command: fmt
use-cross: ${{ matrix.cross }}
continue-on-error: false
- name: Lints
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target=${{ matrix.target }} -- --no-deps -D clippy::all
use-cross: ${{ matrix.cross }}
continue-on-error: false
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --target=${{ matrix.target }} --target-dir=/tmp
use-cross: ${{ matrix.cross }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: pfetch-${{ matrix.target }}
path: /tmp/${{ matrix.target }}/debug/pfetch
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --target=${{ matrix.target }}
if: ${{ !matrix.cross }}
render:
needs: checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Jetbrains Mono
run: sudo apt update && sudo apt install -y fonts-jetbrains-mono
- name: Install typst
uses: yusancky/setup-typst@v2
with:
version: 'v0.10.0'
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: pfetch-x86_64-unknown-linux-gnu
path: /tmp/
- name: Run render script
run: sudo chmod +x /tmp/pfetch && cd ./tools/ && ./render_all.sh /tmp/pfetch
- name: Commit Files
uses: EndBug/add-and-commit@v9
with:
add:
assets all_logos.md
default_author: github_actions
message: "chore(logos): re-render all logos"