From 8d0e3b1a4a3185b7f1879b4c8ca58715b05b8822 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 25 Mar 2020 00:45:37 +0800 Subject: fix CI build. --- .github/workflows/ccpp.yml | 5 ++++- makefile | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 5b8c191..9bc8efd 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -6,8 +6,11 @@ jobs: build: runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v1 + - name: Update g++ + run: sudo apt -y install g++-8 - name: Test run: make test + diff --git a/makefile b/makefile index a285842..d176ee3 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,7 @@ #### PROJECT SETTINGS #### # The name of the executable to be created BIN_NAME := moonp -# Compiler used -CXX ?= g++ + # Extension of source files used in the project SRC_EXT = cpp # Path to the source directory, relative to the makefile @@ -41,6 +40,14 @@ TEST_OUTPUT = ./spec/outputs # Obtains the OS type, either 'Darwin' (OS X) or 'Linux' UNAME_S:=$(shell uname -s) +# Select compiler, add platform related linker flag +ifeq ($(UNAME_S),Darwin) + CXX ?= clang +else + LINK_FLAGS += -lstdc++fs + CXX ?= g++-8 +endif + # Function used to check variables. Use on the command line: # make print-VARNAME # Useful for debugging and adding features -- cgit v1.2.3-55-g6feb