Skip to content

Commit 1f0b37f

Browse files
committed
Add GitHub Actions
1 parent 1e45f85 commit 1f0b37f

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/workflows/build.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Build
2+
on: [pull_request, push]
3+
jobs:
4+
build:
5+
name: Build on Linux
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: "Checkout sources"
9+
uses: actions/checkout@v4
10+
- name: "Install dependencies"
11+
run: sudo apt-get install meson libprotobuf-c-dev protobuf-c-compiler check
12+
- name: "Configure project"
13+
run: meson setup build
14+
- name: "Build project"
15+
run: meson compile -C build
16+
- name: "Test project"
17+
run: meson test -C build --suite libomemo-c
18+
build-cmake:
19+
name: Build on Linux with CMake
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: "Checkout sources"
23+
uses: actions/checkout@v4
24+
- name: "Install dependencies"
25+
run: sudo apt-get install libprotobuf-c-dev protobuf-c-compiler check
26+
- name: "Configure project"
27+
run: cmake -B build -DBUILD_TESTING=yes
28+
- name: "Build project"
29+
run: cmake --build build
30+
- name: "Test project"
31+
run: ctest --test-dir build
32+
build-wraps:
33+
name: Build on Linux with wraps
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: "Checkout sources"
37+
uses: actions/checkout@v4
38+
- name: "Install dependencies"
39+
run: |
40+
sudo apt-get install meson
41+
meson wrap update-db
42+
- name: "Configure project"
43+
run: meson setup build
44+
- name: "Build project"
45+
run: meson compile -C build
46+
- name: "Test project"
47+
run: meson test -C build --suite libomemo-c
48+
build-macos:
49+
name: Build on macOS
50+
runs-on: macos-latest
51+
steps:
52+
- name: "Checkout sources"
53+
uses: actions/checkout@v4
54+
- name: "Install dependencies"
55+
run: brew install meson protobuf-c check
56+
- name: "Configure project"
57+
run: meson setup build
58+
- name: "Build project"
59+
run: meson compile -C build
60+
- name: "Test project"
61+
run: meson test -C build --suite libomemo-c
62+
build-windows:
63+
name: Build on Windows with wraps
64+
runs-on: windows-latest
65+
steps:
66+
- name: "Checkout sources"
67+
uses: actions/checkout@v4
68+
- name: "Install dependencies"
69+
run: |
70+
choco install ninja
71+
python -m pip install meson
72+
meson wrap update-db
73+
- name: "Configure Microsoft Visual Studio DevShell"
74+
uses: bus1/cabuild/action/msdevshell@v1
75+
with:
76+
architecture: x64
77+
- name: "Configure project"
78+
run: meson setup build
79+
- name: "Build project"
80+
run: meson compile -C build
81+
- name: "Test project"
82+
run: meson test -C build --suite libomemo-c

0 commit comments

Comments
 (0)