Applying changes discussed with Tero. #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: [push] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: RelWithDebInfo | |
XCL_VERSION: 1.5.1 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Windows: Configure environment" | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
choco install winflexbison | |
# Select MinGW toolchain instead of the default MSVC. | |
echo "CMAKE_GENERATOR=MinGW Makefiles" >> $GITHUB_ENV | |
- name: "Linux: Install dependency libraries" | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends build-essential cmake git freeglut3-dev libudev-dev libopenal-dev libspeechd-dev | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/src | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
working-directory: ${{github.workspace}}/src | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: binaries | |
path: ${{github.workspace}}/build/*.xpl | |
if-no-files-found: error | |
package: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: binaries | |
path: Xchecklist/64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Xchecklist_v${{env.XCL_VERSION}} | |
path: | | |
${{github.workspace}}/Xchecklist* | |
if-no-files-found: error |