forked from signalapp/libsignal-protocol-c
-
-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (51 loc) · 1.65 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
name: Build
on: [pull_request, push]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: "Checkout sources"
uses: actions/checkout@v4
- name: "Install dependencies (Linux)"
run: sudo apt-get install meson libprotobuf-c-dev protobuf-c-compiler check
if: runner.os == 'Linux'
- name: "Install dependencies (macOS)"
run: brew install meson protobuf-c check
if: runner.os == 'macOS'
- name: "Install dependencies (Windows)"
run: |
choco install ninja
python -m pip install meson
meson wrap update-db
if: runner.os == 'Windows'
- name: "Configure Microsoft Visual Studio DevShell"
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
if: runner.os == 'Windows'
- name: "Configure project"
run: meson setup build
- name: "Build project"
run: meson compile -C build
- name: "Test project"
run: meson test -C build
build-cmake:
name: Build on ubuntu-latest (CMake)
runs-on: ubuntu-latest
steps:
- name: "Checkout sources"
uses: actions/checkout@v4
- name: "Install dependencies"
run: sudo apt-get install libprotobuf-c-dev protobuf-c-compiler check
if: runner.os == 'Linux'
- name: "Configure project"
run: cmake -B build -DBUILD_TESTING=yes
- name: "Build project"
run: cmake --build build
- name: "Test project"
run: ctest --test-dir build