-
Notifications
You must be signed in to change notification settings - Fork 38
75 lines (74 loc) · 2.02 KB
/
build-libs.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
name: Build Libs
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'Platform/**'
- '!Platform/libs/**'
pull_request:
paths:
- 'Platform/**'
- '!Platform/libs/**'
jobs:
Build:
strategy:
matrix:
include:
- os: windows-latest
lib: x64/FosterPlatform.dll
- os: macos-latest
lib: osx/libFosterPlatform.dylib
- os: ubuntu-latest
lib: lib64/libFosterPlatform.so
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Get CMake
uses: lukka/[email protected]
- name: Setup Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev
- name: CMake Configure
run: cmake -B build -S Platform
- name: CMake Build
run: cmake --build build --config Release
- name: Publish Artifact
uses: actions/[email protected]
with:
name: ${{matrix.os}}-build
path: Platform/libs/${{matrix.lib}}
UpdateLibs:
needs: [Build]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Download windows lib
uses: actions/download-artifact@v3
with:
name: windows-latest-build
path: Platform/libs/x64
- name: Download macos lib
uses: actions/download-artifact@v3
with:
name: macos-latest-build
path: Platform/libs/osx
- name: Download ubuntu lib
uses: actions/download-artifact@v3
with:
name: ubuntu-latest-build
path: Platform/libs/lib64
- name: Display structure of libs
run: ls -R
working-directory: Platform/libs
- name: Commit changes
uses: EndBug/[email protected]
with:
message: Updated platform libs
committer_name: GitHub Actions
committer_email: [email protected]