-
Notifications
You must be signed in to change notification settings - Fork 16
149 lines (118 loc) · 6.74 KB
/
build.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Indev - Build Windows x86, Windows x64, Linux, macOS
on:
workflow_dispatch:
pull_request:
branches: ['main', 'indev']
push:
branches: ['main', 'indev']
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-windows:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake x64
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build_x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build x64
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build_x64 --config ${{env.BUILD_TYPE}}
- name: Move Assets/Songs folders and bass.dll x64
working-directory: ${{github.workspace}}/build_x64/Encore
run: move Assets Release/Assets ; move Songs Release/Songs ; move bass.dll Release/bass.dll
- uses: actions/upload-artifact@v4
with:
name: Encore_Win_x64-Indev
path: ${{github.workspace}}/build_x64/Encore/Release/*
build-windows-x86:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake x86
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build_x86 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -A Win32
- name: Build x86
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build_x86 --config ${{env.BUILD_TYPE}}
- name: Move Assets/Songs folders and bass.dll x86
working-directory: ${{github.workspace}}/build_x86/Encore
run: move Assets Release/Assets ; move Songs Release/Songs ; move bass.dll Release/bass.dll
- uses: actions/upload-artifact@v4
with:
name: Encore_Win_x86-Indev
path: ${{github.workspace}}/build_x86/Encore/Release/*
build-linux:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt-get install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev
- name: Configure CMake x64
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build_linux_x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build x64
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build_linux_x64 --config ${{env.BUILD_TYPE}}
- name: Remove CMake files x64
working-directory: ${{github.workspace}}/build_linux_x64/Encore
run: rm -r -f CMakeFiles Makefile cmake_install.cmake
# - name: Configure CMake x86
# # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# run: cmake -B ${{github.workspace}}/build_linux_x86 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
#
# - name: Build x86
# # Build your program with the given configuration
# run: cmake --build ${{github.workspace}}/build_linux_x86 --config ${{env.BUILD_TYPE}}
#
# - name: Remove CMake files x86
# working-directory: ${{github.workspace}}/build_linux_x86/Encore
# run: rm -r -f CMakeFiles Makefile cmake_install.cmake
- uses: actions/upload-artifact@v4
with:
name: Encore_Linux_x64-Indev
path: ${{github.workspace}}/build_linux_x64/Encore/*
# - uses: actions/upload-artifact@v4
# with:
# name: Encore_Linux_x86
# path: ${{github.workspace}}/build_linux_x86/Encore/*
build-macos:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build_macos -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build_macos --config ${{env.BUILD_TYPE}}
- name: Remove CMake files
working-directory: ${{github.workspace}}/build_macos/Encore
run: rm -r -f CMakeFiles Makefile cmake_install.cmake
- name: Create .app Bundle
working-directory: ${{github.workspace}}
run: ./create-macos-app.sh
- name: Create Disk Image
working-directory: ${{github.workspace}}
run: hdiutil create -volname Encore -srcfolder out -ov -format UDZO Encore.dmg
- uses: actions/upload-artifact@v4
with:
name: Encore_macOS-Indev
path: ${{github.workspace}}/Encore.dmg