Skip to content

Commit

Permalink
Allow easily adding flags to make build & error if any warnings (#54)
Browse files Browse the repository at this point in the history
* Allow easily adding flags to make build & error if any warnings

* Add pull_request sync type to build trigger
  • Loading branch information
simon-wh authored Jan 3, 2023
1 parent 056d125 commit c497374
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build

on: [push]
on:
push:
pull_request:
types:
- synchronize

env:
# Path to the solution file relative to the root of the project.
Expand Down Expand Up @@ -46,11 +50,11 @@ jobs:

- name: Build (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: cd linux && make
run: cd linux && make CDEFS="-Werror"

- name: Build (Mac)
if: startsWith(matrix.os, 'mac')
run: cd mac && make
run: cd mac && make CDEFS="-Werror"

# - name: Restore NuGet packages
# working-directory: ${{env.GITHUB_WORKSPACE}}
Expand Down
3 changes: 2 additions & 1 deletion linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ all: libwooting-rgb-sdk.so
prefix ?= /usr/local

CC ?= gcc
CFLAGS ?= -Wall -g -fPIC
CDEFS=
CFLAGS ?= -Wall -g -fPIC ${CDEFS}
CPPFLAGS ?= #-DDEBUG_LOG
LDFLAGS ?= -Wall -g -Wl,--no-as-needed

Expand Down
3 changes: 2 additions & 1 deletion mac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ all: libwooting-rgb-sdk.dylib
prefix ?= /usr/local

CC ?= gcc
CFLAGS ?= -Wall -g -fPIC
CDEFS=
CFLAGS ?= -Wall -g -fPIC ${CDEFS}
CPPFLAGS ?= #-DDEBUG_LOG
LDFLAGS ?= -Wall -g

Expand Down

0 comments on commit c497374

Please sign in to comment.