summaryrefslogtreecommitdiff
path: root/.github/workflows/makefile.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/makefile.yml')
-rw-r--r--.github/workflows/makefile.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml
new file mode 100644
index 00000000..e32f3ef6
--- /dev/null
+++ b/.github/workflows/makefile.yml
@@ -0,0 +1,44 @@
+name: Makefile CI
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [ubuntu, macos]
+ toolchain: [gcc, llvm]
+ include:
+ - os: ubuntu
+ toolchain: gcc
+ install_cmd: |
+ sudo apt update
+ sudo apt install g++
+ CXX: g++
+ - os: ubuntu
+ toolchain: llvm
+ install_cmd: |
+ sudo apt update
+ sudo apt install clang
+ CXX: clang++
+ - os: macos
+ toolchain: gcc
+ install_cmd: |
+ brew update
+ brew install gcc
+ CXX: g++
+ - os: macos
+ toolchain: llvm
+ install_cmd: |
+ brew update
+ brew install llvm
+ CXX: clang++
+ runs-on: ${{ matrix.os }}-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install dependencies
+ run: ${{ matrix.install_cmd }}
+ - name: Build and test
+ run: make CXX=${{ matrix.CXX }} -j$(nproc 2>/dev/null || sysctl -n hw.ncpu) test