Skip to content

Commit

Permalink
Makefile and push-matrix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nzeemin committed Apr 7, 2024
1 parent 53a60fb commit 17bc3ac
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/push-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: push-matrix

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- name: "Ubuntu latest GCC"
os: ubuntu-latest
cc: "gcc"
cxx: "g++"
- name: "Ubuntu latest Clang"
os: ubuntu-latest
cc: "clang"
cxx: "clang++"
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Build
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
make
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

CXXFLAGS = -std=c++17 -O3 -Wall

SOURCES_IMGOS = $(foreach dir, ./imgos, $(wildcard $(dir)/*.cpp))
SOURCES = pch.cpp bkdecmd.cpp BKImage.cpp BKImgFile.cpp BKParseImage.cpp StringUtil.cpp $(SOURCES_IMGOS)

OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES))

all: bkdecmd

bkdecmd: $(OBJECTS)
$(CXX) $(CXXFLAGS) -o bkdecmd $(OBJECTS)

.PHONY: clean

clean:
rm -f $(OBJECTS)

0 comments on commit 17bc3ac

Please sign in to comment.