-
-
Notifications
You must be signed in to change notification settings - Fork 26
84 lines (63 loc) · 2.52 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
79
80
81
82
83
84
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
node-version: [21.x, 22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Libraries (Linux)
run: sudo apt update && sudo apt install build-essential librsvg2-dev libgif-dev giflib-tools libcurl4 libcurl4-gnutls-dev libgtk-3-dev libpango1.0-dev libpng-dev libpng++-dev libpng-tools libjpeg-tools libjpeg-progs libjpeg-dev -y
if: matrix.os == 'ubuntu-latest'
- name: Install Libraries and Tools (macOS)
run: brew install curl pkg-config cairo pango libpng jpeg giflib librsvg
if: matrix.os == 'macos-latest'
- name: "Install Native Libraries"
run: |
git clone https://github.com/Cogmasters/concord;
cd concord;
make;
sudo make install;
cd ..;
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- name: "Install Dependencies"
run: npm install -D
- name: "ESLint"
run: npm run lint -- --max-warnings=0
- name: "Build (TypeScript)"
run: npm run build --if-present
- name: "Build (Native)"
run: make
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- name: "Test"
run: npx vitest run --coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: onesoft-sudo/sudobot
blazebuild:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: Install tools on macOS
run: brew install curl pkg-config cairo pango libpng jpeg giflib librsvg
if: matrix.os == 'macos-latest'
- name: Build with BlazeBuild
run: ./blazew build