-
Notifications
You must be signed in to change notification settings - Fork 490
57 lines (51 loc) · 1.67 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# CI Workflow for Bento4
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Bento4 Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
include:
- os: ubuntu-latest
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release
CMAKE_OUTPUT_SUBDIR: x86_64-unknown-linux
PYTHON3_COMMAND: python3
- os: macos-latest
CMAKE_OPTIONS: -G Xcode
CMAKE_OUTPUT_SUBDIR: universal-apple-macosx
PYTHON3_COMMAND: python3
- os: windows-latest
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release
CMAKE_OUTPUT_SUBDIR: x86_64-microsoft-win32
PYTHON3_COMMAND: py
steps:
# Check out the repository under $GITHUB_WORKSPACE, so that the jobs can access it
- uses: actions/checkout@v2
# CMake Build
- name: Release Build with CMake
run: |
mkdir cmakebuild
cd cmakebuild
mkdir ${{matrix.CMAKE_OUTPUT_SUBDIR}}
cd ${{matrix.CMAKE_OUTPUT_SUBDIR}}
cmake ${{matrix.CMAKE_OPTIONS}} ../..
cmake --build . --config Release
# Create SDK
- name: Create SDK
if: github.event_name == 'push'
run: ${{matrix.PYTHON3_COMMAND}} Scripts/SdkPackager.py
# Upload the SDK
- name: Upload SDK
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
path: SDK/*.zip