-
-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (76 loc) · 2.18 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
check-format-rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: cargo fmt -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
check-rust:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows, macOS]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
build-rust-artifacts:
# only master branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows, macOS]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: cargo build --release
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- uses: actions/upload-artifact@v2
with:
name: app-${{ matrix.os }}
path: |
target/release/recent-messages2
target/release/recent-messages2.exe
check-format-prettier:
runs-on: ubuntu-latest
container: node:18-bullseye
steps:
- uses: actions/checkout@v2
- run: cd web && npm ci
# If updating this command, make sure to update the same command in /scripts/reformat.sh too
- run: ./web/node_modules/.bin/prettier --check --ignore-path ".gitignore" "**/*.md" "**/*.tsx" "**/*.yml" "**/*.json"
build-web:
runs-on: ubuntu-latest
container: node:${{ matrix.node }}-bullseye
strategy:
matrix:
node: [18, 20]
steps:
- uses: actions/checkout@v2
- run: cd web && npm ci
- run: cd web && npm run build
- uses: actions/upload-artifact@v2
# only master branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
name: web
path: web/dist/