-
Notifications
You must be signed in to change notification settings - Fork 110
101 lines (81 loc) · 2.33 KB
/
pull-request.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
name: pixlet
on:
pull_request:
branches:
- "*"
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Install buildifier
run: make install-buildifier
- name: Run buildifier
run: buildifier -d -r ./
build-and-test:
name: Build and Test
strategy:
matrix:
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
with:
msystem: mingw64
update: true
install: >-
make
curl
mingw-w64-x86_64-go
mingw-w64-x86_64-toolchain
- name: Checkout code
uses: actions/checkout@v3
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-22.04'
run: sudo apt-get install -y libwebp-dev
- name: Install macOS dependencies
if: matrix.os == 'macos-latest'
run: brew install webp
- name: Install Windows dependencies
if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: |
set MSYSTEM=MINGW64
curl -LO https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwebp-1.2.4-4-any.pkg.tar.zst
pacman -U --noconfirm mingw-w64-x86_64-libwebp-1.2.4-4-any.pkg.tar.zst
- name: Install frontend dependencies
run: npm install
- name: Build frontend
run: npm run build
- name: Build
run: make build
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest'
- name: Build Windows
shell: msys2 {0}
run: |
set MSYSTEM=MINGW64
make build
if: matrix.os == 'windows-latest'
- name: Test
run: make test
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest'
- name: Test Windows
shell: msys2 {0}
run: |
set MSYSTEM=MINGW64
make test
if: matrix.os == 'windows-latest'