2021-02-25 12:15:34 +00:00
|
|
|
name: CMake
|
|
|
|
|
2021-02-26 13:29:16 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-02-25 12:15:34 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-03-08 05:08:13 +00:00
|
|
|
runs-on: ubuntu-18.04
|
2021-02-25 12:15:34 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-02-26 13:29:16 +00:00
|
|
|
- name: Install dependencies
|
2021-03-23 02:39:27 +00:00
|
|
|
run: >
|
|
|
|
sudo sed -i 's/azure\.//' /etc/apt/sources.list &&
|
|
|
|
sudo apt-get update &&
|
|
|
|
sudo apt install libboost-all-dev libsdl2-dev libglew-dev libopenal-dev libmad0-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev
|
2021-02-25 12:22:57 +00:00
|
|
|
|
2021-02-25 12:15:34 +00:00
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-02-26 13:29:16 +00:00
|
|
|
shell: bash
|
2021-02-25 12:37:46 +00:00
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_TESTS=ON
|
2021-02-25 12:15:34 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{github.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . --config $BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{github.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: ctest -C $BUILD_TYPE
|