forked from KD-lab-Open-Source/Perimeter
-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (74 loc) · 2.84 KB
/
linux_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
name: Linux Build
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
env:
GH_CACHE_KEY: 4
jobs:
build:
strategy:
fail-fast: false
matrix:
env: [
{name: "Release", build_type: Release, arch: x86_64, upload: true, cmake: ""},
{name: "Debug", build_type: Debug, arch: x86_64, upload: true, cmake: ""},
{name: "Debug D3D9 + Sokol + Asserts", build_type: Debug, arch: x86_64, upload: false, cmake: "-DOPTION_D3D9=ON -DOPTION_SOKOL=ON -DOPTION_DEBUG_ASSERT=ON"},
{name: "Release D3D9 + Sokol", build_type: Release, arch: x86_64, upload: false, cmake: "-DOPTION_D3D9=ON -DOPTION_SOKOL=ON"},
{name: "Debug D3D9", build_type: Debug, arch: x86_64, upload: false, cmake: "-DOPTION_D3D9=ON -DOPTION_SOKOL=OFF"},
{name: "Debug Sokol", build_type: Debug, arch: x86_64, upload: false, cmake: "-DOPTION_D3D9=OFF -DOPTION_SOKOL=ON"},
{name: "Scripts Check", build_type: Release, arch: x86_64, upload: false, cmake: "-DOPTION_CHECK_SCRIPTS=ON "},
]
name: ${{matrix.env.name}} ${{matrix.env.arch}}
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
container:
image: "debian:buster"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: |
/opt/src
/opt/out
key: Linux-${{matrix.env.arch}}-${{ env.GH_CACHE_KEY }}
- name: prepare env
run: |
chmod a+x ./docker/linux/prepare_pkgs
./docker/linux/prepare_pkgs
- name: prepare boost
run: |
chmod a+x ./docker/prepare_boost
./docker/prepare_boost
- name: build ffmpeg
run: |
chmod a+x ./docker/linux/prepare_ffmpeg
./docker/linux/prepare_ffmpeg
if: steps.cache.outputs.cache-hit != 'true'
- name: build sdl2
run: |
chmod a+x ./docker/linux/prepare_sdl_pkgs
chmod a+x ./docker/linux/prepare_sdl
./docker/linux/prepare_sdl_pkgs
./docker/linux/prepare_sdl
if: steps.cache.outputs.cache-hit != 'true'
- name: Scripts check
run: export CUSTOM_TARGET="ScriptsCheck"
if: matrix.env.name == 'Scripts Check'
- name: build
run: |
chmod a+x ./docker/linux/builder
export LIBS_ROOT=/opt/out
./docker/linux/builder \
-DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} \
${{matrix.env.cmake}}
- uses: actions/upload-artifact@v4
with:
name: Perimeter ${{matrix.env.build_type}} ${{matrix.env.arch}}
path: ./build/docker-linux/output/Perimeter.tar
if: matrix.env.upload