reone/.github/workflows/cmake.yml

41 lines
1,018 B
YAML
Raw Normal View History

2021-02-25 12:15:34 +00:00
name: CMake
on:
push:
branches:
- master
2021-02-25 12:15:34 +00:00
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-18.04
2021-02-25 12:15:34 +00:00
steps:
- uses: actions/checkout@v2
- name: Install dependencies
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:15:34 +00:00
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
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