-
Notifications
You must be signed in to change notification settings - Fork 2
146 lines (123 loc) · 4.18 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
name: Build
on: push
defaults:
run:
shell: bash
jobs:
Build:
strategy:
max-parallel: 15
fail-fast: false
matrix:
include:
- os: windows-latest
arch: x86
env: Windows
- os: windows-latest
arch: x64
env: Windows
- os: ubuntu-20.04
arch: x64
env: Linux
- os: macos-12
arch: x64
env: Mac
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.env }}
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v3
- name: "Setup Directories"
run: mkdir -p output output/lib output/include output/lc_licenses
- name: "Configure Arguments: Common"
run: |
echo "OUTPUT_DIR=$(pwd -W 2>/dev/null || pwd)/output" >> $GITHUB_ENV
platforms/common.sh
- name: "Configure Arguments: OS"
run: |
platforms/${{ matrix.env }}.sh
- name: "Configure Arguments: Architecture"
run: |
platforms/${{ matrix.env }}-${{ matrix.arch }}.sh
- name: "Set CMake paths"
run: |
echo "CMAKE_CONFIGURE_ARGS=$CMAKE_CONFIGURE_ARGS -DCMAKE_INSTALL_PREFIX=$OUTPUT_DIR -DCMAKE_PREFIX_PATH=$OUTPUT_DIR" >> $GITHUB_ENV
echo "MESON_CONFIGURE_ARGS=$MESON_CONFIGURE_ARGS --prefix $OUTPUT_DIR -Dlibdir=$OUTPUT_DIR/lib -Dbuildtype=release" >> $GITHUB_ENV
- name: "Windows: Setup VS Dev Environment"
if: ${{ matrix.env == 'Windows' }}
uses: seanmiddleditch/gha-setup-vsdevenv@v3
with:
arch: ${{ env.VS_ARCH }}
- name: "Linux: Setup packages"
if: ${{ matrix.env == 'Linux' }}
run: |
$CHROOT sudo add-apt-repository ppa:savoury1/build-tools
$CHROOT sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$CHROOT sudo apt-get update
DEBIAN_FRONTEND=noninteractive $CHROOT sudo apt-get -y --no-install-recommends install libgl-dev libasound2-dev libpulse-dev curl nasm meson ninja-build libffi-dev
- name: Build zlib
run: |
scripts/build.sh zlib
- name: Build non-Windows
if: ${{ matrix.env != 'Windows' }}
run: |
scripts/build.sh libpng
scripts/build.sh libjpeg-turbo
scripts/build.sh openssl
- name: Build
run: |
scripts/build.sh boost
scripts/build.sh catch2
scripts/build.sh libcurl
scripts/build.sh fmt
scripts/build.sh glew
scripts/build.sh libsamplerate
scripts/build.sh SDL2
scripts/build.sh spdlog
- name: Build Linux
if: ${{ matrix.env == 'Linux' }}
run: |
scripts/build.sh libffi
scripts/build.sh glib
scripts/build.sh fluidsynth
- name: Build more
run: |
scripts/build.sh libogg
scripts/build.sh libvorbis
scripts/build.sh libmodplug
scripts/build.sh mpg123
scripts/build.sh SDL2_mixer
scripts/build.sh freetype -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
NOLICENSE=1 scripts/build.sh freetype
scripts/build.sh miniupnpc
- name: Remove bin
run: $CHROOT rm -rf output/bin
- name: Extract C++/WinRT
if: ${{ matrix.env == 'Windows' }}
run: |
scripts/build.sh cppwinrt
- name: Generate old_path.txt
run: |
echo "$OUTPUT_DIR" > $OUTPUT_DIR/old_path.txt
- name: Result
run: ls -R output
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.env }}-${{ matrix.arch }}
path: |
output/*
- name: Pack
if: ${{ env.IS_RELEASE == 'true' }}
run: |
cd output
tar -czf lc_deps-${{ matrix.env }}-${{ matrix.arch }}.tar.gz *
- name: Release
uses: ncipollo/release-action@v1.11.2
if: ${{ env.IS_RELEASE == 'true' }}
with:
artifacts: output/lc_deps-${{ matrix.env }}-${{ matrix.arch }}.tar.gz
allowUpdates: true
artifactErrorsFailBuild: true
replacesArtifacts: true
generateReleaseNotes: true