Skip to content

Commit

Permalink
👷 add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
zie87 committed Oct 5, 2023
1 parent d8c94bd commit 8a1c113
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: build

on:
push:
branches:
- main

pull_request:
paths:
- "**.cpp"
- "**.hpp"

jobs:

linux:
runs-on: ubuntu-22.04
strategy:
matrix:
build_type: [debug, release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install meson ninja
- name: Configure
run: meson setup builddir/ --buildtype ${{ matrix.build_type }}
env:
CC: gcc-12
CXX: g++-12
- name: Compile
run: meson compile -C builddir/ -v
- name: Run tests
run: meson test -C builddir/ -v --suite zll
- uses: actions/upload-artifact@v3
if: failure()
with:
name: meson_testlog_linux
path: builddir/meson-logs/testlog.txt
retention-days: 3

macos:
runs-on: macos-12
strategy:
matrix:
build_type: [debug, release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install meson ninja
- name: Configure
run: meson setup builddir/ --buildtype ${{ matrix.build_type }}
- name: Compile
run: meson compile -C builddir/ -v
- name: Run tests
run: meson test -C builddir/ -v --suite zll
- uses: actions/upload-artifact@v3
if: failure()
with:
name: meson_testlog_macos
path: builddir/meson-logs/testlog.txt
retention-days: 3

0 comments on commit 8a1c113

Please sign in to comment.