From 8846524541ce5ea9e02baa08a3b27560662b69c5 Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Thu, 16 Dec 2021 20:29:48 +0100 Subject: [PATCH] Add GitHub Actions Workflow * Create build.yml * Create CMakePresets.json --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ CMakePresets.json | 26 ++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 CMakePresets.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..ae7501e8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Cmake CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: cmake + uses: lukka/run-cmake@v10 + with: + configurePreset: 'default' + buildPreset: 'default' + - name: artifacts + uses: actions/upload-artifact@v2 + with: + name: linux-build + path: | + build + !build/CMakeCache.txt + !build/build.ninja + !build/_deps + !build/cmake_install.cmake + !build/*.a diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..134d311b --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,26 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 21, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "Default Configure Settings", + "description": "Sets build and install directories", + "binaryDir": "${sourceDir}/build", + "generator": "Unix Makefiles" + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default", + "displayName": "Default Build", + "description": "Default Build", + "jobs": 2 + } + ] +}