-
Notifications
You must be signed in to change notification settings - Fork 23
47 lines (38 loc) · 1.18 KB
/
ci-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
name: CI Build
# Trigger on pull request creation, update, and on pushes to the main branch
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'x86_64-unknown-linux-gnu' || 'x86_64-apple-darwin' }}
components: clippy
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libgtk-3-dev libsoup3.0-dev build-essential pkg-config libglib2.0-dev
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/" >> $GITHUB_ENV
- name: Check formatting
run: cargo fmt -- --check
- name: Check clippy lints
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Install Rust dependencies
run: cargo fetch
- name: Build
run: cargo build --release