Skip to content

Update README.md

Update README.md #9

name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
BUILD_DIR: ${{ github.workspace }}/build
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ pkg-config libopenmpt-dev portaudio19-dev libncursesw5-dev
- name: Configure CMake
run: cmake -S ${{ github.workspace }} -B ${{ env.BUILD_DIR }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build
run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }}
- name: Test
working-directory: ${{ env.BUILD_DIR }}
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure
- name: Upload build artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: modtracker-${{ env.BUILD_TYPE }}
path: |
${{ env.BUILD_DIR }}/modtracker
${{ env.BUILD_DIR }}/note_formatter_tests