-
Notifications
You must be signed in to change notification settings - Fork 2
123 lines (100 loc) · 4.31 KB
/
build_windows.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Windows (x64)
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
jobs:
build-projectm:
name: Build ProjectM
runs-on: windows-latest
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
steps:
- uses: actions/checkout@v4
with:
repository: 'projectM-visualizer/projectm'
submodules: 'recursive'
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Get ProjectM Git Hash
id: git-hash
run: echo "hash=$(git rev-parse HEAD)v2" >> $Env:GITHUB_OUTPUT
- name: Cache Install
id: cache-install
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/install
key: install-${{ runner.os }}-projectm-${{ steps.git-hash.outputs.hash }}
- name: Configure Build
run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DENABLE_PLAYLIST=ON
if: steps.cache-install.outputs.cache-hit != 'true'
- name: Build Release
run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel
if: steps.cache-install.outputs.cache-hit != 'true'
- name: Install
run: |
cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install
if: steps.cache-install.outputs.cache-hit != 'true'
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: projectm-windows-shared-latest
path: install/*
build-plugin:
name: Build GST Plugin ProjectM
runs-on: windows-latest
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Wait for ProjectM
uses: yogeshlonkar/wait-for-jobs@v0
with:
interval: '5000'
jobs: Build ProjectM
ttl: '15'
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: projectm-windows-shared-latest
path: artifacts
- name: Configure Build
run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_VERBOSE_MAKEFILE=YES -DprojectM4_DIR="artifacts/lib/cmake/projectM4"
env:
projectM4Playlist_DIR: "${{ github.workspace }}/artifacts/lib/cmake/projectM4Playlist"
- name: Build Release
id: build
run: cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel
# - name: Install Chocolatey
# uses: crazy-max/ghaction-chocolatey@v3
# with:
# args: install gstreamer --no-progress
# if: steps.build.outputs.return-code == 0
# - name: Test
# run: |
# set GST_PLUGIN_PATH="${{ github.workspace }}/cmake-build/Release"
# gst-inspect-1.0 projectm
# if: steps.build.outputs.return-code == 0
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: gst-projectm-windows-latest
path: ${{ github.workspace }}\cmake-build\Release\*.dll