diff options
author | Raphaël Zumer <rzumer@tebako.net> | 2019-12-11 10:29:51 -0500 |
---|---|---|
committer | Raphaël Zumer <rzumer@tebako.net> | 2019-12-11 11:46:23 -0500 |
commit | 7027813cb268c8b168a2c6ac7e871761f02a4435 (patch) | |
tree | dcdb44ba384831bb1bf515d9f1bff6b57f7b0fd9 /.github/workflows | |
parent | 3f7bc1a6c19dc502bfe00f26d0720961cf130363 (diff) |
Add C/C++ with CMake GitHub workflow
This enables continuous integration
with GitHub Actions.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ccppcmake.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.github/workflows/ccppcmake.yml b/.github/workflows/ccppcmake.yml new file mode 100644 index 0000000..7cf4339 --- /dev/null +++ b/.github/workflows/ccppcmake.yml @@ -0,0 +1,32 @@ +name: C/C++ CI with CMake + +on: [push] + +env: + BUILD_TYPE: Release + CMAKE_VERSION: 3.15.2 + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install dependencies + shell: bash + working-directory: ${{runner.workspace}} + run: | # Fetch a new version of CMake, because the default is too old. + wget -nv https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz \ + && tar -zxf cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz \ + && sudo apt-get install gtk+-3.0 libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev + - name: Create build environment + run: mkdir ${{runner.workspace}}/build + - name: Configure + shell: bash + working-directory: ${{runner.workspace}}/build + run: ${{runner.workspace}}/cmake-$CMAKE_VERSION-Linux-x86_64/bin/cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + - name: Make + shell: bash + working-directory: ${{runner.workspace}}/build + run: make -j$(nproc --all) |