Skip to content

Commit 768db6c

Browse files
authored
Create cmake-single-platform.yml
1 parent 0be7085 commit 768db6c

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CMake on a single platform
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
BUILD_DIR: ${{ github.workspace }}/build
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y cmake g++ pkg-config libopenmpt-dev portaudio19-dev libncursesw5-dev
24+
25+
- name: Configure CMake
26+
run: cmake -S ${{ github.workspace }} -B ${{ env.BUILD_DIR }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
27+
28+
- name: Build
29+
run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }}
30+
31+
- name: Test
32+
working-directory: ${{ env.BUILD_DIR }}
33+
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure

0 commit comments

Comments
 (0)