Added github linux build action
This commit is contained in:
parent
c17321fe52
commit
41fa4c3833
24
.github/workflows/linux-ci.yml
vendored
Normal file
24
.github/workflows/linux-ci.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v**
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install GCC11, pCap, wxWidgets
|
||||
run: sudo apt update && sudo apt install -y gcc-11 g++-11 libwxgtk3.0-gtk3-dev && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11
|
||||
- name: Display versions of tools and libraries
|
||||
continue-on-error: true
|
||||
run: uname -a; wx-config --list; wx-config --cxxflags; wx-config --libs; g++ --version | grep g++
|
||||
- name: make
|
||||
run: make
|
||||
- name: Check binary file
|
||||
run: ls -alh build/wxMahjong; file build/wxMahjong
|
5
Makefile
5
Makefile
@ -9,10 +9,13 @@ OBJECTS := $(addprefix $(BDIR)/,$(patsubst %.cpp,%.o,$(wildcard *.cpp)))
|
||||
$(BDIR)/%.o: %.cpp
|
||||
$(CXX) -c `wx-config --cxxflags` -o $@ $<
|
||||
|
||||
all: $(PROGRAM)
|
||||
all: $(BDIR) $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJECTS)
|
||||
$(CXX) -o $(BDIR)/$(PROGRAM) $(OBJECTS) `wx-config --libs`
|
||||
|
||||
$(BDIR):
|
||||
mkdir $@
|
||||
|
||||
clean:
|
||||
rm -f $(BDIR)/*.o $(PROGRAM)
|
||||
|
Loading…
x
Reference in New Issue
Block a user