-
Notifications
You must be signed in to change notification settings - Fork 129
73 lines (67 loc) · 2.25 KB
/
build_and_release.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
name: Build OpenBOR
on: [push, pull_request]
jobs:
Build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
strategy:
fail-fast: false
matrix:
platform:
- { name: Windows-x86, os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: Windows-x64, os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 }
- { name: Ubuntu-x64, os: ubuntu-latest, shell: sh }
- { name: MacOS, os: macos-latest, shell: sh }
steps:
- name: Set up MSYS2
if: matrix.platform.shell == 'msys2 {0}'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.platform.msystem }}
install: >-
git
${{ matrix.platform.msys-env }}-gcc
${{ matrix.platform.msys-env }}-cmake
${{ matrix.platform.msys-env }}-SDL2
${{ matrix.platform.msys-env }}-zlib
${{ matrix.platform.msys-env }}-libvorbis
${{ matrix.platform.msys-env }}-libogg
${{ matrix.platform.msys-env }}-libpng
${{ matrix.platform.msys-env }}-libvpx
- name: Setup Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install build-essential git cmake zstd \
libsdl2-dev libvorbis-dev libpng-dev libvpx-dev
- name: Setup Macos dependencies
if: runner.os == 'macOS'
run: |
brew install \
SDL2 \
libvorbis \
libogg \
libvpx
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure
run: |
${{ matrix.platform.source_cmd }}
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
${{ matrix.platform.cmake }}
- name: Build
run: |
${{ matrix.platform.source_cmd }}
cmake --build build/ --config Release --verbose --parallel
- name: Version
id: vars
run: echo "version_name=$(cat engine/version.txt)" >> $GITHUB_ENV
- name: Upload
uses: actions/upload-artifact@v4
with:
name: "${{ env.version_name }}_${{ matrix.platform.name }}"
path: engine/releases/