Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add GitHub Actions workflow file for Linux, macOS, and Windows
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Ubuntu 20.04 | ||
os: ubuntu-20.04 | ||
install_dir: ~/libebur128 | ||
cmake_extras: -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
- name: macOS 10.15 | ||
os: macos-10.15 | ||
install_dir: ~/libebur128 | ||
cmake_extras: -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
- name: Windows 2019 | ||
os: windows-2019 | ||
install_dir: C:\libebur128 | ||
cmake_extras: -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake | ||
cmake_config: --config RelWithDebInfo | ||
ctest_config: --build-config RelWithDebInfo | ||
|
||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
- name: Configure | ||
run: cmake -DCMAKE_INSTALL_PREFIX=${{ matrix.install_dir }} -DBUILD_SHARED_LIBS=ON | ||
${{ matrix.cmake_extras }} -S . -B build | ||
- name: Build | ||
run: cmake --build build ${{ matrix.cmake_config }} | ||
env: | ||
CMAKE_BUILD_PARALLEL_LEVEL: 2 | ||
# TODO: build and run tests and fuzzer | ||
- name: Install | ||
run: cmake --install build ${{ matrix.cmake_config }} | ||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.name }} libebur128 build | ||
path: ${{ matrix.install_dir }} |