Skip to content

Merge pull request #89 from Plutoberth/fix/update_workflows #126

Merge pull request #89 from Plutoberth/fix/update_workflows

Merge pull request #89 from Plutoberth/fix/update_workflows #126

Workflow file for this run

name: Linux & Windows
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
include:
- os: ubuntu-latest
binary_path: Client/build/SonyHeadphonesClient
artifact_name: "SonyHeadphonesClient-linux-x64"
script: "sudo apt-get update && sudo apt-get install libbluetooth-dev libglew-dev libglfw3-dev libdbus-1-dev"
- os: windows-latest
binary_path: Client/build/Release/SonyHeadphonesClient.exe
artifact_name: "SonyHeadphonesClient-win-x64.exe"
script: ""
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Download Packages
run: ${{ matrix.script }}
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/Client/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/Client/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{github.workspace}}/Client/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
# Artifact name
name: ${{ matrix.artifact_name }}
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/${{matrix.binary_path}}
# The desired behavior if no files are found using the provided path.