diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-03-25 00:45:37 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-03-25 00:45:37 +0800 |
| commit | 8d0e3b1a4a3185b7f1879b4c8ca58715b05b8822 (patch) | |
| tree | 3ab6f9c07c5a0ee0b88e06350b703d425ded0548 | |
| parent | d04b23b9a47c2ec6631aec16dc79f5b803fe07f3 (diff) | |
| download | yuescript-8d0e3b1a4a3185b7f1879b4c8ca58715b05b8822.tar.gz yuescript-8d0e3b1a4a3185b7f1879b4c8ca58715b05b8822.tar.bz2 yuescript-8d0e3b1a4a3185b7f1879b4c8ca58715b05b8822.zip | |
fix CI build.
| -rw-r--r-- | .github/workflows/ccpp.yml | 5 | ||||
| -rw-r--r-- | 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: | |||
| 6 | build: | 6 | build: |
| 7 | 7 | ||
| 8 | runs-on: ubuntu-latest | 8 | runs-on: ubuntu-latest |
| 9 | 9 | ||
| 10 | steps: | 10 | steps: |
| 11 | - uses: actions/checkout@v1 | 11 | - uses: actions/checkout@v1 |
| 12 | - name: Update g++ | ||
| 13 | run: sudo apt -y install g++-8 | ||
| 12 | - name: Test | 14 | - name: Test |
| 13 | run: make test | 15 | run: make test |
| 16 | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #### PROJECT SETTINGS #### | 1 | #### PROJECT SETTINGS #### |
| 2 | # The name of the executable to be created | 2 | # The name of the executable to be created |
| 3 | BIN_NAME := moonp | 3 | BIN_NAME := moonp |
| 4 | # Compiler used | 4 | |
| 5 | CXX ?= g++ | ||
| 6 | # Extension of source files used in the project | 5 | # Extension of source files used in the project |
| 7 | SRC_EXT = cpp | 6 | SRC_EXT = cpp |
| 8 | # Path to the source directory, relative to the makefile | 7 | # Path to the source directory, relative to the makefile |
| @@ -41,6 +40,14 @@ TEST_OUTPUT = ./spec/outputs | |||
| 41 | # Obtains the OS type, either 'Darwin' (OS X) or 'Linux' | 40 | # Obtains the OS type, either 'Darwin' (OS X) or 'Linux' |
| 42 | UNAME_S:=$(shell uname -s) | 41 | UNAME_S:=$(shell uname -s) |
| 43 | 42 | ||
| 43 | # Select compiler, add platform related linker flag | ||
| 44 | ifeq ($(UNAME_S),Darwin) | ||
| 45 | CXX ?= clang | ||
| 46 | else | ||
| 47 | LINK_FLAGS += -lstdc++fs | ||
| 48 | CXX ?= g++-8 | ||
| 49 | endif | ||
| 50 | |||
| 44 | # Function used to check variables. Use on the command line: | 51 | # Function used to check variables. Use on the command line: |
| 45 | # make print-VARNAME | 52 | # make print-VARNAME |
| 46 | # Useful for debugging and adding features | 53 | # Useful for debugging and adding features |
