From 17bc3acaba324d2a2fad482ad728c1968b6847a9 Mon Sep 17 00:00:00 2001 From: Nikita Zimin Date: Sun, 7 Apr 2024 14:23:20 +0300 Subject: [PATCH] Makefile and push-matrix workflow --- .github/workflows/push-matrix.yml | 34 +++++++++++++++++++++++++++++++ Makefile | 17 ++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/push-matrix.yml create mode 100644 Makefile diff --git a/.github/workflows/push-matrix.yml b/.github/workflows/push-matrix.yml new file mode 100644 index 0000000..e1a9e0d --- /dev/null +++ b/.github/workflows/push-matrix.yml @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f4c93f1 --- /dev/null +++ b/Makefile @@ -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)