Skip to content

Commit

Permalink
Add GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Feb 21, 2025
1 parent e7ff305 commit a7d812b
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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 meson protoc pkgconfiglite
if: runner.os == 'Windows'
- name: "Prepare Microsoft Visual Studio DevShell (Windows)"
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

0 comments on commit a7d812b

Please # to comment.